kaqing 1.98.77__py3-none-any.whl → 1.98.79__py3-none-any.whl

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.
adam/sso/idp.py CHANGED
@@ -95,11 +95,11 @@ class Idp:
95
95
  if username and password:
96
96
  # if uploading kubeconfig file fails many times, you will be locked out
97
97
  # kubeconfig file content has first char as tab and length of bigger than 128
98
- if password[0] == '\t':
98
+ if password[0] == '\t' or len(password) > Config().get('app.login.password-max-length', 128):
99
99
  if r := Idp.try_kubeconfig(username, password):
100
100
  log(f"You're signed in as {username}")
101
101
  return r
102
- elif len(password) <= Config().get('app.login.password-max-length', 128):
102
+ else:
103
103
  if r := session.authenticator.authenticate(session.idp_uri, app_host, username, password):
104
104
  log(f"You're signed in as {username}")
105
105
  return r
@@ -125,7 +125,9 @@ class Idp:
125
125
 
126
126
  def try_kubeconfig(username: str, kubeconfig: str):
127
127
  try:
128
- kubeconfig_string = base64.b64decode(kubeconfig[1:].encode('ascii') + b'==').decode('utf-8')
128
+ if kubeconfig[0] == '\t':
129
+ kubeconfig = kubeconfig[1:]
130
+ kubeconfig_string = base64.b64decode(kubeconfig.encode('ascii') + b'==').decode('utf-8')
129
131
  if kubeconfig_string.startswith('apiVersion: '):
130
132
  kubeconfig_dict = yaml.safe_load(kubeconfig_string)
131
133
  config.kube_config.load_kube_config_from_dict(kubeconfig_dict)
adam/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- __version__ = "1.98.77" #: the working version
4
+ __version__ = "1.98.79" #: the working version
5
5
  __release__ = "1.0.0" #: the release version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaqing
3
- Version: 1.98.77
3
+ Version: 1.98.79
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -14,7 +14,7 @@ adam/repl_commands.py,sha256=WCiM3AEDZjxlJNUj0LNkxuvH0I4GuptZfi3oj3ih4SY,3620
14
14
  adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
15
15
  adam/repl_state.py,sha256=QarrUAwYWOz3YTemtaf2opbHLa5a3LEsyuonNwhvOhk,7131
16
16
  adam/utils.py,sha256=j7p7iruLuV11swa0z9ZLBgoJHu_nkTSVKtQe0q71gmk,7025
17
- adam/version.py,sha256=oWk5eegn7GkNZbpddV9uYCvrd7Cc9YIDLL6z-b0B3DI,140
17
+ adam/version.py,sha256=-l_NKPzaiSerZ4oPELpCySBphFCwtdKtgBRLTblLhPM,140
18
18
  adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
20
20
  adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
@@ -148,12 +148,12 @@ adam/sso/authn_ad.py,sha256=X6oZGKJ-SHTgxiiJtPPbMGdqyP1HWnUinR4w6k-ECAE,7171
148
148
  adam/sso/authn_okta.py,sha256=gvW-EcQxn_5UsbVqyUpJZ_7lBBuzY6gceXukU4uLIJs,5387
149
149
  adam/sso/cred_cache.py,sha256=7WA5rIy1wlr_GCF-Z6xRb6LzRu-Cvou-IkY7hWC3Zpc,2099
150
150
  adam/sso/id_token.py,sha256=wmVZ8S0sjScnOxmSvOKlIEKgnvdWqhsgq9XjFe355O4,744
151
- adam/sso/idp.py,sha256=oTgvLmi5g3eiDLwibobfvVs2Uc3qPA0e-G4ujJ1_ly4,5648
151
+ adam/sso/idp.py,sha256=Fk5KpERYqhBjwVZe1YBKBjcGaaxj1nHYli7fi680a1o,5728
152
152
  adam/sso/idp_login.py,sha256=t49CRlMyHA76BAj_kKq0Wa9URIYlzBsUCSmn7Jf5o6I,1721
153
153
  adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
154
154
  adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
155
- kaqing-1.98.77.dist-info/METADATA,sha256=ipqcwzx24Om2O-cqGcbijAm4toYgunqy_kAmAlXQoMo,133
156
- kaqing-1.98.77.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
157
- kaqing-1.98.77.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
158
- kaqing-1.98.77.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
159
- kaqing-1.98.77.dist-info/RECORD,,
155
+ kaqing-1.98.79.dist-info/METADATA,sha256=aPLJFkSBdAOq6c0Yd-p95Dsxqate7GO5AZLqKv8BFK0,133
156
+ kaqing-1.98.79.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
157
+ kaqing-1.98.79.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
158
+ kaqing-1.98.79.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
159
+ kaqing-1.98.79.dist-info/RECORD,,