-
Notifications
You must be signed in to change notification settings - Fork 125
feat(auth): Add support for gdch_service_account credentials
#5551
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,8 @@ pub mod api_key_credentials; | |
| pub mod external_account; | ||
| pub(crate) mod external_account_sources; | ||
| #[cfg(feature = "idtoken")] | ||
| pub(crate) mod gdch_service_account; | ||
| #[cfg(feature = "idtoken")] | ||
| pub mod idtoken; | ||
| pub mod impersonated; | ||
| pub(crate) mod internal; | ||
|
|
@@ -780,6 +782,9 @@ fn build_credentials( | |
| universe_domain.clone(), | ||
| |b: external_account::Builder, s: Vec<String>| b.with_scopes(s) | ||
| ), | ||
| "gdch_service_account" => Err(BuilderError::not_supported( | ||
| "gdch_service_account is supported by credentials::idtoken::Builder::new(audience)", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks wrong. This macro builds AccessTokenCredentials and it seems like it can be supported by this credential type. And the error mentions idtoken. |
||
| )), | ||
| _ => Err(BuilderError::unknown_type(cred_type)), | ||
| } | ||
| } | ||
|
|
@@ -826,6 +831,9 @@ fn build_signer( | |
| "external_account" => Err(BuilderError::not_supported( | ||
| "external_account signer is not supported", | ||
| )), | ||
| "gdch_service_account" => Err(BuilderError::not_supported( | ||
| "gdch_service_account signer is not supported", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this flow not supported or not implemented yet ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So looking through the Go impl a bit closer, I think this is not quite right. But also really annoying 🙂 Here is my understanding:
I was getting these mixed up a bit and made it so you can only use the idtoken path for |
||
| )), | ||
| _ => Err(BuilderError::unknown_type(cred_type)), | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the gdch_service_account should be behind the
idtokenfeature. Probably a typo or copy/paste error.