Skip to content
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

Add ability to specify Access Key ID and Secret Key in setup endpoint #908

Closed
keimoon opened this issue Nov 10, 2020 · 4 comments · Fixed by #927
Closed

Add ability to specify Access Key ID and Secret Key in setup endpoint #908

keimoon opened this issue Nov 10, 2020 · 4 comments · Fixed by #927
Assignees
Labels
area/API Improvements or additions to the API

Comments

@keimoon
Copy link

keimoon commented Nov 10, 2020

We need this for integrating lakeFS with CI: an instance of lakeFS will be created before a build is run and be destroyed after that. Every time lakeFS is set up, it will create different set up Access Key ID / Secret Key so it is hard to inject those values to the test.

@arielshaqed
Copy link
Contributor

Could you expand on the use-case, please? I'm curious because I am not aware of many systems that allow injecting secrets into new users. E.g. with AWS I usually face a similar difficulty: either use pre-existing credentials or create new ones, extract those and use them.

We actually have code that does something similar in lakeFS. It runs as part of our system test "nessie". testutil.SetupTestingEnv shows how to create the first admin user and extract its credentials.

@keimoon
Copy link
Author

keimoon commented Nov 11, 2020

The way our CI is set up is to create database resources (postgres, ... ) first, then running tests in parallel later. All created database instances are bounded to a build, which is independent to each other. We also make sure all tests in a build are independent, stateless and should not rely on any initialization system, so configurations and credentials should be pre-determined. Other databases we are using (postgres, redis, ...) support some API to setup an account with pre-determined credential, while lakeFS does not. Of course I can use a hack to inject a key to lakeFS's postgres directly, but it is nice to have a higher level API instead.

@arielshaqed
Copy link
Contributor

Thanks for the clearly explaining a use-case! I usually think of it as an S3-like system, which does not offer this ability.
We would like to try to add this ability as an option to the existing command lakefs superuser (not lakectl, but lakefs...). Currently it creates access key ID and secret key, but we could inject those.
Note that some clients for AWS S3 (entirely unrelated to lakefs) might decide to validate access keys and secrets and enforce a particular format for them. Such clients might enforce particular formats for access keys and secrets.

@arielshaqed arielshaqed added the area/API Improvements or additions to the API label Nov 11, 2020
@arielshaqed
Copy link
Contributor

@keimoon also if you would prefer a more chat-based discussion format for questions that may come up, please join our community Slack. (Of course issues are a great way to ask for new features!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API Improvements or additions to the API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants