You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add option to provide signed token to verify key ownership
Currently we will only allow a key to be matched to a user if it matches
an activated email address. This PR provides a different mechanism - if
the user provides a signature for automatically generated token (based
on the timestamp, user creation time, user ID, username and primary
email.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Copy file name to clipboardExpand all lines: options/locale/locale_en-US.ini
+6-1
Original file line number
Diff line number
Diff line change
@@ -524,7 +524,12 @@ ssh_key_been_used = This SSH key has already been added to the server.
524
524
ssh_key_name_used = An SSH key with same name already exists on your account.
525
525
ssh_principal_been_used = This principal has already been added to the server.
526
526
gpg_key_id_used = A public GPG key with same ID already exists.
527
-
gpg_no_key_email_found = This GPG key is not usable with any email address associated with your account.
527
+
gpg_no_key_email_found = This GPG key is not usable with any email address associated with your account. It may still be added if you sign the provided token.
528
+
gpg_invalid_token_signature = The provided GPG key, signature and token do not match or token is out-of-date.
529
+
gpg_token = You must provide a signature for the following token: '%s'. You can generate a signature with:
530
+
gpg_token_code = echo "%s" | gpg -a --default-key %s --detach-sig
531
+
gpg_token_signature = Armored GPG signature
532
+
key_signature_gpg_placeholder = Begins with '-----BEGIN PGP SIGNATURE-----'
ctx.Error(http.StatusNotFound, "GPGNoEmailFound", fmt.Sprintf("None of the emails attached to the GPG key could be found. It may still be added if you provide a valid signature for the token: %s", token))
206
+
casemodels.IsErrGPGInvalidTokenSignature(err):
207
+
ctx.Error(http.StatusUnprocessableEntity, "GPGInvalidSignature", fmt.Sprintf("The provided GPG key, signature and token do not match or token is out of date. Provide a valid signature for the token: %s", token))
0 commit comments