Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keepercommander/commands/credential_provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ def _create_dag_link(
pam_config_record = vault.KeeperRecord.load(params, pam_config_uid)

# Create RecordLink instance
record_link = RecordLink(record=pam_config_record, params=params, fail_on_corrupt=False, use_per_graph_endpoints=True)
record_link = RecordLink(record=pam_config_record, params=params, fail_on_corrupt=False, use_per_graph_endpoints=False)

# Create belongs_to relationship: PAM User belongs_to PAM Configuration
record_link.belongs_to(
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discover/job_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def execute(self, params, **kwargs):
all_gateways = GatewayContext.all_gateways(params)

def _find_job(configuration_record) -> Optional[Dict]:
jobs_obj = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=True)
jobs_obj = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=False)
job_item = jobs_obj.get_job(job_id)
if job_item is not None:
return {
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discover/job_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def execute(self, params, **kwargs):
multi_conf_msg(gateway, err)
return

jobs = Jobs(record=gateway_context.configuration, params=params, use_per_graph_endpoints=True)
jobs = Jobs(record=gateway_context.configuration, params=params, use_per_graph_endpoints=False)
current_job_item = jobs.current_job
removed_prior_job = None
if current_job_item is not None:
Expand Down
6 changes: 3 additions & 3 deletions keepercommander/commands/discover/job_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def print_job_detail(params: KeeperParams,
job_id: str):

def _find_job(configuration_record) -> Optional[Dict]:
jobs_obj = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=True)
jobs_obj = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=False)
job_item = jobs_obj.get_job(job_id)
if job_item is not None:
return {
Expand All @@ -175,7 +175,7 @@ def _find_job(configuration_record) -> Optional[Dict]:
if gateway_context is not None:
jobs = payload["jobs"]
job = jobs.get_job(job_id) # type: JobItem
infra = Infrastructure(record=gateway_context.configuration, params=params, use_per_graph_endpoints=True)
infra = Infrastructure(record=gateway_context.configuration, params=params, use_per_graph_endpoints=False)

color = bcolors.OKBLUE
status = "RUNNING"
Expand Down Expand Up @@ -325,7 +325,7 @@ def execute(self, params, **kwargs):
if len(gateway_context.gateway_name) > max_gateway_name:
max_gateway_name = len(gateway_context.gateway_name)

jobs = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=True)
jobs = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=False)
if show_history is True:
job_list = reversed(jobs.history)
else:
Expand Down
6 changes: 3 additions & 3 deletions keepercommander/commands/discover/result_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ def _get_directory_info(domain: str,
def remove_job(params: KeeperParams, configuration_record: KeeperRecord, job_id: str):

try:
jobs = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=True)
jobs = Jobs(record=configuration_record, params=params, use_per_graph_endpoints=False)
jobs.cancel(job_id)
print(f"{bcolors.OKGREEN}No items left to process. Removing completed discovery job.{bcolors.ENDC}")
except Exception as err:
Expand All @@ -1353,7 +1353,7 @@ def preview(self, job_item: JobItem, params: KeeperParams, gateway_context: Gate
params=params,
logger=logging,
debug_level=debug_level,
use_per_graph_endpoints=True)
use_per_graph_endpoints=False)
infra.load(sync_point)

configuration = None
Expand Down Expand Up @@ -1512,7 +1512,7 @@ def execute(self, params: KeeperParams, **kwargs):
# Get the current job.
# There can only be one active job.
# This will give us the sync point for the delta
jobs = Jobs(record=configuration_record, params=params, logger=logging, debug_level=debug_level, use_per_graph_endpoints=True)
jobs = Jobs(record=configuration_record, params=params, logger=logging, debug_level=debug_level, use_per_graph_endpoints=False)
job_item = jobs.current_job
if job_item is None:
continue
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discover/rule_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def execute(self, params, **kwargs):
return

# If the rule passes its validation, then add control DAG
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=True)
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=False)
new_rule = ActionRuleItem(
name=kwargs.get("name"),
action=kwargs.get("rule_action"),
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discover/rule_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def execute(self, params, **kwargs):
multi_conf_msg(gateway, err)
return

rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=True)
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=False)
rule_list = rules.rule_list(rule_type=RuleTypeEnum.ACTION,
search=kwargs.get("search")) # type: List[RuleItem]
if len(rule_list) == 0:
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discover/rule_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def execute(self, params, **kwargs):
return

try:
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=True)
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=False)
if remove_all:
rules.remove_all(RuleTypeEnum.ACTION)
print(f"{bcolors.OKGREEN}All rules removed.{bcolors.ENDC}")
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discover/rule_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def execute(self, params, **kwargs):

