When a user visits https://gitlab.com/-/profile/personal_access_tokens, the feed token and incoming email token is displayed on screen by default. This is not good from a security perspective. If a user is screen sharing, on a webcast, or a nefarious person is overlooking their screen, the onlookers can immediately get their tokens.
Proposal
Passwords and tokens should be hidden by default and a user should have to click a button to reveal the token or password. This approach would prevent accidental disclosure.
@hsutor I agree this is a good security feature to have. It was already discussed on this MR and @peterhegman opened a couple of follow-up issues to address this.
From what I can tell, there is not a design pattern for this yet in Pajamas. If we add this as a component into Pajamas, we could probably resolve this in a couple of places all at once. #338242
@sethgitlab@peterhegman is there a need to see the token? We had a similar issue (I can't find it at the moment) where we added the download/copy code button for a similar use case.
@dmoraBerlin technically no need as long as you can copy the token but I think it improves the UX to be able to show/hide the token. This is a pattern I have seen in a lot of other applications.
I think you are probably thinking of #332844 (closed). In the end we didn't add the download button because of security concerns. We just hid the secret and displayed a copy button. But we created #338242 as a follow-up to add show/hide functionality
@peterhegman thanks for linking those issues, I couldn't find them but I think this parallels them perfectly. I think this proposal makes sense, especially as we will do the same in those related issues.
@hsutor an update on this one since we are getting close to the end of the milestone. This is in maintainer review, but it is also behind a feature flag so I am not 100% sure if we will be able to get it merged and default the feature flag to on before the cutoff (usually around the 17th). I will keep you updated on progress in the next couple of days.
Yep, still not totally sure if this will make it into the self-managed release. We generally like to enable feature flags on gitlab.com for at least a day before enabling it for the self-managed release. So, assuming there are no issues, I will open a MR tomorrow to enable it for the self-managed release. If that get's merged before the %14.6 cutoff (generally around the 17th) then it will make it into the release. I will keep you posted!