Skip to content

Commit

Permalink
Change craycli to use shasta keycloak client instead of deprecated cr…
Browse files Browse the repository at this point in the history
…ay client
  • Loading branch information
Brad Klein authored and rustydb committed Jun 13, 2023
1 parent cc4d733 commit 659991d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cray/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, hostname, path, username=None, name=None, **kwargs):
self.ctx = ctx
self.url = make_url(self.TOKEN_URI.format(self.tenant), hostname)
self.path = path
self.client_id = kwargs.get('client_id', 'cray')
self.client_id = kwargs.get('client_id', 'shasta')
self._token_path = os.path.join(self.path, self.name)
self.session = None

Expand Down
2 changes: 1 addition & 1 deletion cray/tests/files/token
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJZT3h4OWhMZktGM2Y4LXdoVjRMcEtnU3cwWGRHTEdhdUhlSEhVRnpmQmhZIn0.eyJqdGkiOiJkZDNmNGE1Mi00MDA0LTRkMzEtYmQyMS04MzliOTAxMDkxYzAiLCJleHAiOjE1NDQyMTkzMTIsIm5iZiI6MCwiaWF0IjoxNTQ0MjE5MDEyLCJpc3MiOiJodHRwczovL3Ntcy0wMS5jcmF5ZGV2LmNvbS9rZXljbG9hay9yZWFsbXMvc2hhc3RhIiwiYXVkIjoiY3JheSIsInN1YiI6IjYyMzhmMjQ5LTk4NjYtNDJhYS1hNGNhLTE4NmEwODljOGZmYiIsInR5cCI6IkJlYXJlciIsImF6cCI6ImNyYXkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiIzYzYzOGZlOC00NzM1LTRlYWItYjVhMS00M2M1MmIwZTMxNWIiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1h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Tk4NjYtNDJhYS1hNGNhLTE4NmEwODljOGZmYiIsInR5cCI6IlJlZnJlc2giLCJhenAiOiJjcmF5IiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiM2M2MzhmZTgtNDczNS00ZWFiLWI1YTEtNDNjNTJiMGUzMTViIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6InByb2ZpbGUgZW1haWwifQ.dzrIwSvRJaIEedVi9383M3qpyfxvLkUcAL_qOl9vt8dJwaRl359FX-MFJ-Apug7SnxMh-s13zpPqCGg756AUX_cP7eEWZ2Iye-f7B0oeXUR018wkqS41UzRp-yb5innkLoZZVBV04QhBHNybZvaX5ScWAUozeBzWI3lc_wWMJtUtUikVDdaAnOe3oClhc_4ks9MiBtFAvtgBq3hIrLifRJd8w6Zyoo82BW0fBaGDOonIo0aSbFzceX0eRxDo2Ymk-WPIVSCazufXHamfbqUghSPnNfbxf8U5muglc8Q6TXoa9A6whL9AtD3_eaXIwGx_MML5MT513Ht3VhSf_CqKOg", "token_type": "bearer", "not-before-policy": 0, "session_state": "3c638fe8-4735-4eab-b5a1-43c52b0e315b", "scope": ["profile", "email"], "expires_at": 1544219313.232857, "client_id": "cray"}
{"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJZT3h4OWhMZktGM2Y4LXdoVjRMcEtnU3cwWGRHTEdhdUhlSEhVRnpmQmhZIn0.eyJqdGkiOiJkZDNmNGE1Mi00MDA0LTRkMzEtYmQyMS04MzliOTAxMDkxYzAiLCJleHAiOjE1NDQyMTkzMTIsIm5iZiI6MCwiaWF0IjoxNTQ0M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SPnNfbxf8U5muglc8Q6TXoa9A6whL9AtD3_eaXIwGx_MML5MT513Ht3VhSf_CqKOg", "token_type": "bearer", "not-before-policy": 0, "session_state": "3c638fe8-4735-4eab-b5a1-43c52b0e315b", "scope": ["profile", "email"], "expires_at": 1544219313.232857, "client_id": "shasta"}
2 changes: 1 addition & 1 deletion cray/tests/test_unit/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_auth_load(cli_runner):
username = opts['default']['username']
hostname = opts['default']['hostname']

# token = {'test': 123, 'client_id': 'cray'}
# token = {'test': 123, 'client_id': 'shasta'}

@cli.command('test')
@click.pass_context
Expand Down

0 comments on commit 659991d

Please sign in to comment.