Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC login and logout commands #471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

OIDC login and logout commands #471

wants to merge 1 commit into from

Conversation

rgharris
Copy link
Member

@rgharris rgharris commented Dec 6, 2024

Authenticate the CLI via OIDC. This allows for easy authentication via CI providers that support signing OIDC tokens. You can use the CLI to get a short lived token and then use the token with our API if that format works best for your use case. Though just hitting the OIDC auth endpoint directly might be preferred in that case. Also, adds an option to revoke the generated short lived service account identity token as well.

I opted for the "login" and "logout" terminology primarily because "logout" sounds more aligned with the intended use case than "revoke". Logging out is totally optional as the tokens expire quickly (based on user configuration) regardless.

Example:

doppler oidc login --scope=. --identity=00000000-0000-0000-0000-000000000000 --token=$CIRCLE_OIDC_TOKEN_V2
doppler secrets --project example --config dev
doppler configure get token --plain # optionally retrieve the short lived token for use outside of the CLI
doppler oidc logout --scope=. # optional - short lived token expires quickly

Closes ENG-8516

@rgharris rgharris requested a review from a team as a code owner December 6, 2024 17:53
@rgharris rgharris requested a review from nmanoogian December 13, 2024 23:18
pkg/http/api.go Outdated Show resolved Hide resolved
pkg/cmd/oidc.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants