-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSS Admin - rotate credentials #8444
Comments
@talSofer need a better understanding of the requirements. Do we need to rotate or replace the admin creds? |
@talSofer I'd like to add to Itai's question some context: We have replace credentials already, it's just not documented but pretty straight forward (and easy!). Rotate does not exist and it means allowing 2 pairs of credentials and allowing users to essentially rotating them on the fly and gradually replacing for clients using one or the other. A note about lost credentials: we don't have a way of overriding credentials unless you delete the user but, to delete the user you need the credentials (so essentially you're locked out). I think this is an acceptable tradeoff in terms of security. Otherwise anyone with access to lakeFS server binary will be able to replace the user. With that in mind, when I created the issue I wasn't aware of replace. WDYT? |
@Isan-Rivkin thanks for elaborating on this.
|
Delete User > Recreate # Authentication request
1. lakectl auth users delete --id admin
# Non-Authenticated request optional: pass accessKeyID+secretKeyID
2. lakefs superuser --user-name admin
Here's the possible situations (If Lost secret key ID: Nothing you can do locked out):
There's a BUG discovered now by me and @yonipeleg33: # deleted the previous user - as expected
lakectl auth users delete --id admin
# no more users now, pass only key-id, code allows:
lakefs superuser --user-name whatever --access-key-id <SOME-KEY-ID>` In such case you'll get locked-out of the server (CC @N-o-Z please keep me honest). 1. lakectl: try auth.CreateUser # succeeds since no users exist
2. lakectl: if accessKey != "" -> call auth.AddCredentials
3. auth service: run importUserCredentials() # fails because listUserCredentials fails.
4. resulting in error "no credentials found for user" |
Edit: I didn't notice @Isan-Rivkin already commented, so my comment is basically a duplicate of his: #8444 (comment)
No, you can (and should) replace both access and secret keys using the method shown above. Note that this operation is risky; Between running (1) and (2) you are in a state where you don't have any user. @talSofer Please advise on how to proceed from here.
|
@Isan-Rivkin and @yonipeleg33 thanks for explaining things clearly.
I agree with how you are suggesting to proceed. |
The problem
Currently in when using OSS (No ACL) there is no sane way on how to rotate the single admin credentials.
In cases of credentials leak or lost there one would need to rotate those credentials, without this option it's hard to rely on the server for long term.
Expected new behavior
Introduce (and document) a way rotating credentials.
To be clear, there's is single user - rotate those credentials (i.e
admin
with a single set of creds).Can reuse
$lakefs superuser
and in the backend allow setting credentials.The text was updated successfully, but these errors were encountered: