-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
s3_secret_access_key does not allow slashes #1607
Comments
@PabloCastellano you should encode the URL. Try Like below
FYR: Check the comment here https://github.com/weaveworks/common/blob/master/aws/config.go#L16 |
Nice digging @adityacs. I do think we should have nicer error handling for this (or transparently handle this case) |
I can confirm that URL encoding the character works. In my opinion there should be better error handling or at least the documentation should warn you. I can provide a PR for documentation if you think this is useful |
Definitely! Feel free to stop by #loki-dev on grafana.slack.com if you have any questions. |
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
@PabloCastellano are you still available to add some documentation around this, that would be very helpful! |
Still active in 2.4.2 |
I just ran across this myself. I ended up calling a URL-encoding function from here in order to set my secret key to |
Sometimes we need to store just escaped URL in the config like S3 URL that contains credentials which can include characters like `:` and `/`. Currently we cannot use normal `flagext.URLValue` as it just uses unescaped URL. Please check issue grafana/loki#1607
Fixes: #1607 Introduced this type in another PR grafana/dskit#265
@kavirajk do you want to reopen your PR for fixing this? |
Facing this while deploying Loki Helm Chart using AWS CDK as IaC tool. The S3 key is created on the fly, and there is no way to URL-encode it before supplying to Loki on deploy-time, unfortunately. Looking forward to seeing the url-encode performed on Loki's side. Cheers. |
Describe the bug
Loki fails to start when an s3 bucket is configured as storage and the secret key contains a slash. I have generated a different access key pair whose secret key doesn't contain a slash character and it works fine.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Loki should correctly parse the secret key and don't interpret it as a port
Environment:
Screenshots, Promtail config, or terminal output
The text was updated successfully, but these errors were encountered: