-
Notifications
You must be signed in to change notification settings - Fork 145
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
folder-scoped approle is not utilized when retrieving folder-scoped credentials #124
Comments
I have this issue as well. I want to use a Jenkins controller with only a global vault id for retrieving elements that are allowed to be accessed by anyone. For instance the retrieval of Jenkins Templating Engine libraries. But all folder or job specific configuration will have its own authorised access groups. So I would like to use the vault id (approle) for retrieving the job specific secrets. Especially necessary for centrally managed Jenkins controllers. But the documentation suggests that the expected behaviour is that the vault url and id of the job scope should overrule the global scope when retrieving job specific secrets. |
@zubcevic Right. It seems that the plugin would need to implement One alternative might be to have multiple jenkins masters/controllers and then move folders to be at the root per each master instance. Seems a little bit too cumbersome that way but that could work. The underlying problem seems to be that the folder/job level vault creds can only be retrieved inside of a pipeline execution instead of being used as part of its configuration. So you just can't use folder/job creds to pull the Jenkinsfile itself but you can use folder/job creds while the Jenkinsfile is executing. |
I agree we need the same kind of solution as for aws and azure secrets. |
The problem is we have two ways of accessing vault secrets during a build, one is folder aware the other is not.
The problem is those calling into hashicorp-vault-plugin/src/main/java/com/datapipe/jenkins/vault/VaultBuildWrapper.java Lines 237 to 250 in 005818d
Although I agree this plugin would be better implemented as a |
Hi guys, @jetersen can you help me on that ? Thanks, |
@hchakrouun You don't need permission to this repo. You will fork the repo and submit a pull request. https://docs.github.com/en/get-started/quickstart/contributing-to-projects |
Observed:
When a folder is configured to use a specific approle (different from the globally configured approle) the credentials which are also scoped to the folder (used for SCM checkout) are retrieved through the global approle instead of the one which the folder is configured to use.
To reproduce:
FAILED to retrieve username key: java.lang.RuntimeException: com.datapipe.jenkins.vault.exception.VaultPluginException: Key folder_specific_key could not be found in path secret/folder/credentials
This seems to prevent the ability to use per-folder approle / credentials for pipeline checkouts.
The text was updated successfully, but these errors were encountered: