feat(platform): add gcloud WIF credential helper command (PYSDK-146)#689
Open
dima-aignostics wants to merge 4 commits into
Open
feat(platform): add gcloud WIF credential helper command (PYSDK-146)#689dima-aignostics wants to merge 4 commits into
dima-aignostics wants to merge 4 commits into
Conversation
Adds `aignostics user token` CLI command implementing the gcloud pluggable external credential source contract. Outputs an Aignostics id_token as JSON so gcloud can use it for Workload Identity Federation when accessing GCS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
|
Replace get_token mock with a real token file on disk so that get_token's cache-hit path (file existence check, expiry parsing, 5-minute window validation) executes for real. For success tests: write token:future_expiry to tmp_path and mock settings at the authentication layer; only _inform_sentry_about_user is suppressed to avoid JWT network calls. For failure tests: point settings at a non-existent file so the cache miss occurs naturally, then mock _authenticate to raise so get_token's full failure path is exercised without real OAuth flows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove stray backslash line continuation and add missing return type annotation on _settings_with_token_file staticmethod. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Adds
aignostics user tokenCLI command implementing the gcloud pluggable external credential source contract. Outputs an Aignostics id_token as JSON so gcloud can use it for Workload Identity Federation when accessing GCS.