-
Notifications
You must be signed in to change notification settings - Fork 5.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
Use API Key in module artifactory download #58936
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
I've done a workaround for this issue locally based on the suggestion above. To avoid duplication I created a function like this:
There are 4 places this function need to be called, replacing the current incorrect logic, like this: Unfortunately I don't have the time to do a proper contribution just now, so I hope someone with the right environment setup can do this. |
I am commenting on this as also have run into this error. jfrog/artifactory has strongly pushed the use of service accounts for services, but unfortunately, the artifactory module does not work for api keys and salt throws an error of Invalid header value b'Basic |
Description of Issue
I try to download an artifact from artifactory but i got an "ValueError: Invalid header value".
It seems there is a format issue regarding the base64 encoding of the Authorisation header. The "\n" included by the hashutil.base64_encodestring, as said in salt.modules.hashutil.base64_encodestring doc, are not removed.
Setup
Create api key in artifactory
Target an existing artifact_id using username and api_key
Steps to Reproduce Issue
It can be fixed with this workaround:
Versions Report
Same version on master and minion.
The text was updated successfully, but these errors were encountered: