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

feat: support MFA via SMS #3682

Merged
merged 23 commits into from
Jan 26, 2024
Merged

feat: support MFA via SMS #3682

merged 23 commits into from
Jan 26, 2024

Conversation

jonas-jonas
Copy link
Member

@jonas-jonas jonas-jonas commented Jan 6, 2024

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

image

@jonas-jonas jonas-jonas self-assigned this Jan 6, 2024
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

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

Comparison is base (f1493c8) 78.31% compared to head (1e9e44e) 78.27%.

Files Patch % Lines
selfservice/strategy/code/strategy.go 84.50% 17 Missing and 5 partials ⚠️
selfservice/strategy/code/code_sender.go 58.82% 6 Missing and 1 partial ⚠️
courier/sms_templates.go 0.00% 5 Missing ⚠️
courier/template/sms/login_code_valid.go 77.77% 4 Missing ⚠️
cmd/clidoc/main.go 60.00% 2 Missing ⚠️
selfservice/strategy/code/strategy_login.go 97.43% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3682      +/-   ##
==========================================
- Coverage   78.31%   78.27%   -0.05%     
==========================================
  Files         347      347              
  Lines       23763    23769       +6     
==========================================
- Hits        18611    18605       -6     
- Misses       3749     3759      +10     
- Partials     1403     1405       +2     

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

@jonas-jonas jonas-jonas marked this pull request as ready for review January 15, 2024 12:17
Copy link
Contributor

@hperl hperl left a comment

Choose a reason for hiding this comment

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

This looks very good! I just had a question regarding the enable logic for the strategies. What I'd like to prevent is cases where with a new update suddenly some strategy is disabled that was previously enabled. The rest looks good!

courier/template/sms/login_code_valid.go Show resolved Hide resolved
courier/template/sms/login_code_valid.go Outdated Show resolved Hide resolved
driver/registry_default.go Show resolved Hide resolved
driver/registry_default.go Show resolved Hide resolved
driver/registry_default_test.go Show resolved Hide resolved
selfservice/flow/request.go Show resolved Hide resolved
Copy link
Contributor

@alnr alnr left a comment

Choose a reason for hiding this comment

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

Found just two nits, otherwise this looks OK to me.

Makefile Show resolved Hide resolved
courier/template/sms/login_code_valid.go Outdated Show resolved Hide resolved
@jonas-jonas jonas-jonas requested review from hperl and alnr January 18, 2024 09:53
hperl
hperl previously approved these changes Jan 19, 2024
Copy link
Contributor

@hperl hperl left a comment

Choose a reason for hiding this comment

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

LGTM!

driver/config/config.go Show resolved Hide resolved
identity/extension_credentials.go Outdated Show resolved Hide resolved
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Looks pretty good! A few more questions from my side

selfservice/flow/request.go Show resolved Hide resolved
selfservice/flow/request_test.go Show resolved Hide resolved
selfservice/strategy/code/strategy_login.go Show resolved Hide resolved
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Thinking over this, the code method should be explicitly enabled for MFA / first factor and not implicitly support both!

selfservice/strategy/code/strategy_login.go Show resolved Hide resolved
hperl
hperl previously approved these changes Jan 25, 2024
Copy link
Contributor

@hperl hperl left a comment

Choose a reason for hiding this comment

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

LGTM with small comments.

internal/testhelpers/selfservice_login.go Show resolved Hide resolved
selfservice/flow/login/extension_identifier_label.go Outdated Show resolved Hide resolved
selfservice/strategy/code/strategy.go Outdated Show resolved Hide resolved
selfservice/strategy/code/strategy.go Outdated Show resolved Hide resolved
zepatrik
zepatrik previously approved these changes Jan 26, 2024
@jonas-jonas jonas-jonas merged commit 1516cf6 into master Jan 26, 2024
29 checks passed
@jonas-jonas jonas-jonas deleted the jonas-jonas/mfaViaSMS branch January 26, 2024 16:01
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.

6 participants