-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
a jenkins pipeline
Hello,
in our jenkins pipeline we use parameters to allow the user to select different credentials.
parameters { credentials(name: 'AWX_CREDENTIAL_SELECTED', description: 'AWX Credential', defaultValue: 'awx-token', credentialType: "Secret Text", required: false)}
This also allow to use the "List user credentials" checkbox when we launch the job with "Build with Parameters" (work fine with a Global credential).
So we can use "user credential" token to override AWX_CREDENTIAL_SELECTED, that allow us to know who launch the AWX job.
But that seems the ansible tower plugin don't have access to this credential because we got this error :
ERROR: Unable to lookup job template Unable to find job template: Auth is required for this call but no auth info exists
I suspect the TowerInstallation.getCredsList don't have access to user credentials.
Maybe we need the ansible tower plugin also list credentials with UserCredentialsProvider in getCredsList ? Credential documentation
This is a problem to make this plugin production ready for auditability in AWX
Best regards
[JENKINS-65013] Ansible Tower Plugin - Have access to User credentials
Description |
Original:
Hello,
in our jenkins pipeline we use parameters to allow the user to select different credentials. {code:java} parameters { credentials(name: 'AWX_CREDENTIAL_SELECTED', description: 'AWX Credential', defaultValue: 'awx-token', credentialType: "Secret Text", required: false)}{code} This also allow to use the "List user credentials" checkbox when we launch the job with "Build with Parameters" (work fine with a Global credential). So we can use "user credential" token to override AWX_CREDENTIAL_SELECTED, that allow us to know who launch the AWX job. But that seems the ansible tower plugin don't have access to this credential because we got this error : {code:java} ERROR: Unable to lookup job template Unable to find job template: Auth is required for this call but no auth info exists{code} I suspect the *TowerInstallation.getCredsList* don't have access to user credentials. Maybe we need the ansible tower plugin also list credentials with UserCredentialsProvider in getCredsList ? [Credential documentation|https://javadoc.jenkins.io/plugin/credentials/com/cloudbees/plugins/credentials/UserCredentialsProvider.UserCredentialsProperty.html#getCredentials-java.lang.Class-] This is a problem to make this plugin production ready for auditability Best regards |
New:
Hello,
in our jenkins pipeline we use parameters to allow the user to select different credentials. {code:java} parameters { credentials(name: 'AWX_CREDENTIAL_SELECTED', description: 'AWX Credential', defaultValue: 'awx-token', credentialType: "Secret Text", required: false)}{code} This also allow to use the "List user credentials" checkbox when we launch the job with "Build with Parameters" (work fine with a Global credential). So we can use "user credential" token to override AWX_CREDENTIAL_SELECTED, that allow us to know who launch the AWX job. But that seems the ansible tower plugin don't have access to this credential because we got this error : {code:java} ERROR: Unable to lookup job template Unable to find job template: Auth is required for this call but no auth info exists{code} I suspect the *TowerInstallation.getCredsList* don't have access to user credentials. Maybe we need the ansible tower plugin also list credentials with UserCredentialsProvider in getCredsList ? [Credential documentation|https://javadoc.jenkins.io/plugin/credentials/com/cloudbees/plugins/credentials/UserCredentialsProvider.UserCredentialsProperty.html#getCredentials-java.lang.Class-] This is a problem to make this plugin production ready for auditability in AWX Best regards |