-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Updating Okta MFA to use official SDK #15355
Conversation
Co-authored-by: swayne275 <swayne@hashicorp.com>
This looks great! I just have a couple of questions one of which might be out of the scope of this work. |
I also submitted this issue to the SDK. There is an easy enough workaround but it would be nice to use the transaction id from the verify response natively. |
…ng GetFactorTransactionStatus
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.
var result pushResult | ||
_, err = client.Do(req, &result) | ||
var result *okta.VerifyUserFactorResponse | ||
_, err = rq.Do(ctx, req, &result) |
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.
Seems like result is already a pointer now. Should rq.Do
be fixed for that?
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 agree with you but this code is just mostly copied from the Okta SDK. https://github.com/okta/okta-sdk-golang/blob/66ce9052167bc3da973e2685c378a46937ae1dd5/okta/userFactor.go#L214-L232
* updating MFA to use official Okta SDK * add changelog * Update vault/login_mfa.go Co-authored-by: swayne275 <swayne@hashicorp.com> * cleanup query param building * skip if not user factor * updating struct tags to be more explicit * fixing incorrect merge * worrying that URL construction may change in the future, reimplementing GetFactorTransactionStatus * adding some safety around url building Co-authored-by: swayne275 <swayne@hashicorp.com>
The PR migrates the login MFA functionality to use the official Okta SDK to initiate and verify the MFA enforcement.