-
Notifications
You must be signed in to change notification settings - Fork 909
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
Get api key in chocolateyinstall.ps1 script #3101
Comments
If you are using a binary store (which it sounds like you have) then you need to ensure there are no required credentials. |
If I understand correctly, binary stores need to be password protected (or other authentication required) due to organizational requirements. So @romandolinsky is using headers to add support for authentication to
The problem with using However, I think it would be possible to store credentials in One downside with using |
Yes we have nugget and bin repo in cloud. For cloud authentication for nugget repo we can use choco apikey but for authentication inside script(bin repo) we must store apikey in install script. Which can be possible security risk. For that reason we want have only one location for setting apikeys. |
I understand the use case. I was pointing to the docs to confirm Chocolatey CLI doesn't support binary stores with authentication. |
Yes I understand. Main goal for me is get credentials from stored apikeys. Is function possible ? Or how may I decode stored credentials/apikeys in config file? |
It's not possible to get credentials from stored API keys. Stored API keys are used by Chocolatey CLI and not for external use. |
If we were to add a feature for accessing the API keys, then its use case would be for organizations, and therefore it would be a Licensed feature. I've opened chocolatey/chocolatey-licensed-issues#346 for this and will close this issue just now. We can always re-open it later. |
Checklist
Is Your Feature Request Related To A Problem? Please describe.
I cannot download package related files from some repository protected by password without storing "apikeys" in scripts or package parameters.
Missing function for chocolateyinstall.ps1 to get already defined api keys.
When I want to download file from eg. artifactory I must store apikey in script.
or use package parameters which are necessary always set.
Describe The Solution. Why is it needed?
Reason why:
Developers in companies often use protected repos, not only for packages but also for data downloaded during package installation(transferring big data). Funcion will avoid storing apikeys in script or always add apikeys like package parameters.
"One source of information / better credentials handling"
Example how solution/feature can work.
Define apikey for repo
choco apikey -s "https://<domain>.com/" -k='X-JFrog-Art-Api:AKCp5dK4oN.....'
In helpers have
get-apikey
script and in chocolateyinstall.ps1 call "get-apikey function"and use that for downloading file
or like header
Additional Context
No response
Related Issues
No response
The text was updated successfully, but these errors were encountered: