-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.389
HTTP Request Plugin Version 1.16
Authenticate with secret-text credentials as follows
def response = httpRequest(url: apiUrl, authentication: 'benipeled-test-httpRequest-secret-key', consoleLogResponseBody: true)
Fail with the following non-exists msg
16:12:39 java.lang.IllegalStateException: Authentication 'benipeled-test-httpRequest-secret-key' doesn't exist anymore 16:12:39 at jenkins.plugins.http_request.HttpRequestExecution.<init>(HttpRequestExecution.java:239) 16:12:39 at jenkins.plugins.http_request.HttpRequestExecution.from(HttpRequestExecution.java:163) 16:12:39 at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:394) 16:12:39 at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:383) 16:12:39 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 16:12:39 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 16:12:39 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 16:12:39 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 16:12:39 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 16:12:39 at java.base/java.lang.Thread.run(Thread.java:829) 16:12:39 Finished: FAILURE
I see it comes from [0] but I'm not sure why auth == null in this case
[JENKINS-70718] Support secret text credentials in the http request plugin
Description |
Original:
Authenticate with secret-text credentials as follows
def response = httpRequest(url: apiUrl, authentication: 'benipeled-test-httpRequest-secret-key', consoleLogResponseBody: true) Fail with the following non-exists msg ``` 16:12:39 java.lang.IllegalStateException: Authentication 'benipeled-test-httpRequest-secret-key' doesn't exist anymore 16:12:39 at jenkins.plugins.http_request.HttpRequestExecution.<init>(HttpRequestExecution.java:239) 16:12:39 at jenkins.plugins.http_request.HttpRequestExecution.from(HttpRequestExecution.java:163) 16:12:39 at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:394) 16:12:39 at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:383) 16:12:39 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 16:12:39 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 16:12:39 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 16:12:39 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 16:12:39 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 16:12:39 at java.base/java.lang.Thread.run(Thread.java:829) 16:12:39 Finished: FAILURE ``` I see it comes from [0] but I'm not sure why auth == null in this case [0] https://github.com/jenkinsci/http-request-plugin/blob/master/src/main/java/jenkins/plugins/http_request/HttpRequestExecution.java#L223-L253 |
New:
Authenticate with secret-text credentials as follows
def response = httpRequest(url: apiUrl, authentication: 'benipeled-test-httpRequest-secret-key', consoleLogResponseBody: true) Fail with the following non-exists msg {code:java} 16:12:39 java.lang.IllegalStateException: Authentication 'benipeled-test-httpRequest-secret-key' doesn't exist anymore 16:12:39 at jenkins.plugins.http_request.HttpRequestExecution.<init>(HttpRequestExecution.java:239) 16:12:39 at jenkins.plugins.http_request.HttpRequestExecution.from(HttpRequestExecution.java:163) 16:12:39 at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:394) 16:12:39 at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:383) 16:12:39 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 16:12:39 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 16:12:39 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 16:12:39 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 16:12:39 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 16:12:39 at java.base/java.lang.Thread.run(Thread.java:829) 16:12:39 Finished: FAILURE {code} I see it comes from [0] but I'm not sure why auth == null in this case [0] [https://github.com/jenkinsci/http-request-plugin/blob/master/src/main/java/jenkins/plugins/http_request/HttpRequestExecution.java#L223-L253] |
Summary | Original: [httpRequest plugin] authenticate with secret-text fail | New: Support secret text credentials in the http request plugin |
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |
The message may be poorly phrased for this context. I suspect it should say something like "The secret text credential type is not supported by the http request plugin, use the username / password credential type".
Could you create a username / password credential type and try the same operation?