try:
rule_id = kwargs.get("rule_id")
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=True)
rules = Rules(record=gateway_context.configuration, params=params, use_per_graph_endpoints=False)
rule_item = rules.get_rule_item(rule_type=RuleTypeEnum.ACTION, rule_id=rule_id)
if rule_item is None:
raise ValueError("Rule Id does not exist.")
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discoveryrotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3372,7 +3372,7 @@ def record_rotate(self, params, record_uid, slient: bool = False):
# Check the graph for the noop setting.
record_link = RecordLink(record=pam_config,
params=params,
fail_on_corrupt=False, use_per_graph_endpoints=True)
fail_on_corrupt=False, use_per_graph_endpoints=False)
acl = record_link.get_acl(record_uid, pam_config.record_uid)
if acl is not None and acl.rotation_settings is not None:
is_noop = acl.rotation_settings.noop
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/pam_debug/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def execute(self, params: KeeperParams, **kwargs):
record_link = RecordLink(record=gateway_context.configuration,
params=params,
logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)

user_record = vault.KeeperRecord.load(params, user_uid) # type: Optional[TypedRecord]
if user_record is None:
Expand Down
6 changes: 3 additions & 3 deletions keepercommander/commands/pam_debug/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ def execute(self, params: KeeperParams, **kwargs):
multi_conf_msg(gateway, err)
return

infra = Infrastructure(record=gateway_context.configuration, params=params, fail_on_corrupt=False, use_per_graph_endpoints=True)
infra = Infrastructure(record=gateway_context.configuration, params=params, fail_on_corrupt=False, use_per_graph_endpoints=False)
infra.load()

record_link = RecordLink(record=gateway_context.configuration, params=params, fail_on_corrupt=False, use_per_graph_endpoints=True)
user_service = UserService(record=gateway_context.configuration, params=params, fail_on_corrupt=False, use_per_graph_endpoints=True)
record_link = RecordLink(record=gateway_context.configuration, params=params, fail_on_corrupt=False, use_per_graph_endpoints=False)
user_service = UserService(record=gateway_context.configuration, params=params, fail_on_corrupt=False, use_per_graph_endpoints=False)

if gateway_context is None:
print(f" {self._f('Cannot get gateway information. Gateway may not be up.')}")
Expand Down
16 changes: 8 additions & 8 deletions keepercommander/commands/pam_debug/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _do_text_list_infra(self, params: KeeperParams, gateway_context: GatewayCont
indent: int = 0):

infra = Infrastructure(record=gateway_context.configuration, params=params, logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)
infra.load(sync_point=0)

try:
Expand Down Expand Up @@ -164,7 +164,7 @@ def _do_text_list_rl(self, params: KeeperParams, gateway_context: GatewayContext
record_link = RecordLink(record=gateway_context.configuration,
params=params,
logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)
configuration = record_link.dag.get_root

record = vault.KeeperRecord.load(params, configuration.uid) # type: Optional[TypedRecord]
Expand Down Expand Up @@ -316,7 +316,7 @@ def _do_text_list_service(self, params: KeeperParams, gateway_context: GatewayCo
indent: int = 0):

user_service = UserService(record=gateway_context.configuration, params=params, logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)
configuration = user_service.dag.get_root

def _handle(current_vertex: DAGVertex, parent_vertex: Optional[DAGVertex] = None, indent: int = 0):
Expand Down Expand Up @@ -364,7 +364,7 @@ def _do_text_list_jobs(self, params: KeeperParams, gateway_context: GatewayConte
indent: int = 0):

infra = Infrastructure(record=gateway_context.configuration, params=params, logger=logging,
debug_level=debug_level, fail_on_corrupt=False, use_per_graph_endpoints=True)
debug_level=debug_level, fail_on_corrupt=False, use_per_graph_endpoints=False)
infra.load(sync_point=0)

pad = ""
Expand Down Expand Up @@ -461,7 +461,7 @@ def _do_render_infra(self, params: KeeperParams, gateway_context: GatewayContext
debug_level: int = 0):

infra = Infrastructure(record=gateway_context.configuration, params=params, logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)
infra.load(sync_point=0)

