Skip to content

Add support for creating child tokens for token credential binding#338

Open
bluesliverx wants to merge 3 commits intojenkinsci:masterfrom
bluesliverx:master
Open

Add support for creating child tokens for token credential binding#338
bluesliverx wants to merge 3 commits intojenkinsci:masterfrom
bluesliverx:master

Conversation

@bluesliverx
Copy link
Copy Markdown
Contributor

@bluesliverx bluesliverx commented Sep 17, 2024

Fixes #339

@bluesliverx bluesliverx changed the title Simplify VaultTokenCredentialBindingIT Support creating child tokens for token credential binding Sep 19, 2024
@bluesliverx bluesliverx changed the title Support creating child tokens for token credential binding Add support for creating child tokens for token credential binding Sep 19, 2024
}

protected static List<String> generatePolicies(String policies, EnvVars envVars) {
public static List<String> generatePolicies(String policies, EnvVars envVars) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to use this method in the vault token credential binding code.

}
}

final class VaultAuthorizationResult {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class was needed to return the actual token from authorizeWithVault instead of requiring another call to Vault to lookup the token after the fact (since it is unretrievable from a configured Vault class instance).

@bluesliverx
Copy link
Copy Markdown
Contributor Author

bluesliverx commented Sep 19, 2024

@jetersen could I get a review here? This should be ready now. We'll start using in production tomorrow via a local build, but in my tests in a stage Jenkins environment this is working as expected.

Cancel that, I found at least one issue in our prod environment, looking into it now.

@bluesliverx
Copy link
Copy Markdown
Contributor Author

@jetersen this is ready for review now. We've been using this in our prod environment for at least a week now and it has been very stable (and has correctly limited access when child tokens are enabled).

@bluesliverx
Copy link
Copy Markdown
Contributor Author

@jetersen any chance I can get a review here?

@bluesliverx
Copy link
Copy Markdown
Contributor Author

@jenkinsci/hashicorp-vault-plugin-developers Could I get a review possibly? This has been sitting for a couple of months. We've been using it in production with no issues.

@basil
Copy link
Copy Markdown
Member

basil commented Apr 2, 2025

Hi @bluesliverx, this plugin doesn't seem to be actively maintained. You can adopt it following the instructions here:

https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VaultTokenCredentialBinding should create child tokens if limited policies are configured

2 participants