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

Implement MFA authentication APIs #331

Merged
merged 9 commits into from
Dec 13, 2023
Merged

Implement MFA authentication APIs #331

merged 9 commits into from
Dec 13, 2023

Conversation

ewanharris
Copy link
Contributor

@ewanharris ewanharris commented Dec 13, 2023

🔧 Changes

Adds support for the Challenge and various Verify* APIs supported by the authentication API.

This does not add support for using the Authentication APIs as it was determined that the existing support on the management client is sufficient.

📚 References

Close #316

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (1f73dd6) 95.09% compared to head (716bdad) 94.93%.

Files Patch % Lines
authentication/mfa.go 80.43% 12 Missing and 6 partials ⚠️
authentication/authentication.go 84.84% 10 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
- Coverage   95.09%   94.93%   -0.16%     
==========================================
  Files          46       47       +1     
  Lines        8984     9081      +97     
==========================================
+ Hits         8543     8621      +78     
- Misses        336      348      +12     
- Partials      105      112       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

break
case params.ClientAssertion != "":
body.Set("client_assertion", params.ClientAssertion)
body.Set("client_assertion_type", params.ClientAssertionType)
Copy link
Contributor

@Widcket Widcket Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check that params.ClientAssertionType is not empty? Like e.g.

case params.ClientAssertion != "" && params.ClientAssertionType != "":

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes sense, will fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 716bdad and also took the opportunity to extend addClientAuthenticationToClientAuthStruct to allow specifying if a client secret/client assertion is required

authentication/mfa.go Outdated Show resolved Hide resolved
authentication/mfa/mfa.go Outdated Show resolved Hide resolved
authentication/mfa/mfa.go Outdated Show resolved Hide resolved
authentication/mfa/mfa.go Outdated Show resolved Hide resolved
authentication/mfa/mfa.go Outdated Show resolved Hide resolved
authentication/mfa/mfa.go Outdated Show resolved Hide resolved
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
@ewanharris ewanharris enabled auto-merge (squash) December 13, 2023 17:48
@ewanharris ewanharris merged commit fc6fe15 into main Dec 13, 2023
7 checks passed
@ewanharris ewanharris deleted the feat/mfa-auth-apis branch December 13, 2023 17:49
@ewanharris ewanharris mentioned this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support MFA APIs
3 participants