-
-
Notifications
You must be signed in to change notification settings - Fork 168
feat: implement initial root API token management #470
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind the "hack-ish" approach, but some other thoughts:
- The documentation should have a warning about how this could be insecure.
- A change like this needs an acceptance test to make sure the script actually works.
- I would also like to see a test that it doesn't run the script twice - it shouldn't the way it is written now, but it would be good to have for the future.
Integer[0] $token_ttl_minutes, | ||
Stdlib::AbsolutePath $token_file_path, | ||
|-%> | ||
# This scripts creates an initial root token and stores it to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about a shebang line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's executed through the Gitlab Rails Runner, so it shouldn't need one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add comment there to reduce confusion :)
This PR implements somehow hack-ish, but the only possible way to create an initial root API token during the Gitlab installation. This allows to start managing Gitlab resources via API immediately after it is installed.
While I understand how bad it looks, I guess the benefits are big enough..