Add Demonstrating Proof of Possession (DPoP) for Personal Access Tokens
- Jul 05, 2024
-
-
Ameya Darshan authored
-
- Jun 04, 2024
-
-
Ameya Darshan authored
-
- May 23, 2024
-
-
Ameya Darshan authored
-
This MR initiates the implementation of sender-constrained access tokens designed to minimise the risk of token leaks. I am putting this feature behind a feature flag.
Related to Sender constraining personal access tokens (#425130).
Currently this feature works only for RSA keys. Support for other algorithms will be added later.
For frontend:
bin/rails db:migrate
Feature.enable(:dpop_authentication, User.first)
User.first.dpop_enabled
and also on the frontend on refreshing the page.For backend:
glab
from this branch.glab
generate a DPoP header: bin/glab auth dpop-gen --pat "glpat-PAT" --private-key ~.ssh/id_rsa
curl http://localhost:3000/api/v4/projects --header "Private-Token: glpat-PAT" --header "DPoP: <GLAB OUTPUT HERE>"