Skip to content
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

AbstractVaultTokenCredentialWithExpiration is broken for multi-cluster setup #260

Open
dee-kryvenko opened this issue Oct 4, 2022 · 1 comment
Labels

Comments

@dee-kryvenko
Copy link

Jenkins and plugins versions report

Latest

What Operating System are you using (both controller, and any agents involved in the problem)?

CentOS

Reproduction steps

Run

withVault(configuration: [
    "vaultCredentialId": "vault-aws-iam-role",
    "vaultUrl": "https://foo"
    ], vaultSecrets: [[
        "path": "secret/test",
        "secretValues": [[
            "envVar": "SECRET",
            "vaultKey": "foo"
        ]]
    ]]) {
    echo SECRET
}
withVault(configuration: [
    "vaultCredentialId": "vault-aws-iam-role",
    "vaultUrl": "https://bar"
    ], vaultSecrets: [[
        "path": "secret/test",
        "secretValues": [[
            "envVar": "SECRET",
            "vaultKey": "foo"
        ]]
    ]]) {
    echo SECRET
}

Expected Results

Should use and cache separate tokens

Actual Results

It is issuing and caching a token for https://foo and then until this token expires - it tries to use that token for https://bar as well as any other Vault cluster, and it obviously gets 403 in response.

Anything else?

No response

@dee-kryvenko
Copy link
Author

I have attempted to fix this by #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant