-
Notifications
You must be signed in to change notification settings - Fork 2
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
Identifying users (Confirm a phone number) #25
Comments
We have updated our guidance on identifying users. Most of it is around authentication - https://home-office-digital-patterns.herokuapp.com/patterns/identifying-users |
Few short observations about doing two factor authentication (I was writing this down for someone anyway so thought I might as well put it here). By text messageFront-load the code in the text messageDo this:
Not
Call it a ‘security code’This is friendlier than ‘2FA’ or ‘two factor’. I think Verify use this wording this as well. Question how long the code needs to be6 digits seems to be standard for authenticator apps. 4 or 5 feels way easier to transpose from one place to another. Anecdotally people with dyslexia find long codes troublesome. By emailIf using email for quasi-two-factor authentication make it a tokenised link, not a code that people have to copy/paste. |
Is it acceptable for the page content to omit the number of digits? |
@quis we followed your guidance for authentication by email. We send the user a token link that expires in 24 hours. If they click on the link, they get access to our form and then we destroy the token. However, some users are having problems. Our users work in organisation. These organisations have security policies or infrastructure that we don't have control over. When the users click on the link, the website says something along the lines of "this link has been already used or it's invalid please make a new request". If the user copy and paste the link instead of clicking it then it actually works We are considering the following options:
We'd be interested in your advice or anyone else's |
@sulthan-ahmed we have seen the same problem occasionally, but haven’t got round to fixing it yet. There’s a story in our backlog here: https://www.pivotaltracker.com/story/show/158630655
If it’s one particular organisation you’re dealing with maybe you can get their IT team to turn this behaviour off? |
Super stuff @quis thanks for the rapid response. Ahh useful to know the background
Also we never thought of the solutions you suggested. That's very helpful. Question what do you mean by the last two bullets
|
I see your the comments in the pivottracker about discounting the options |
The user has to click a button on the page they get from the email link This would change the flow from:
To:
javascript redirect (with fallback to button/link) Same as above, but Javascript ‘clicks’ the button for the user, if it’s available. This is working on the assumption that things like virus scanners won’t be running Javascript. |
Here is an idea that came from our Test manager, Chris Long
|
@sulthan-ahmed that sounds like a neat solution if you have that subsequent page anyway. |
yeah we do @quis thanks for bouncing the idea off with us. I think it's kind of similar to the approach you said |
@quis user tested and it looks like it went well. All positive reactions. We are planning to go live next week. I'll keep you updated with what our users say |
On GOV.UK Notify we recently came across this problem and came up with a solution so thought I'd share. ProblemFor people that sign in with username and password and use text message 2fa (often with a personal phone number), there’s no way for us to know if they still have access to their inbox. This means people can leave an organisation, have their email account closed, but if the team doesn’t remove them from the Notify account, they’ll still have access forever. That’s not good. SolutionSo we should periodically send people that use text message 2fa an email, so that we can confirm the email account is still valid and they have access. It’s not foolproof, but it’s a good backup measure. When someone is logging in and they: are on text message 2fa AND ‘validated’ includes password changed at (which is also updated when you first create your account) and these re-validations - so we’ll need to store a date of last validation against a user and bump it each time either of these events happens. Then we show them an explanatory screen and send them a re-validation email after they enter the text message 2fa code. Until they click the token in the email, they can’t do anything. They could log on again to trigger another re-validation email (not locked out or anything). |
DWP are using SMS authentication via their DWP Authenticate service (see blog post): |
Posting this on behalf of a user:
It would be good to know if other teams have been advised to do this by their security or IT teams. |
It's a common issue that gets brought up. It does seem to go against this guidance: https://www.ncsc.gov.uk/blog-post/let-them-paste-passwords And I'm pretty sure most password managers in browsers or addons just ignore it anyway.
From Firefox's docs |
I can see that discussion from hmrc/design-patterns#117 was moved here, but I don't see any progress. I am stucked getting the |
@mptorz Could you please contact us through email or Slack so that we can see if there is a way to redirect your query? |
How long should a 2fa code be valid for before it expires. Here I am thinking about the case of a user requesting a code on a web page and then receiving that code on their mobile (which may be a separate device) and then needing to enter that code into the web page and click submit before their code has been considered expired. 2fa SMS codes are currently valid for 30 minutes on GOV.UK Notify. We sometimes get people advocating for shorter time, as low as say 60 seconds, likely for the reasons of 'security'. I believe the accessibility regulations would require us to take an estimate of how long a user without accessibility needs may need to do the task and then times that number by 10 to give extra time to those with accessibility needs. At a finger in the air estimate, a user without accessibility needs after receiving the code may need as much as 30-60 seconds to locate the code, enter the code and click submit, meaning that we would likely suggest a minimum of 5-10 minutes. This doesn't take into account any time spent between the code being generated and it arriving on the users phone which will often be within a minute but could sometimes be longer. The situation should also be considered if the code is sent via a different channel such as email (my hypothesis is that you need slightly longer to navigate and log in to your email account then you would to get to your text messages). The minimum amount of time a code should be valid for may differ dependant on the service but if any guidance/pattersn are produced on this, I would like to see a minimum and/or suggested time validity :) |
Gov Wifi team have added TOTP for their MFA |
Adding this great blog post from Sulthan Ahmed in Home Office: https://hodigital.blog.gov.uk/2020/10/20/passwords-are-a-pain-in-the/ |
Minor suggestion - formatting of the guidance for error messages. I also thought using the word Say and single quotes makes it look cluttered. It wasn't until a 3rd look that I realised the full stops are part of the punctuation for the guidance, and not mistakenly included in the error message text. I think the reading layout could be improved. AS IS: Say ‘You’ve not entered enough numbers, the code must be 5 numbers’. If the user enters too many digits: Say ‘You’ve entered too many numbers, the code must be 5 numbers’. If the user enters non-numeric characters, other than spaces: Say ‘The code must be 5 numbers’. TO BE: You’ve not entered enough numbers, the code must be 5 numbers If the user enters too many digits: You’ve entered too many numbers, the code must be 5 numbers If the user enters non-numeric characters, other than spaces: The code must be 5 numbers |
What does this mean: if 2 hours ago... I don't understand what this means below in the guidance where it says if the 15 minute code has expired, but it is correctly entered more than 2 hours later ' show an incorrect security code message even if the code was correct'. What error message would make sense to the user here, other than, it has expired? Am I missing something? Thank you in advance. Copy and pasted from the guidance: Give a time limit of 15 minutes for the user to enter the code — the code should expire after this time limit. If the user enters an expired code that was sent more than: 15 minutes ago, show a ‘code has expired’ error message and send the user a new code |
@Catherine-Gilhooly it sounds like it's just saying you shouldn't display a "your code has expired" message if the period of time that has elapsed since the code was sent is more than two hours. Instead, if this much time has passed, then just display an "incorrect error code" message. |
Thanks @haynes-dev |
What
Provide a secure service by accurately identifying users. Includes guidance on:
Why
Anything else
The text was updated successfully, but these errors were encountered: