@cynthia This is a good idea! Is this worthy of being an admin level setting, or just a global feature in GitLab that everyone would get? Is there a reason an admin would want unverified, unconfirmed user requests to sit there any longer than, say, 90 days?
@hsutor In the MVC, we can set it to 90 days, where the number of days is non-configurable if that's easier.
in .com we'd want it on, but for self-managed, I'd want to give them the choice. So, we should have something in the gitlab.rb config file, or an admin UI setting to turn it on/off, or feature flag it? I'd leave that up to the engineer to decide which way is best.
Is there any reason why we can't consider auto-deleting an unverified account in something less than 90 days for .com (say, 7 days)?
If the verification link expires in 24 hours, this will give the user a week to request a new confirmation email. Maybe we can also send a confirmation reminder with a new verification link 72 hours after the original one expires, or explicitly note in the confirmation email that their account will be deleted in 7 days if they fail to verify.
Is there any reason why we can't consider auto-deleting an unverified account in something less than 90 days for .com (say, 7 days)?
Is your suggestion to not make this configurable and just make it a general rule for GitLab.com?
If a user is provisioned but they never activate their account, and we delete the unconfirmed account, I assume the admin can provision a new one easily...but I'm just wondering if they'd understand what happened.
Probably easier than contacting GitLab support, though, to delete the unconfirmed user.
@hsutor We should definitely have a way for instances to turn it off and on but depending on effort, as a MVC, we considered not making the number of days configurable.
Ideally, you could turn it on/off and have the number of days configurable in the admin panel
If the verification link expires in 24 hours, this will give the user a week to request a new confirmation email. Maybe we can also send a confirmation reminder with a new verification link 72 hours after the original one expires, or explicitly note in the confirmation email that their account will be deleted in 7 days if they fail to verify.
This flow proposed by @izzyfee sounds good to me. 90 days seems like a very long time period to wait before deleting an unconfirmed/unverified user account. The above flow alerts the user enough about the upcoming action that is going to happen on their account after 7 days, if no action is taken from their side. 7 days also seems like a reasonable amount of time to wait before removing an unconfirmed/unverified user account.
We can make the number of days before account deletion configurable for an admin but I'm ok with defaulting to 7 days.
Whenever we work on this feature, we should also document this auto-deletion in 7 days behavior so users and admins are aware about it.
User created an account with an email typo which we cannot fixed for free users, so the user created a new account but he cannot use the former username and his company is using a specific username format.
As a robust and anti-abuse solution, I would suggest we add email verification before creating a user during the sign-up flow via the Web. That would resolve this issue and prevent malicious user behavior, where someone performs multiple sign-ups to reserve usernames/emails or something.
We won't be able to reuse implementation from !86352 (merged) since it requires the user to exist in the database. In our case, we want to create the user only after we can confirm that the email belongs to a person who registers a new account for that email.
We haven't discussed it, but here is the way I see it should work:
User opens /users/sign_up in their browser and fills the form:
The user presses the "Register" button
frontend performs Ajax request with the email mentioned in the form to backend
New backend endpoint generates a token tied to the email and sends that token to that email
Token should expire in 5 minutes
(?) We need to figure out where to store the token
@bdenkovych I agree with your proposal here as it would improve security as well. However I think this impacts the devopsgrowth team so I tagged their design manager for feedback as well.
@bdenkovych are you suggesting that this would replace confirmation emails?
The problem I would foresee with your proposal is that not everyone creates an account using the sign up form. They can use one of the OAuth options or be created via SAML/SCIM.
That's why my original proposal was to auto-delete accounts if unverified for a set number of hours/days.
@dmoraBerlin Thanks, I shared with the Growth team.
As a side note, I think we are seeing enough of these types of verification interactions to document these components and flow in Pajamas so we can implement them consistently when different teams work on them. @emilybauman WDYT? Have you already considered this?
As a side note, I think we are seeing enough of these types of verification interactions to document these components and flow in Pajamas so we can implement them consistently when different teams work on them. @emilybauman WDYT? Have you already considered this?
Thanks for the tag here @jackib - Just to confirm I'm on the same page, are we talking about documenting the anti-abuse verification work done with @jstava on the registration flow (email, phone number, credit card etc)? Or about something else. In this case, I have not thought to document anything yet, but it would probably be a good idea!
are you suggesting that this would replace confirmation emails?
@cynthia No, I see it as an additional guard during submitting sign-up form via the web only.
The problem I would foresee with your proposal is that not everyone creates an account using the sign up form. > They can use one of the OAuth options or be created via SAML/SCIM.
Does this issue exist for OmniAuth Providers? I assume that users can create GitLab account via any provider when they have confirmed their account on provider's side.
That's why my original proposal was to auto-delete accounts if unverified for a set number of hours/days.
Yes, the issue would remain for SAML/SCIM. Implementing auto-deletion of unverified accounts, is probably only way to handle this
If you agree, would it make the most sense to create a new issue for your proposal and we'll keep auto-deletion in this issue?
I do think your proposal is a good one, and we should implement it at some point.
@jackib - I currently have a Figma File that's acting as the SSOT for these type of flows. I can work with Foundations on if we should be writing up rules or anything about them if we think that's the next step forward.
@emilybauman Maybe you can make an issue in the design project to discuss. If the Foundations team decides that it's too early to add these to Pajamas we could just close it out without actioning.
For GitLab.com SaaS - this could come in handy, but there are risks involved. For example:
what would happen if an account has an unverified email but they log in to that account via OAuth on a daily basis?
would happen if we delete a user for having unconfirmed email, but it turns out that the confirmation email wasn't delivered due to an issue with our outbound email system?
how do we warn users that their account will be deleted unless they confirm their email?
who will handle inquiries/complaints about data that's been deleted deleted as part of a newly-implemented email confirmation requirement?
These are all really awesome questions and it got me thinking. Just a few comments from a support perspective:
what would happen if an account has an unverified email but they log in to that account via OAuth on a daily basis?
Is this possible? I always thought that a primary email always needed to be confirmed.
would happen if we delete a user for having unconfirmed email, but it turns out that the confirmation email wasn't delivered due to an issue with our outbound email system?
I wonder if it would make sense to exclude those users with a provisioned_by_group. For free users, we do have automation that is built in that would automatically remove suppressions. If we did set this to 7 days, I think that would be reasonable even for a free user.
how do we warn users that their account will be deleted unless they confirm their email?
Good idea, do we have reminder emails for confirmations? Maybe that is something that should be considered before implementing any actions. I'm 100% for anything that is more user friendly. It would be harmful if users just found out we deleted their accounts immediately without any obvious indication that we would do so.
who will handle inquiries/complaints about data that's been deleted deleted as part of a newly-implemented email confirmation requirement?
I think the best way to scope this would be to only delete unverified and unconfirmed users that have 1. Never logged in and 2. Do not have data (Not a part of any projects or groups). That should be easy to validate and would be the safest first iteration IMO.
@greg thanks for the questions. On SaaS, we would need to be careful if we ever decide to turn "soft" confirmation email back on, but I don't see that happening anytime soon, so until then, you cannot do anything with the account until it's confirmed/verified.
We can add a warning in the email when this feature is on, as well as on the "you'll need to confirm your email first" screen.
As to complaints about deletions: if the account is never confirmed and has no data aside from what was included in the registration form, and users are warned, I'm not sure what valid complaint there is? It's fairly standard for companies to delete unconfirmed accounts after a set number of days (I've even seen 24 hours), so that bots or malicious users cannot prevent legitimate users from signing up.
If the issue is that emails aren't getting delivered, then I don't see auto deletion after 7 days to change how we currently handle those cases.
I wonder if it would make sense to exclude those users with a provisioned_by_group
If the account has no data, no activity, and it's associated with an unverified email, I don't see a problem with deleting their account data.
It's the edge cases I'm worried about.
Has email verification always been a requirement for GitLab.com accounts? If not, what happened to accounts that were created before email verification became a requirement once we made it a requirement?
What about accounts created via OAuth? If one uses Twitter OAuth to creates and login to an account, do we still require a verified email?
Do all users with unconfirmed emails have no activity? If not, how many active GitLab.com users have an unconfirmed email?
Yes, accounts always have to be confirmed before using it.
Specifically for .com, we should definitely pull a report before we let the system do any runs on it. There are two cases where accounts may have some data or contributions tied to it:
Created during the "soft confirmation" email period. Confirmation was required to continue using GitLab after 2-3 days.
Security issue where we had to set some (70?) user accounts to unconfirmed, roughly 3 years ago.
Premium customer had the need to delete two accounts provisioned by mistake. This could not be done by regular means as the provisioned email addresses were not valid. This functionality would have automatically cleaned up the accounts without user/support intervention. See Support Ticket (Internal)
@bdenkovych starting a new thread for weighing this issue assuming we go with auto-deletion.
My guess is:
frontend 1: Editing wording on confirmation screen and/or confirmation email
backend 3: Add auto-deletion behind feature flag; query .com to ensure we wouldn't be deleting any accounts with data (depending on the outcome of this, I could see the weight increasing)
How much more weight would it add if we want the number of hours/days configurable? preferably UI or API or both
frontend 1: Editing wording on confirmation screen and/or confirmation email
, I would suggest adding the note about auto-deletion of unverified users somewhere on https://docs.gitlab.com/ too.
backend 3: Add auto-deletion behind feature flag; query .com to ensure we wouldn't be deleting any accounts with data (depending on the outcome of this, I could see the weight increasing)
The first idea that comes to my mind is to create a new cron job for that. That job would be executed once an hour 0 * * * *. In that job, we would iterate through unconfirmed users that were created_at more than 7 days ago and perform Users::DestroyService for those.
I would agree that this work reflects the weight 3.
We allow the configuration of some of the cron workers via config/gitlab.yml, which then can be modified via charts or omnibus. I think we should keep this consistent.