Let users upload their OpenPGP public key, and serve WKD response #205
2 Participants
Notifications
Due Date
No due date set.
Depends on
#207 Encrypt all system emails for users with PGP key
kosmos/akkounts
Reference: kosmos/akkounts#205
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/191-gpg_keys_wkd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This changeset allows users to upload their PGP key on the Account settings page. Valid keys are immediately imported to the server's GnuPG keychain. If the key contains the user's account address in one of it's UIDs, then it will be served via the
.well-known
Web Key Directory endpoint.See commit messages for details.
closes #191
I think I forgot to add the policy endpoint. Will mark it as WIP again, but it's ready to review.
Edit: never mind. The spec is rather vague about it, but it only seems to be necessary if the server supports the submission part of the protocol. And I found at least one major implementation (keys.openpgp.org) that I'm almost certain uses the wrong URL for it, too. Sent a request to the authors to clarify.
Edit 2: Already got a reply. I read it wrong, just needs to be an empty response for us. The spec doesn't specify specific status codes, but obviously 404 shouldn't count. Also, that other server is using the wrong URI for sure.
Let users upload their OpenPGP public key, and serve WKD responseto WIP: Let users upload their OpenPGP public key, and serve WKD responseWIP: Let users upload their OpenPGP public key, and serve WKD responseto Let users upload their OpenPGP public key, and serve WKD responseLet users upload their OpenPGP public key, and serve WKD responseto WIP: Let users upload their OpenPGP public key, and serve WKD responseWIP: Let users upload their OpenPGP public key, and serve WKD responseto Let users upload their OpenPGP public key, and serve WKD response@greg @galfert Could one of you have a quick glance over the code here? I'd like to open the follow-up PR with encryption of notification emails...
Looks good to me.
Left one question on the web key endpoint.
@ -0,0 +18,4 @@
respond_to do |format|
format.text do
response.headers['Content-Type'] = 'text/plain'
render plain: @user.pgp_pubkey
Are any user emails other than the Kosmos address cleared somewhere in the process or are they exposed here?
Found this in the spec under "Security Considerations":
Good catch. Currently, it offers whatever key is uploaded in its entirety, i.e. including any UIDs that do not contain the user's account address. I'll open a new issue for it, since it's a bit of an edge case IMO.
@galfert Thanks! I added a new issue to address the spec violation you found.
This one still depends on #207 to be merged...