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: delegate SMS code generation, sending and verification to an external service (PS-221) #4113

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

splaunov
Copy link
Contributor

Phone/sms registration and login flows are vulnerable to sms pumping attacks.
This PR allows to delegate all the key steps of the flow to an external service which is able to detect sms pumping and throttle requests.

Related issue(s)

Checklist

  • [x ] I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • [x ] I am following the
    contributing code guidelines.
  • [x ] I have read the security policy.
  • [x ] 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
    security@ory.sh) from the maintainers to push
    the changes.
  • [x ] I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@CLAassistant
Copy link

CLAassistant commented Sep 19, 2024

CLA assistant check
All committers have signed the CLA.

@aeneasr
Copy link
Member

aeneasr commented Sep 19, 2024

Looks like your branch and master have divereged. We recently merged improvements to SMS which probably cause the conflicts.

@splaunov
Copy link
Contributor Author

Yes, we are a bit behind the master.
I can rebase it. But it only makes sense if you are about to accept this feature.
What would be your stance on this?

@aeneasr
Copy link
Member

aeneasr commented Sep 19, 2024

The problem described is definitely something we should consider. Regarding the approach, I'm not sure if I fully understand how it works, but it does look a bit "strapped on" from first glance, with hardcoded values and some other things, which make me question if it wouldn't be better to use hooks and transient payloads for example.

aeneasr and others added 4 commits October 28, 2024 10:01
This patch adds the ability to verify Android APK origins used during WebAuthn/Passkey exchange.

Upgrades go-webauthn and includes fixes for Go 1.23 and workarounds for Swagger.
commit 6a60bf9
Author: splaunov <splaunov@gmail.com>
Date:   Mon Nov 25 19:45:36 2024 +0300

    feat: in code login flow send identity not found sms (PS-572)

commit f13a642
Author: maoanran <anma@monta.com>
Date:   Fri Sep 6 10:41:47 2024 +0200

    feat: do not retry on 429 responses from external verification service (PS-405)

commit 602d716
Author: splaunov <splaunov@gmail.com>
Date:   Wed Mar 27 12:00:49 2024 +0300

    feat: delegate SMS code generation, sending and verification to an external service (PS-221)

    ignore: respond 400 when code is invalid (PS-307)

    ignore: accept all http codes from 200-300 range

    ignore: add `body` parameter to request config schema (PS-221)

    feat: delegate SMS code generation, sending and verification to an external service - registration flow (PS-262)

    feat: delegate SMS code generation, sending and verification to an external service - login flow (PS-263)

    feat: delegate SMS code generation, sending and verification to an external service - verification flow (PS-221)
@maoanran maoanran force-pushed the feature/feat-ps-221 branch from 6a60bf9 to 36e139e Compare March 14, 2025 14:58
@maoanran maoanran requested a review from a team as a code owner March 14, 2025 14:58
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.

4 participants