Implement an optional two-factor-like authentication mechanism #617
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement
Currently, when a peer key is delivered to the user, it will never expire unless an administrator sets an expiry date manually or disables it. This could become tedious to manage and unfortunately doesn't protect the system whenever a peer key is stolen and reused by a malicious actor.
This feature adds an additional layer, requiring users to re-authenticate to the WG-portal UI (supposedly made public) at regular intervals, guaranteeing that when a peer key is stolen, the malicious actor won't be able to connect after some time unless they are also in possession of the users credentials (either local or LDAP/SSO), and without any manual action from an administrator.
Related Issue
N/A this is a new feature.
Proposed Changes
two_factor_lifetime, which controls the time after which the peer expires. In the backend this connects directly into the existing "expiration" mechanism, so that minimal code changes are requiredChecklist
git commit --signoffmake testmake helm-docs