Skip to content

Commit 973cb36

Browse files
idimov-keepersk-keeper
authored andcommitted
Added remote browser isolation to PAM Configuratrion commands
1 parent 04e3c74 commit 973cb36

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

keepercommander/commands/discoveryrotation.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,8 @@ class PAMConfigurationNewCommand(Command, PamConfigurationEditMixin):
13661366
action='store_true', help='Enable tunneling')
13671367
parser.add_argument('--enable-rotation', '-er', dest='enable_rotation', action='store_true',
13681368
help='Enable rotation')
1369+
parser.add_argument('--enable-remote-browser-isolation', '-erbi', dest='enable_remotebrowserisolation',
1370+
action='store_true', help='Enable remote browser isolation')
13691371
parser.add_argument('--enable-connections-recording', '-ecr', required=False, dest='recordingenabled',
13701372
action='store_true', help='Enable recording connections for the resource')
13711373
parser.add_argument('--enable-typescripts-recording', '-etcr', required=False, dest='typescriptrecordingenabled',
@@ -1434,7 +1436,8 @@ def execute(self, params, **kwargs):
14341436
bool(kwargs.get('enable_tunneling')),
14351437
bool(kwargs.get('enable_rotation')),
14361438
bool(kwargs.get('recordingenabled')),
1437-
bool(kwargs.get('typescriptrecordingenabled'))
1439+
bool(kwargs.get('typescriptrecordingenabled')),
1440+
bool(kwargs.get('enable_remotebrowserisolation'))
14381441
)
14391442
tmp_dag.print_tunneling_config(record.record_uid, None)
14401443

@@ -1473,6 +1476,10 @@ class PAMConfigurationEditCommand(Command, PamConfigurationEditMixin):
14731476
help='Enable connections')
14741477
parser.add_argument('--disable-connections', '-dc', required=False, dest='disable_connections', action='store_true',
14751478
help='Enable connections')
1479+
parser.add_argument('--enable-remote-browser-isolation', '-erbi', required=False, dest='enable_remotebrowserisolation', action='store_true',
1480+
help='Enable remote browser isolation')
1481+
parser.add_argument('--disable-remote-browser-isolation', '-drbi', required=False, dest='disable_remotebrowserisolation', action='store_true',
1482+
help='Disable remote browser isolation')
14761483
parser.add_argument('--enable-connections-recording', '-ecr', required=False, dest='enable_connections_recording',
14771484
action='store_true', help='Enable connections recording')
14781485
parser.add_argument('--disable-connections-recording', '-dcr', required=False, dest='disable_connections_recording',
@@ -1563,26 +1570,31 @@ def execute(self, params, **kwargs):
15631570
if ((kwargs.get('enable_connections') and kwargs.get('disable_connections')) or
15641571
(kwargs.get('enable_tunneling') and kwargs.get('disable_tunneling')) or
15651572
(kwargs.get('enable_rotation') and kwargs.get('disable_rotation')) or
1573+
(kwargs.get('enable_remotebrowserisolation') and kwargs.get('disable_remotebrowserisolation')) or
15661574
(kwargs.get('enable_connections_recording') and kwargs.get('disable_connections_recording')) or
15671575
(kwargs.get('enable_typescripts_recording') and kwargs.get('disable_typescripts_recording'))):
15681576
raise CommandError('pam-config-edit', 'Cannot enable and disable the same feature at the same time')
15691577

15701578
# First check if enabled is true then check if disabled is true. if not then set it to None
15711579
_connections = True if kwargs.get('enable_connections') \
15721580
else False if kwargs.get('disable_connections') else None
1573-
_tunneling = True if kwargs.get('enable_tunneling') else False if kwargs.get('disable_tunneling') else None
1574-
_rotation = True if kwargs.get('enable_rotation') else False if kwargs.get('disable_rotation') else None
1581+
_tunneling = True if kwargs.get('enable_tunneling') \
1582+
else False if kwargs.get('disable_tunneling') else None
1583+
_rotation = True if kwargs.get('enable_rotation') \
1584+
else False if kwargs.get('disable_rotation') else None
1585+
_rbi = True if kwargs.get('enable_remotebrowserisolation') \
1586+
else False if kwargs.get('disable_remotebrowserisolation') else None
15751587
_recording = True if kwargs.get('enable_connections_recording') \
15761588
else False if kwargs.get('disable_connections_recording') else None
1577-
_typescript_recording = (True if kwargs.get('enable_typescripts_recording') else False if
1578-
kwargs.get('disable_typescripts_recording') else None)
1589+
_typescript_recording = True if kwargs.get('enable_typescripts_recording') \
1590+
else False if kwargs.get('disable_typescripts_recording') else None
15791591

1580-
if (_connections is not None or _tunneling is not None or _rotation is not None or _recording is not None or
1581-
_typescript_recording is not None):
1592+
if (_connections is not None or _tunneling is not None or _rotation is not None or _rbi is not None or
1593+
_recording is not None or _typescript_recording is not None):
15821594
encrypted_session_token, encrypted_transmission_key, transmission_key = get_keeper_tokens(params)
15831595
tmp_dag = TunnelDAG(params, encrypted_session_token, encrypted_transmission_key,
15841596
configuration.record_uid, is_config=True)
1585-
tmp_dag.edit_tunneling_config(_connections, _tunneling, _rotation, _recording, _typescript_recording)
1597+
tmp_dag.edit_tunneling_config(_connections, _tunneling, _rotation, _recording, _typescript_recording, _rbi)
15861598
tmp_dag.print_tunneling_config(configuration.record_uid, None)
15871599
for w in self.warnings:
15881600
logging.warning(w)

0 commit comments

Comments
 (0)