Skip to content

add an URL to get user's GPG key

What does this MR do?

This patch adds an URL to get user's GPG key, namely /:username.gpg . This is comparable to SSH key's /:username.key .

GitLab already supports signing commits, but it's not complete because you cannot verify the sign without public keys. With this patch, you can easily get someone's GPG key and verify signed commits.

You can import GPG key directly from this URL.

$ gpg --fetch-keys https://<base_url>/<user>.gpg

This is my first MP so please point out if I'm doing something wrong.

FYI GitHub has already implemented this feature.

Risk: This feature exposes user data without authentication. However because the data is public key, it is generally safe.

See also: !42288 (merged) , !43332 (merged)

Screenshots (strongly suggested)

I have 3 GPG keys

image

and it returns verified keys only.

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by κeen

Merge request reports