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

Update pom.xml for vault-java-driver 4.0.0 #23

Conversation

jedidiahB
Copy link
Contributor

Updated BetterCloud's vault-java-driver from 3.1.0 to 4.0.0. The latest driver now supports Hashicorp Vault 1.0 and important features: KV v2 and namespaces.

I ran mvn test against this after updating to 4.0.0, and there were no errors.

Updated BetterCloud's vault-java-driver from 3.1.0 to 4.0.0.  The latest driver now supports Hashicorp Vault 1.0 and important features: KV v2 and namespaces.
@jedidiahB jedidiahB changed the title Update pom.xml Update pom.xml for vault-java-driver 4.0.0 Feb 11, 2019
@jedidiahB
Copy link
Contributor Author

Hi @ptierno ! Can I get this reviewed?

@ptierno
Copy link
Contributor

ptierno commented Feb 15, 2019

@jedidiahB reviewing this today. so long as it works without issue and works with some other PR's I am reviewing then I will be pushing a release today or tomorrow.

@ptierno ptierno self-requested a review February 15, 2019 13:50
@ptierno ptierno self-assigned this Feb 15, 2019
@ptierno ptierno merged commit dce413e into jenkinsci:master Feb 15, 2019
@jedidiahB
Copy link
Contributor Author

@ptierno Thanks for the super fast response!

@gswallow
Copy link

gswallow commented Feb 25, 2019

This broke for us. It's worthy to note that we're using Vault 0.11.3 (yes, we need to upgrade).

Code that we were running in Jenkins:

  stage("Sync"){
    def configuration = [$class: 'VaultConfiguration',
                          vaultUrl: 'https://vault.company.com',
                          vaultCredentialId: 'jenkins-vault-token']

    def secretValues = [
      [$class: 'VaultSecretValue', envVar: "Username", vaultKey: "username" ],
      [$class: 'VaultSecretValue', envVar: "Password", vaultKey: "password" ]
    ]

    def secrets = [
      [$class: 'VaultSecret', path: "secret/mgmt/xxx/svc-account", secretValues: secretValues]
    ]

    wrap([$class: 'VaultBuildWrapper', configuration: configuration, vaultSecrets: secrets]) {
       sh "do stuff"
    }
  }

Results:

java.lang.NullPointerException
	at com.bettercloud.vault.api.Logical.read(Logical.java:73)
	at com.datapipe.jenkins.vault.VaultAccessor.read(VaultAccessor.java:52)
	at com.datapipe.jenkins.vault.VaultBuildWrapper.provideEnvironmentVariablesFromVault(VaultBuildWrapper.java:136)
	at com.datapipe.jenkins.vault.VaultBuildWrapper.setUp(VaultBuildWrapper.java:89)
	at org.jenkinsci.plugins.workflow.steps.CoreWrapperStep$Execution2.doStart(CoreWrapperStep.java:97)
	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Installed from PR-20 and we cannot reproduce this problem.

@antonmos
Copy link

antonmos commented Jun 4, 2019

i ran in to the same problem as @gswallow , also using old vault version 0.9.0

@Starfight
Copy link

I have the same problem of NullPointerException with last snapshot of hashicorp-vault-plugin with Vault v1.1.0.

@oleg-nenashev
Copy link
Member

Just to add some context, this change has not been released yet. A release with update would be much appreciated, because currently there is a binary conflict between thus plugin and Jenkins Configuration as Code: jenkinsci/configuration-as-code-plugin#922 . OTOH it looks like there are still issues in the master branch :(

CC @ptierno

@jetersen
Copy link
Member

perhaps we should combine efforts and put the vault java driver into an API plugin to avoid class loading issues?

@oleg-nenashev
Copy link
Member

@ndeloof was against having more plugin dependencies in JCasC. I am fine with doing so if needed, but maybe we should consider just moving Vault Secret Source support from JCasC to this plugin

@timja
Copy link
Member

timja commented Jul 30, 2019

I've always wondered if hashicorp vault support should be moved out to another plugin anyway.

either configuration-as-code-hashi-vault-plugin
or this one

@jetersen
Copy link
Member

jetersen commented Jul 30, 2019

I'm okay with moving it, what do you think @ptierno

@jetersen
Copy link
Member

jetersen commented Aug 7, 2019

Released in v2.3.0

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

Successfully merging this pull request may close these issues.

None yet

8 participants