pybritive 2.2.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pybritive-2.2.0/src/pybritive.egg-info → pybritive-2.2.1}/PKG-INFO +1 -1
- pybritive-2.2.1/src/pybritive/__init__.py +1 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/britive_cli.py +30 -19
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/cloud_credential_printer.py +7 -6
- {pybritive-2.2.0 → pybritive-2.2.1/src/pybritive.egg-info}/PKG-INFO +1 -1
- pybritive-2.2.0/src/pybritive/__init__.py +0 -1
- {pybritive-2.2.0 → pybritive-2.2.1}/LICENSE +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/README.md +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/pyproject.toml +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/setup.cfg +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/__init__.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/backend.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/browser.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/mode.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/output_format.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/profile_type.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/ssh_key_source.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/choices/ssh_push_public_key.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/cli_interface.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/__init__.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/api.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/aws.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/cache.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/checkin.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/checkout.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/clear.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/configure.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/login.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/logout.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/ls.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/request.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/secret.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/ssh.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/commands/user.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/completers/__init__.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/completers/api.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/completers/api_command.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/completers/bash_gte_42.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/completers/powershell_completion.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/completers/profile.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/__init__.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/api_method_argument_decorator.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/aws_credential_process.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/build_britive.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/cache.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/config.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/credentials.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/encryption.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/k8s_exec.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/k8s_exec_credential_builder.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/kube_config_builder.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/profile_argument_decorator.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/helpers/split.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/__init__.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/alias.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/aws_console_duration.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/aws_credentials_file.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/aws_profile.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/blocktime.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/britive_options.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/browser.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/checked_out.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/configure_alias.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/configure_backend.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/configure_prompt.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/configure_tenant.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/console.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/extend.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/federation_provider.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/file.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/force_renew.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/gcloud_key_file.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/justification.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/maxpolltime.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/mode.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/otp.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/output_format.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/passphrase.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/profile_type.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/query.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/silent.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ssh_hostname.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ssh_key_source.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ssh_port.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ssh_push_public_key.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ssh_username.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/tenant.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ticket_id.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/ticket_type.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/token.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/verbose.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive/options/version.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive.egg-info/SOURCES.txt +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive.egg-info/dependency_links.txt +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive.egg-info/entry_points.txt +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive.egg-info/requires.txt +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/src/pybritive.egg-info/top_level.txt +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0100_version.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0200_configure.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0300_login.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0400_ls.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0500_api.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0600_secret.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0700_cache.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0800_checkout.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_0900_checkin.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_1000_clear.py +0 -0
- {pybritive-2.2.0 → pybritive-2.2.1}/tests/test_1100_logout.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.2.1'
|
|
@@ -350,7 +350,12 @@ class BritiveCli:
|
|
|
350
350
|
name = item['resourceName']
|
|
351
351
|
if name not in found_resource_names:
|
|
352
352
|
resources.append(
|
|
353
|
-
{
|
|
353
|
+
{
|
|
354
|
+
'resourceId': item['resourceId'],
|
|
355
|
+
'resourceName': name,
|
|
356
|
+
'resourceLabels': item['resourceLabels'],
|
|
357
|
+
'responseTemplates': item['responseTemplates'],
|
|
358
|
+
}
|
|
354
359
|
)
|
|
355
360
|
found_resource_names.append(name)
|
|
356
361
|
self.print(resources, ignore_silent=True)
|
|
@@ -762,19 +767,22 @@ class BritiveCli:
|
|
|
762
767
|
# attempt to automatically checkout console access instead
|
|
763
768
|
# this is a cli only feature - not available in the sdk
|
|
764
769
|
self.print('no programmatic access available - checking out console access instead')
|
|
765
|
-
return
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
770
|
+
return {
|
|
771
|
+
**self._checkout(
|
|
772
|
+
app_name,
|
|
773
|
+
blocktime,
|
|
774
|
+
env_name,
|
|
775
|
+
justification,
|
|
776
|
+
maxpolltime,
|
|
777
|
+
otp,
|
|
778
|
+
profile_name,
|
|
779
|
+
False,
|
|
780
|
+
ticket_id,
|
|
781
|
+
ticket_type,
|
|
782
|
+
mode,
|
|
783
|
+
),
|
|
784
|
+
'console-fallback': True,
|
|
785
|
+
}
|
|
778
786
|
raise e
|
|
779
787
|
|
|
780
788
|
@staticmethod
|
|
@@ -861,11 +869,12 @@ class BritiveCli:
|
|
|
861
869
|
self._extend_checkout(profile, console)
|
|
862
870
|
return None
|
|
863
871
|
|
|
864
|
-
|
|
872
|
+
self.verbose_checkout = verbose
|
|
865
873
|
app_type = None
|
|
866
874
|
cached_credentials_found = False
|
|
875
|
+
console_fallback = False
|
|
876
|
+
credentials = None
|
|
867
877
|
k8s_processor = None
|
|
868
|
-
self.verbose_checkout = verbose
|
|
869
878
|
|
|
870
879
|
# handle kube-exec since the profile is actually going to be passed in via another method
|
|
871
880
|
# and perform some basic validation so we don't waste time performing a checkout when we
|
|
@@ -924,6 +933,7 @@ class BritiveCli:
|
|
|
924
933
|
response = self._checkout(**params)
|
|
925
934
|
app_type = self._get_app_type(response['appContainerId'])
|
|
926
935
|
credentials = response['credentials']
|
|
936
|
+
console_fallback = response.get('console-fallback')
|
|
927
937
|
|
|
928
938
|
# this handles the --force-renew flag
|
|
929
939
|
# lets check to see if we should checkin this profile first and check it out again
|
|
@@ -937,12 +947,13 @@ class BritiveCli:
|
|
|
937
947
|
response = self._checkout(**params)
|
|
938
948
|
cached_credentials_found = False # need to write new creds to cache
|
|
939
949
|
credentials = response['credentials']
|
|
950
|
+
console_fallback = response.get('console-fallback')
|
|
940
951
|
|
|
941
952
|
if mode in self.cachable_modes and not cached_credentials_found:
|
|
942
953
|
Cache(passphrase=passphrase).save_credentials(
|
|
943
954
|
profile_name=alias or profile, credentials=credentials, mode=mode
|
|
944
955
|
)
|
|
945
|
-
return app_type, credentials, k8s_processor
|
|
956
|
+
return app_type, console_fallback, credentials, k8s_processor
|
|
946
957
|
|
|
947
958
|
def checkout(
|
|
948
959
|
self,
|
|
@@ -976,7 +987,7 @@ class BritiveCli:
|
|
|
976
987
|
ticket_type=ticket_type,
|
|
977
988
|
)
|
|
978
989
|
else:
|
|
979
|
-
app_type, credentials, k8s_processor = self._access_checkout(
|
|
990
|
+
app_type, console_fallback, credentials, k8s_processor = self._access_checkout(
|
|
980
991
|
alias=alias,
|
|
981
992
|
blocktime=blocktime,
|
|
982
993
|
console=console,
|
|
@@ -998,7 +1009,7 @@ class BritiveCli:
|
|
|
998
1009
|
|
|
999
1010
|
self.__get_cloud_credential_printer(
|
|
1000
1011
|
app_type,
|
|
1001
|
-
console,
|
|
1012
|
+
console or console_fallback,
|
|
1002
1013
|
mode,
|
|
1003
1014
|
alias or profile,
|
|
1004
1015
|
self.silent,
|
|
@@ -253,11 +253,12 @@ class GcpCloudCredentialPrinter(CloudCredentialPrinter):
|
|
|
253
253
|
def print_json(self):
|
|
254
254
|
self.cli.print(json.dumps(self.credentials, indent=2), ignore_silent=True)
|
|
255
255
|
self.cli.print('', ignore_silent=True)
|
|
256
|
-
self.
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
if not self.console:
|
|
257
|
+
self.cli.print(
|
|
258
|
+
f'Run command: gcloud auth activate-service-account {self.credentials.get("client_email")} '
|
|
259
|
+
'--key-file <path-where-above-json-is-stored>',
|
|
260
|
+
ignore_silent=True,
|
|
261
|
+
)
|
|
261
262
|
|
|
262
263
|
def print_gcloudauth(self):
|
|
263
264
|
# get path to gcloud key file
|
|
@@ -271,7 +272,7 @@ class GcpCloudCredentialPrinter(CloudCredentialPrinter):
|
|
|
271
272
|
path.write_text(json.dumps(self.credentials, indent=2), encoding='utf-8')
|
|
272
273
|
|
|
273
274
|
self.cli.print(
|
|
274
|
-
f
|
|
275
|
+
f'gcloud auth activate-service-account {self.credentials["client_email"]} --key-file {path!s}',
|
|
275
276
|
ignore_silent=True,
|
|
276
277
|
)
|
|
277
278
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.2.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|