-
Notifications
You must be signed in to change notification settings - Fork 905
GODRIVER-2728: Implement automatic Azure token acquisition callback #1703
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
Conversation
…not go live, I'm sure
…r OIDC that is probably, maybe, possibly correct
… need to get down to Handshake instead of creating the Authenticator in Handshake as we do now
…o I'm sure it's right
API Change ReportNo changes found! |
@qingyang-hu sorry about the bot request, I was waiting for static analysis before adding reviewers |
@@ -1975,6 +1975,31 @@ tasks: | |||
commands: | |||
- func: "run-oidc-auth-test-with-test-credentials" | |||
|
|||
- name: "oidc-auth-test-azure-latest" |
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.
the test is compiled ahead of time and just the compiled exe is ran on the azure vm. This matters more for gcp vm which is far slower, but it's good to be consistent
x/mongo/driver/auth/oidc.go
Outdated
var azureResp struct { | ||
AccessToken string `json:"access_token"` | ||
ExpiresOn string `json:"expires_on"` | ||
} |
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.
Optional: You can skip the separate integer parsing step by using the ,string
struct tag option for ExpiresOn
.
E.g.
var azureResp struct {
AccessToken string `json:"access_token"`
ExpiresOn int64 `json:"expires_on,string"`
}
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.
Oh, cool!
Co-authored-by: Matt Dale <[email protected]>
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.
Looks good! 👍
…ongodb#1703) Co-authored-by: Matt Dale <[email protected]> (cherry picked from commit 9a02911)
Summary
Implement automatic Azure token acquisition callback
Background & Motivation
required by OIDC epic