Secret key should be display once #506

Closed
opened 2023-02-14 20:16:11 +00:00 by jpds · 1 comment
Contributor

The secret key part of the credentials pair should be displayed only at creation, and then hashed in the DB, never to be displayed to a user thereafter.

This is how AWS handles these too: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html

The secret key part of the credentials pair should be displayed only at creation, and then hashed in the DB, never to be displayed to a user thereafter. This is how AWS handles these too: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
Owner

The signature scheme of AWS requires that the servers knows the same secret as the client, this is how HMAC works. It's not a public key cryptography system. So we can't hash it in DB, that won't work.

We could show the secret only on creation, but then if it's still in db, an admin can technically see it any time by looking at the right place. So rather than pretending to be secure by hiding the fact that we have the secret, I think it's clearer for the users as it is currently.

We can still discuss whether displaying the secret key should be done only when a flag is passed on the CLI (for example), that would make sense.

The signature scheme of AWS requires that the servers knows the same secret as the client, this is how [HMAC](https://en.wikipedia.org/wiki/HMAC) works. It's not a public key cryptography system. So we can't hash it in DB, that won't work. We could show the secret only on creation, but then if it's still in db, an admin can technically see it any time by looking at the right place. So rather than pretending to be secure by hiding the fact that we have the secret, I think it's clearer for the users as it is currently. We can still discuss whether displaying the secret key should be done only when a flag is passed on the CLI (for example), that would make sense.
quentin added the
kind
ideas
label 2023-03-13 14:18:10 +00:00
lx added this to the v0.9 milestone 2023-06-14 08:48:20 +00:00
lx closed this issue 2023-06-14 15:23:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#506
No description provided.