print("")
Expand All @@ -487,7 +487,7 @@ def _do_render_rl(self, params: KeeperParams, gateway_context: GatewayContext, f
rl = RecordLink(record=gateway_context.configuration,
params=params,
logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)

print("")
dot_instance = rl.to_dot(
Expand All @@ -510,7 +510,7 @@ def _do_render_service(self, params: KeeperParams, gateway_context: GatewayConte
graph_format: str, debug_level: int = 0):

service = UserService(record=gateway_context.configuration, params=params, logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)

print("")
dot_instance = service.to_dot(
Expand All @@ -532,7 +532,7 @@ def _do_render_service(self, params: KeeperParams, gateway_context: GatewayConte
def _do_render_jobs(self, params: KeeperParams, gateway_context: GatewayContext, filepath: str,
graph_format: str, debug_level: int = 0):

jobs = Jobs(record=gateway_context.configuration, params=params, logger=logging, debug_level=debug_level, use_per_graph_endpoints=True)
jobs = Jobs(record=gateway_context.configuration, params=params, logger=logging, debug_level=debug_level, use_per_graph_endpoints=False)

print("")
dot_instance = jobs.dag.to_dot()
Expand Down
8 changes: 4 additions & 4 deletions keepercommander/commands/pam_debug/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def execute(self, params: KeeperParams, **kwargs):

for configuration_record in configuration_records:

record_link = RecordLink(record=configuration_record, params=params, use_per_graph_endpoints=True)
record_link = RecordLink(record=configuration_record, params=params, use_per_graph_endpoints=False)
record_vertex = record_link.dag.get_vertex(record.record_uid)
if record_vertex is not None and record_vertex.active is True:
controller_uid = configuration_record.record_uid
Expand Down Expand Up @@ -95,10 +95,10 @@ def execute(self, params: KeeperParams, **kwargs):
print(f"{bcolors.FAIL}Could not find the gateway for configuration record.{controller_uid}{bcolors.ENDC}")
return

infra = Infrastructure(record=configuration_record, params=params, use_per_graph_endpoints=True)
infra = Infrastructure(record=configuration_record, params=params, use_per_graph_endpoints=False)
infra.load()
record_link = RecordLink(record=configuration_record, params=params, use_per_graph_endpoints=True)
user_service = UserService(record=configuration_record, params=params, use_per_graph_endpoints=True)
record_link = RecordLink(record=configuration_record, params=params, use_per_graph_endpoints=False)
user_service = UserService(record=configuration_record, params=params, use_per_graph_endpoints=False)

print("")
print(self._h("Record Information"))
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/pam_debug/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def execute(self, params: KeeperParams, **kwargs):
record_link = RecordLink(record=gateway_context.configuration,
params=params,
logger=logging,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)

resource_record = vault.KeeperRecord.load(params, resource_uid) # type: Optional[TypedRecord]
if resource_record is None:
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/pam_debug/rotation_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def execute(self, params: KeeperParams, **kwargs):
f"It's a {resource_record.record_type}.{bcolors.ENDC}")
return

record_link = RecordLink(record=configuration_record, params=params, use_per_graph_endpoints=True)
record_link = RecordLink(record=configuration_record, params=params, use_per_graph_endpoints=False)

parent_uid = resource_record_uid or configuration_record_uid
parent_vertex = record_link.get_record_link(parent_uid)
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/pam_debug/vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def execute(self, params: KeeperParams, **kwargs):
return

infra = Infrastructure(record=gateway_context.configuration, params=params, fail_on_corrupt=False,
debug_level=debug_level, use_per_graph_endpoints=True)
debug_level=debug_level, use_per_graph_endpoints=False)
infra.load()

vertex_uid = kwargs.get("vertex_uid")
Expand Down
4 changes: 2 additions & 2 deletions keepercommander/commands/pam_service/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def execute(self, params: KeeperParams, **kwargs):
return

user_service = UserService(record=gateway_context.configuration, params=params, fail_on_corrupt=False,
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=True)
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=False)
record_link = RecordLink(record=gateway_context.configuration, params=params, fail_on_corrupt=False,
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=True)
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=False)

###############

Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/pam_service/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def execute(self, params: KeeperParams, **kwargs):
return

user_service = UserService(record=gateway_context.configuration, params=params, fail_on_corrupt=False,
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=True)
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=False)

service_map = {}
for resource_vertex in user_service.dag.get_root.has_vertices(edge_type=EdgeType.LINK):
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/pam_service/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def execute(self, params: KeeperParams, **kwargs):
return

user_service = UserService(record=gateway_context.configuration, params=params, fail_on_corrupt=False,
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=True)
agent=f"Cmdr/{__version__}", use_per_graph_endpoints=False)

machine_record = vault.KeeperRecord.load(params, machine_uid) # type: Optional[TypedRecord]
if machine_record is None:
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/discovery_common/record_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self,
# Based on the connection type, use_write_protobuf might be set to False is True was passed.
# Use self.conn.use_write_protobuf; don't use passed in use_write_protobuf.
# If using protobuf to write, then use the endpoint.
# `use_per_graph_endpoints=True` also forces the endpoints on, independent
# `use_per_graph_endpoints=False` also forces the endpoints on, independent
# of the protobuf flags.
self.write_endpoint = None
if use_per_graph_endpoints or self.conn.use_write_protobuf:
Expand Down
Loading