Hi. I have a question about the change email flow ...
# ory-network
l
Hi. I have a question about the change email flow via Account/Profile settings. Seeing that it is vulnerable to account enumeration (responds with
An account with the same identifier (email, phone, username, ...) exists already.
), what protections, rate limits, detection mechanisms does Ory Network have in place to prevent a user from abusing this?
c
For what it's worth, you can probably override / replace this message in the settings.after webhook 😎
l
True, but the message text doesn’t really matter. If we don’t update the user’s email, then it would signal that email is already in use anyway.
c
Fair - how do you suggest to solve it? Just update the email anyways? 😛
l
In our current system, we just send an email to the new email. The user has to click a link in the email to actually trigger the change.
c
So what does the email say if the identifier (ie, the email address) already exists? It's not a bad solution, it's kinda smart
l
And the app just displays, “You’ll receive an email with further instructions”.
You can also automatically verify the account since you’d need to be able to access the email to approve the change.
c
Yeah, makes sense
l
Hi. Is it possible for someone from the Ory team to comment on my original question? Thanks.
s
there is some settings, i.e. you have to require verification and there is an option to enable sending a login attempt email but there is still some limitations: https://github.com/ory/kratos/issues/133
l
We have the “Attempted verification notifications” turned on. I guess I am more interested in what the rate limits are and how Ory enforces it? We can live with some enumeration as long as it can’t be abused.
s
we are still working on refining those request specific rate-limits, but we have abuse detection & prevention through cloudflare, as well as global rate-limits, which already works very well what specific scenarios are you envisioning? I'd suggest you try the attack you need to be protected from, and see how well it works we're happy to take it from there and adjust the rate-limiting
👍 1
l
The scenario would just be someone repeatedly calling the following endpoint, https://www.ory.sh/docs/reference/api#tag/frontend/operation/updateSettingsFlow, and searching for a
An account with the same identifier (email, phone, username, ...) exists already. (4000007)
error.
I suppose we could do some logging in a webhook on our end to try and detect abuse as well.
s
this case will typically be handled by cloudflare very well, but we could set stricter rules for the endpoint if we see the need
l
Thanks.