2022-03-30: 2FA failing due to "Invalid Pin"
Incident DRI
- Anthony Fappiano
Current Status
We have identified an issue where various users are incorrectly receiving "Invalid PIN" errors while authenticating. As of 2022-03-31 the problem has been identified and a fix has been put in place.
Summary for CMOC notice / Exec summary:
- Customer Impact: Users who were members of a group with 2FA enforcement enabled were unable to setup new TOTP authenticators.
- Service Impact: ServiceWeb
- Impact Duration: 2022-03-29T13:41:53Z to 2022-03-31T20:10:00Z (54 hours 29 minutes)
- Root cause: A background request redirect to the 2FA settings page caused the OTP secret displayed to the user on the 2FA settings page to differ from the OTP secret associated with the user in the database (#6728 (comment 896521407))
Timeline
Recent Events (available internally only):
- Deployments
- Feature Flag Changes
- Infrastructure Configurations
- GCP Events (e.g. host failure)
- Gitlab.com Latest Updates
All times UTC.
2022-03-29
-
13:41
-mr_attention_requests
was first enabled in production (https://gitlab.com/gitlab-com/gl-infra/feature-flag-log/-/issues/10326)
2022-03-30
-
18:04
- @greg declares incident in Slack. -
18:23
- On the incident zoom, various participants share potential changes that could have introduced this behavior but they are all ruled out as the investigation continues. -
18:30
- @afappiano reaches out for assistance from the auth team. -
18:59
- We try draining canary but are still able to reproduce the problem. This rules out an MR that had been identified as problematic. -
20:00
- Ruled out this MR as the timing does not match with the errors we're seeing. -
20:34
- Identified a ticket with matching error message from 2022-Feb-15. This indicates the issue has likely been ongoing longer than 48 hours. Current theory is the increase in errors resulted from increased 2FA registration due to the recent Okta breach. -
21:10
- Issue can be reproduced in Prod, Staging and Dev environments, but not GDK. We are currently looking into the difference between installed versions and architecture running in each environment. -
21:38
- @serenafang created an MR to log an error message when the problem occurs. Error message:OTP validation failed: invalid OTP code
-
22:40
- incident severity is downgraded to S3 to allow deployments to continue. However, we're still treating the incident as an S2 for the purposes of investigation and mitigation.
2022-03-31
-
19:04
-mr_attention_requests
feature flag is disabled in staging as attempted mitigation (https://gitlab.com/gitlab-com/gl-infra/feature-flag-log/-/issues/10389) -
19:42
- Confirmed the cause as a new front request related tomerge requests requiring attention
. Details in comment below. -
20:16
- Disabled the FF formerge requests requiring attention
in Production. (https://gitlab.com/gitlab-com/gl-infra/feature-flag-log/-/issues/10390) -
20:23
- Internal testing succeeds, incident is updated IncidentMitigated -
21:18
- No further external reports of 2FA errors. Status page updated toResolved
.
2022-04-01
-
08:50
- Opened MR to fix GraphQL controller, see gitlab-org/gitlab!84151 (merged).
2022-04-05
-
06:52
- Opened MR to fix the flaky test which covers 2FA login flow, see gitlab-org/gitlab!84346 (merged). -
10:44
- MR to fix GraphQL concern for 2FA was merged - gitlab-org/gitlab!84151 (merged)
Create related issues
Use the following links to create related issues to this incident if additional work needs to be completed after it is resolved:
- Support contact request
- Corrective action
- Investigation followup
- Confidential issue
- QA investigation
- Infradev
Takeaways
- ...
Corrective Actions
Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.
-
Use separate
EnforcesTwoFactorAuthentication
middleware for theGraphqlController
- MR to fix this issue is opened gitlab-org/gitlab!84151 (merged)
- Refactor 2FA login flaky scenario (gitlab-org/gitlab!84346 - merged)
Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.
Click to expand or collapse the Incident Review section.
Incident Review
-
Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary -
If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section -
Fill out relevant sections below or link to the meeting review notes that cover these topics
Customer Impact
-
Who was impacted by this incident? (i.e. external customers, internal customers)
- ...
-
What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
- ...
-
How many customers were affected?
- ...
-
If a precise customer impact number is unknown, what is the estimated impact (number and ratio of failed requests, amount of traffic drop, ...)?
- ...
What were the root causes?
- ...
Incident Response Analysis
-
How was the incident detected?
- ...
-
How could detection time be improved?
- ...
-
How was the root cause diagnosed?
- ...
-
How could time to diagnosis be improved?
- ...
-
How did we reach the point where we knew how to mitigate the impact?
- ...
-
How could time to mitigation be improved?
- ...
-
What went well?
- ...
Post Incident Analysis
-
Did we have other events in the past with the same root cause?
- ...
-
Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
- ...
-
Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
- ...
What went well?
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)