-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use the access key for the fleetshard-sync AWS auth on the local dev environment #1095
Conversation
ffd7fde
to
cfe28bd
Compare
cfe28bd
to
53a43b0
Compare
53a43b0
to
f1a4360
Compare
|
||
sess, err = session.NewSession(cfg) | ||
func newRdsClient() (*rds.RDS, error) { | ||
sess, err := session.NewSession() |
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.
Did I understand correctly, that by using this it will automatically use:
AWS_ACCESS_KEY
andAWS_SECRET_ACCESS_KEY
if setAWS_ROLE_ARN
andAWS_WEB_IDENTITY_TOKEN_FILE
if set- return an error if no successful authentication was possible?
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.
Yes, correct.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johannes94, kovayur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
It turned out that the static key or jwt loaded from the OAuth identity provider is not suitable for the local development, because:
As a result, fleetshard-sync can't start locally with
MANAGED_DB_ENABLED=true
We are forced to use the access key for this special case, as it is most convenient. It will also help in addressing the concerns raised in #1078.
The change in
rds.go
will make the configuration loadable from environment variables, allowing the auth type to be switched. In the case of dev environments, the access key will be used. In other cases the token will remain.I also added the support of the access key to the helm chart to use it on the dev environment in the future.
Checklist (Definition of Done)
Test manual
ROX-12345: ...
Test manual
helm template
./dev/env/scripts/up.sh
./dev/env/scripts/exec_fleetshard_sync.sh