kaqing 1.98.78__tar.gz → 1.98.80__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.
- {kaqing-1.98.78 → kaqing-1.98.80}/PKG-INFO +1 -1
- kaqing-1.98.80/adam/embedded_params.py +2 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/authn_ad.py +40 -10
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/idp.py +3 -1
- kaqing-1.98.80/adam/version.py +5 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/kaqing.egg-info/PKG-INFO +1 -1
- {kaqing-1.98.78 → kaqing-1.98.80}/setup.py +1 -1
- kaqing-1.98.78/adam/embedded_params.py +0 -2
- kaqing-1.98.78/adam/version.py +0 -5
- {kaqing-1.98.78 → kaqing-1.98.80}/README +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/app_session.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/apps.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/batch.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/check.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/check_context.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/check_result.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/check_utils.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/compactionstats.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/cpu.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/disk.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/gossip.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/issue.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/memory.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/checks/status.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/cli.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/cli_group.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/column.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/columns.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/compactions.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/cpu.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/dir_data.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/dir_snapshots.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/gossip.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/host_id.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/memory.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/node_address.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/node_load.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/node_owns.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/node_status.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/node_tokens.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/node_utils.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/pod_name.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/volume_cassandra.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/columns/volume_root.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/app.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/app_ping.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/bash.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/cd.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/check.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/cli_commands.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/command.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/command_helpers.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/commands_utils.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/cp.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/cql_utils.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/cqlsh.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/devices.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/exit.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/code_start.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/code_stop.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/code_utils.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/setup.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/setup_frontend.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/teardown.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/frontend/teardown_frontend.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/help.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/issues.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/login.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/logs.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/ls.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/medusa/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/medusa/medusa.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/medusa/medusa_backup.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/medusa/medusa_restore.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/medusa/medusa_show_backupjobs.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/medusa/medusa_show_restorejobs.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/nodetool.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/nodetool_commands.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/param_get.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/param_set.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/postgres/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/postgres/postgres.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/postgres/postgres_ls.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/postgres/postgres_preview.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/postgres/postgres_session.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/preview_table.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/pwd.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_forward.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_forward_stop.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_restart.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_run_abort.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_runs.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_runs_abort.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_schedule_activate.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_schedule_start.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_schedule_stop.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_schedules.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_session.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/reaper/reaper_status.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/repair/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/repair/repair.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/repair/repair_log.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/repair/repair_run.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/repair/repair_scan.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/repair/repair_stop.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/report.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/restart.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/rollout.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_adam.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_app_actions.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_app_id.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_app_queues.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_cassandra_status.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_cassandra_version.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_commands.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_login.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_params.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_processes.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_repairs.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/show/show_storage.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/user_entry.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/commands/watch.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/config.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/embedded_apps.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/cassandra_clusters.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/cassandra_nodes.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/custom_resources.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/ingresses.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/jobs.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/kube_context.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/pods.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/secrets.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/services.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/statefulsets.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/k8s_utils/volumes.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/log.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/pod_exec_result.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/repl.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/repl_commands.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/repl_session.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/repl_state.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/__init__.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/authenticator.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/authn_okta.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/cred_cache.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/id_token.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/idp_login.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/idp_session.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/sso/sso_config.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/adam/utils.py +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/kaqing.egg-info/SOURCES.txt +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/kaqing.egg-info/dependency_links.txt +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/kaqing.egg-info/entry_points.txt +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/kaqing.egg-info/top_level.txt +0 -0
- {kaqing-1.98.78 → kaqing-1.98.80}/setup.cfg +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
def config():
|
|
2
|
+
return {'app': {'console-endpoint': 'https://{host}/{env}/{app}/static/console/index.html', 'cr': {'cluster-regex': '(.*?-.*?)-.*', 'group': 'ops.c3.ai', 'v': 'v2', 'plural': 'c3cassandras'}, 'label': 'c3__app_id-0', 'login': {'admin-group': '{host}/C3.ClusterAdmin', 'ingress': '{app_id}-k8singr-appleader-001', 'timeout': 5, 'session-check-url': 'https://{host}/{env}/{app}/api/8/C3/userSessionToken', 'cache-creds': True, 'cache-username': True, 'url': 'https://{host}/{env}/{app}', 'another': "You're logged in to {has}. However, for this app, you need to log in to {need}.", 'token-server-url': 'http://localhost:{port}', 'password-max-length': 128}, 'strip': '0'}, 'bash': {'workers': 32}, 'cassandra': {'service-name': 'all-pods-service'}, 'cql': {'workers': 32, 'samples': 3, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-superuser', 'password-item': 'password'}}, 'checks': {'compactions-threshold': 250, 'cpu-busy-threshold': 98.0, 'cpu-threshold': 0.0, 'cassandra-data-path': '/c3/cassandra', 'root-disk-threshold': 50, 'cassandra-disk-threshold': 50, 'snapshot-size-cmd': "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'", 'snapshot-size-threshold': '40G', 'table-sizes-cmd': "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}"}, 'get-host-id': {'workers': 32}, 'idps': {'ad': {'email-pattern': '.*@c3.ai', 'uri': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/oauth2/v2.0/authorize?response_type=id_token&response_mode=form_post&client_id=00ff94a8-6b0a-4715-98e0-95490012d818&scope=openid+email+profile&redirect_uri=https%3A%2F%2Fplat.c3ci.cloud%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://login.microsoftonline.com/common/discovery/key', 'contact': 'Please contact ted.tran@c3.ai.', 'whitelist-file': '/kaqing/members'}, 'okta': {'default': True, 'email-pattern': '.*@c3iot.com', 'uri': 'https://c3energy.okta.com/oauth2/v1/authorize?response_type=id_token&response_mode=form_post&client_id={client_id}&scope=openid+email+profile+groups&redirect_uri=https%3A%2F%2F{host}%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY'}}, 'issues': {'workers': 32}, 'logs': {'path': '/c3/cassandra/logs/system.log'}, 'medusa': {'restore-auto-complete': False}, 'nodetool': {'workers': 32, 'samples': 3, 'commands_in_line': 40}, 'pg': {'name-pattern': '^{namespace}.*-k8spg-.*', 'excludes': '.helm., -admin-secret', 'agent': {'image': 'seanahnsf/kaqing', 'name': 'kaqing-agent', 'timeout': 86400}, 'default-db': 'postgres', 'default-schema': 'postgres', 'secret': {'endpoint-key': 'postgres-db-endpoint', 'port-key': 'postgres-db-port', 'username-key': 'postgres-admin-username', 'password-key': 'postgres-admin-password'}}, 'preview': {'rows': 10}, 'processes': {'columns': 'pod,cpu,mem', 'header': 'POD_NAME,CPU,MEM/LIMIT'}, 'reaper': {'service-name': 'reaper-service', 'port-forward': {'timeout': 86400, 'local-port': 9001}, 'abort-runs-batch': 10, 'show-runs-batch': 100, 'pod': {'cluster-regex': '(.*?-.*?-.*?-.*?)-.*', 'label-selector': 'k8ssandra.io/reaper={cluster}-reaper'}, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-reaper-ui', 'password-item': 'password'}}, 'repair': {'log-path': '/home/cassrepair/logs/', 'image': 'ci-registry.c3iot.io/cloudops/cassrepair:2.0.13', 'secret': 'ciregistryc3iotio', 'env': {'interval': 24, 'timeout': 60, 'pr': False, 'runs': 1}}, 'repl': {'start-drive': 'a', 'auto-enter-app': 'c3/c3', 'auto-enter-only-cluster': True}, 'status': {'columns': 'status,address,load,tokens,owns,host_id,gossip,compactions', 'header': '--,Address,Load,Tokens,Owns,Host ID,GOSSIP,COMPACTIONS'}, 'storage': {'columns': 'pod,volume_root,volume_cassandra,snapshots,data,compactions', 'header': 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS'}, 'watch': {'auto': 'rollout', 'timeout': 3600, 'interval': 10}, 'debug': {'timings': False, 'exit-on-error': False, 'show-parallelism': False, 'show-out': False}}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
import json
|
|
3
3
|
import re
|
|
4
|
+
import jwt
|
|
4
5
|
import requests
|
|
5
6
|
from urllib.parse import urlparse, parse_qs
|
|
6
7
|
|
|
@@ -134,16 +135,45 @@ class AdAuthenticator(Authenticator):
|
|
|
134
135
|
return []
|
|
135
136
|
|
|
136
137
|
def parse_id_token(self, id_token: str) -> IdToken:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
jwks_url = Config().get('idps.ad.jwks-uri', 'https://login.microsoftonline.com/common/discovery/keys')
|
|
139
|
+
try:
|
|
140
|
+
jwks_client = jwt.PyJWKClient(jwks_url, cache_jwk_set=True, lifespan=360)
|
|
141
|
+
signing_key = jwks_client.get_signing_key_from_jwt(id_token)
|
|
142
|
+
data = jwt.decode(
|
|
143
|
+
id_token,
|
|
144
|
+
signing_key.key,
|
|
145
|
+
algorithms=["RS256"],
|
|
146
|
+
options={
|
|
147
|
+
"verify_signature": True,
|
|
148
|
+
"verify_exp": False,
|
|
149
|
+
"verify_nbf": True,
|
|
150
|
+
"verify_iat": True,
|
|
151
|
+
"verify_aud": False,
|
|
152
|
+
"verify_iss": False,
|
|
153
|
+
},
|
|
154
|
+
)
|
|
155
|
+
return IdToken(
|
|
156
|
+
data,
|
|
157
|
+
data['email'],
|
|
158
|
+
data['name'],
|
|
159
|
+
groups=data['groups'] if 'groups' in data else [],
|
|
160
|
+
iat=data['iat'] if 'iat' in data else 0,
|
|
161
|
+
nbf=data['nbf'] if 'nbf' in data else 0,
|
|
162
|
+
exp=data['exp'] if 'exp' in data else 0
|
|
163
|
+
)
|
|
164
|
+
except:
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
# def decode_jwt_part(encoded_part):
|
|
168
|
+
# missing_padding = len(encoded_part) % 4
|
|
169
|
+
# if missing_padding:
|
|
170
|
+
# encoded_part += '=' * (4 - missing_padding)
|
|
171
|
+
# decoded_bytes = base64.urlsafe_b64decode(encoded_part)
|
|
172
|
+
# return json.loads(decoded_bytes.decode('utf-8'))
|
|
173
|
+
|
|
174
|
+
# parts = id_token.split('.')
|
|
175
|
+
# # header = decode_jwt_part(parts[0])
|
|
176
|
+
# data = decode_jwt_part(parts[1])
|
|
147
177
|
# print('SEAN', payload)
|
|
148
178
|
# {
|
|
149
179
|
# 'aud': '00ff94a8-6b0a-4715-98e0-95490012d818',
|
|
@@ -125,7 +125,9 @@ class Idp:
|
|
|
125
125
|
|
|
126
126
|
def try_kubeconfig(username: str, kubeconfig: str):
|
|
127
127
|
try:
|
|
128
|
-
|
|
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)
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
def config():
|
|
2
|
-
return {'app': {'console-endpoint': 'https://{host}/{env}/{app}/static/console/index.html', 'cr': {'cluster-regex': '(.*?-.*?)-.*', 'group': 'ops.c3.ai', 'v': 'v2', 'plural': 'c3cassandras'}, 'label': 'c3__app_id-0', 'login': {'admin-group': '{host}/C3.ClusterAdmin', 'ingress': '{app_id}-k8singr-appleader-001', 'timeout': 5, 'session-check-url': 'https://{host}/{env}/{app}/api/8/C3/userSessionToken', 'cache-creds': True, 'cache-username': True, 'url': 'https://{host}/{env}/{app}', 'another': "You're logged in to {has}. However, for this app, you need to log in to {need}.", 'token-server-url': 'http://localhost:{port}', 'password-max-length': 128}, 'strip': '0'}, 'bash': {'workers': 32}, 'cassandra': {'service-name': 'all-pods-service'}, 'cql': {'workers': 32, 'samples': 3, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-superuser', 'password-item': 'password'}}, 'checks': {'compactions-threshold': 250, 'cpu-busy-threshold': 98.0, 'cpu-threshold': 0.0, 'cassandra-data-path': '/c3/cassandra', 'root-disk-threshold': 50, 'cassandra-disk-threshold': 50, 'snapshot-size-cmd': "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'", 'snapshot-size-threshold': '40G', 'table-sizes-cmd': "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}"}, 'get-host-id': {'workers': 32}, 'idps': {'ad': {'email-pattern': '.*@c3.ai', 'uri': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/oauth2/v2.0/authorize?response_type=id_token&response_mode=form_post&client_id=00ff94a8-6b0a-4715-98e0-95490012d818&scope=openid+email+profile&redirect_uri=https%3A%2F%2Fplat.c3ci.cloud%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'contact': 'Please contact ted.tran@c3.ai.', 'whitelist-file': '/kaqing/members'}, 'okta': {'default': True, 'email-pattern': '.*@c3iot.com', 'uri': 'https://c3energy.okta.com/oauth2/v1/authorize?response_type=id_token&response_mode=form_post&client_id={client_id}&scope=openid+email+profile+groups&redirect_uri=https%3A%2F%2F{host}%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY'}}, 'issues': {'workers': 32}, 'logs': {'path': '/c3/cassandra/logs/system.log'}, 'medusa': {'restore-auto-complete': False}, 'nodetool': {'workers': 32, 'samples': 3, 'commands_in_line': 40}, 'pg': {'name-pattern': '^{namespace}.*-k8spg-.*', 'excludes': '.helm., -admin-secret', 'agent': {'image': 'seanahnsf/kaqing', 'name': 'kaqing-agent', 'timeout': 86400}, 'default-db': 'postgres', 'default-schema': 'postgres', 'secret': {'endpoint-key': 'postgres-db-endpoint', 'port-key': 'postgres-db-port', 'username-key': 'postgres-admin-username', 'password-key': 'postgres-admin-password'}}, 'preview': {'rows': 10}, 'processes': {'columns': 'pod,cpu,mem', 'header': 'POD_NAME,CPU,MEM/LIMIT'}, 'reaper': {'service-name': 'reaper-service', 'port-forward': {'timeout': 86400, 'local-port': 9001}, 'abort-runs-batch': 10, 'show-runs-batch': 100, 'pod': {'cluster-regex': '(.*?-.*?-.*?-.*?)-.*', 'label-selector': 'k8ssandra.io/reaper={cluster}-reaper'}, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-reaper-ui', 'password-item': 'password'}}, 'repair': {'log-path': '/home/cassrepair/logs/', 'image': 'ci-registry.c3iot.io/cloudops/cassrepair:2.0.13', 'secret': 'ciregistryc3iotio', 'env': {'interval': 24, 'timeout': 60, 'pr': False, 'runs': 1}}, 'repl': {'start-drive': 'a', 'auto-enter-app': 'c3/c3', 'auto-enter-only-cluster': True}, 'status': {'columns': 'status,address,load,tokens,owns,host_id,gossip,compactions', 'header': '--,Address,Load,Tokens,Owns,Host ID,GOSSIP,COMPACTIONS'}, 'storage': {'columns': 'pod,volume_root,volume_cassandra,snapshots,data,compactions', 'header': 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS'}, 'watch': {'auto': 'rollout', 'timeout': 3600, 'interval': 10}, 'debug': {'timings': False, 'exit-on-error': False, 'show-parallelism': False, 'show-out': False}}
|
kaqing-1.98.78/adam/version.py
DELETED
|
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
|
|
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
|