• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None

      Hi,

      after Conjur Secrets plugin update we are unable to fetch any "Conjur Secret Username Credential" type of credentials from our Jenkins pipelines and they fail with an error (see attachment).

      I prepared a simple Jenkinsfile (see attachment) where I try to get a "Conjur Secret Credential" type and then a "Conjur Secret Username Credential" one. The first call is successful, the second one fails.

      When I downgrade plugin to version 1.0.4, everything works as expected (see console outputs in attachments).

      Could you please look into this issue? It prevents any future plugin upgrades or we would have to rewrite all our Jenkins pipelines and stop using "Conjur Username" credential type.

      Thank you.

        1. consoleLog-v1.0.4
          0.7 kB
        2. consoleLog-v1.0.8
          2 kB
        3. Jenkinsfile.txt
          0.6 kB

          [JENKINS-67268] Cannot use Conjur Secret Username Credential

          The latest plugin version 1.0.9 still does not work but a different error message is shown:

          ...

          java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found
          at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1325)
          at okhttp3.HttpUrl.get(HttpUrl.java:916)
          at okhttp3.Request$Builder.url(Request.java:165)
          at org.conjur.jenkins.api.ConjurAPI.getAuthorizationToken(ConjurAPI.java:111)
          at org.conjur.jenkins.credentials.CredentialsSupplier.get(CredentialsSupplier.java:61)
          at org.conjur.jenkins.credentials.CredentialsSupplier.get(CredentialsSupplier.java:32)
          at org.conjur.jenkins.credentials.CustomSuppliers$ExpiringMemoizingSupplier.get(CustomSuppliers.java:58)
          at org.conjur.jenkins.credentials.ConjurCredentialProvider.getCredentialsFromSupplier(ConjurCredentialProvider.java:94)
          at org.conjur.jenkins.credentials.ConjurCredentialProvider.getCredentials(ConjurCredentialProvider.java:71)
          at org.conjur.jenkins.credentials.ConjurCredentialProvider.getCredentials(ConjurCredentialProvider.java:51)
          at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:428)
          at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:545)
          at org.conjur.jenkins.conjursecrets.ConjurSecretCredentials.credentialFromContextIfNeeded(ConjurSecretCredentials.java:73)
          at org.conjur.jenkins.conjursecrets.ConjurSecretCredentials.credentialWithID(ConjurSecretCredentials.java:95)
          at org.conjur.jenkins.conjursecrets.ConjurSecretCredentials.getSecretFromCredentialIDWithConfigAndContext(ConjurSecretCredentials.java:128)
          at org.conjur.jenkins.conjursecrets.ConjurSecretUsernameCredentialsImpl.getPassword(ConjurSecretUsernameCredentialsImpl.java:134)
          at org.conjur.jenkins.conjursecrets.ConjurSecretUsernameCredentialsBinding.bind(ConjurSecretUsernameCredentialsBinding.java:73)
          at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution2.doStart(BindingStep.java:134)
          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)
          Finished: FAILURE

          Stanislav Bebej added a comment - The latest plugin version 1.0.9 still does not work but a different error message is shown: ... java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1325) at okhttp3.HttpUrl.get(HttpUrl.java:916) at okhttp3.Request$Builder.url(Request.java:165) at org.conjur.jenkins.api.ConjurAPI.getAuthorizationToken(ConjurAPI.java:111) at org.conjur.jenkins.credentials.CredentialsSupplier.get(CredentialsSupplier.java:61) at org.conjur.jenkins.credentials.CredentialsSupplier.get(CredentialsSupplier.java:32) at org.conjur.jenkins.credentials.CustomSuppliers$ExpiringMemoizingSupplier.get(CustomSuppliers.java:58) at org.conjur.jenkins.credentials.ConjurCredentialProvider.getCredentialsFromSupplier(ConjurCredentialProvider.java:94) at org.conjur.jenkins.credentials.ConjurCredentialProvider.getCredentials(ConjurCredentialProvider.java:71) at org.conjur.jenkins.credentials.ConjurCredentialProvider.getCredentials(ConjurCredentialProvider.java:51) at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:428) at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:545) at org.conjur.jenkins.conjursecrets.ConjurSecretCredentials.credentialFromContextIfNeeded(ConjurSecretCredentials.java:73) at org.conjur.jenkins.conjursecrets.ConjurSecretCredentials.credentialWithID(ConjurSecretCredentials.java:95) at org.conjur.jenkins.conjursecrets.ConjurSecretCredentials.getSecretFromCredentialIDWithConfigAndContext(ConjurSecretCredentials.java:128) at org.conjur.jenkins.conjursecrets.ConjurSecretUsernameCredentialsImpl.getPassword(ConjurSecretUsernameCredentialsImpl.java:134) at org.conjur.jenkins.conjursecrets.ConjurSecretUsernameCredentialsBinding.bind(ConjurSecretUsernameCredentialsBinding.java:73) at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution2.doStart(BindingStep.java:134) 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) Finished: FAILURE

            cyberark_bizdev Edward Nunez
            stanislav_bebej Stanislav Bebej
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: