Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32574

Support for Jenkins credential storage

    XMLWordPrintable

Details

    Description

      Rather than configuring each build with an API key and secret, we should be able to globally configure a key and secret as a credential in Jenkins. This should be used by default for every build, with the option to override under an 'Advanced' button.

      Attachments

        Activity

          epowell Evan Powell created issue -
          epowell Evan Powell made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Major [ 3 ]

          Hi epowell you are right, I'll start working on this issue today but I've no experience working with the jenkins builtin credentials, do you?

          flagbit Antonio Mansilla added a comment - Hi epowell you are right, I'll start working on this issue today but I've no experience working with the jenkins builtin credentials, do you?
          flagbit Antonio Mansilla made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          epowell Evan Powell added a comment -

          Unfortunately I don't. I've got a copy of this plugin's source and have taken a look for other similar plugins, but I haven't gotten very far and I'm pressed for time this week.

          Thanks for looking into this! I'm afraid I can't be very helpful in the near future.

          epowell Evan Powell added a comment - Unfortunately I don't. I've got a copy of this plugin's source and have taken a look for other similar plugins, but I haven't gotten very far and I'm pressed for time this week. Thanks for looking into this! I'm afraid I can't be very helpful in the near future.
          epowell Evan Powell added a comment -

          Looks like there is an existing plugin that may help: https://wiki.jenkins-ci.org/display/JENKINS/OAuth+Credentials

          epowell Evan Powell added a comment - Looks like there is an existing plugin that may help: https://wiki.jenkins-ci.org/display/JENKINS/OAuth+Credentials

          Hi again epowell finally I got Jenkins credentials to be supported and it will be released in next plugin version, see pull request.

          flagbit Antonio Mansilla added a comment - Hi again epowell finally I got Jenkins credentials to be supported and it will be released in next plugin version, see pull request .
          sagayd Sagayaraj David added a comment - - edited

          Antonio, when the Active directory is integrated with more than 1 domain, the API token is not working. But cleartext password is working with API invocation. Please fix this as well

          In Access Control Security Realm, you choose Active Directory and input values with subdomain.domain1.com,subdomain.domain2.com.

          sagayd Sagayaraj David added a comment - - edited Antonio, when the Active directory is integrated with more than 1 domain, the API token is not working. But cleartext password is working with API invocation. Please fix this as well In Access Control Security Realm, you choose Active Directory and input values with subdomain.domain1.com,subdomain.domain2.com.

          Hi sagay_d could you provide mor information, I did't understand what do you mean with "when the Active directory is integrated with more than 1 domain, the API token is not working".

          flagbit Antonio Mansilla added a comment - Hi sagay_d could you provide mor information, I did't understand what do you mean with "when the Active directory is integrated with more than 1 domain, the API token is not working".

          Code changed in jenkins
          User: Antonio Mansilla
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java
          src/main/java/org/jenkinsci/plugins/bitbucket/api/BitbucketApi.java
          src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/config.jelly
          src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/global.jelly
          http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/125a9ed98a418e194e4c0981e5514e6cbeb231c7
          Log:
          [Fix JENKINS-32574] Replace job key and secret by jenkins credential storage

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Mansilla Path: pom.xml src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java src/main/java/org/jenkinsci/plugins/bitbucket/api/BitbucketApi.java src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/config.jelly src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/global.jelly http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/125a9ed98a418e194e4c0981e5514e6cbeb231c7 Log: [Fix JENKINS-32574] Replace job key and secret by jenkins credential storage

          Code changed in jenkins
          User: Antonio Mansilla
          Path:
          README.md
          pom.xml
          src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java
          src/main/java/org/jenkinsci/plugins/bitbucket/api/BitbucketApi.java
          src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/config.jelly
          src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/global.jelly
          src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/help-credentialsId.html
          src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/help-globalCredentialsId.html
          http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/faae72c4f1cbd72552955376c479e23649fa6e00
          Log:
          Merge pull request #12 from Flagbit/add-credentials-management

          JENKINS-32574 Add credentials management

          Compare: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/compare/d73ec91ad424...faae72c4f1cb

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Mansilla Path: README.md pom.xml src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java src/main/java/org/jenkinsci/plugins/bitbucket/api/BitbucketApi.java src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/config.jelly src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/global.jelly src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/help-credentialsId.html src/main/resources/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier/help-globalCredentialsId.html http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/faae72c4f1cbd72552955376c479e23649fa6e00 Log: Merge pull request #12 from Flagbit/add-credentials-management JENKINS-32574 Add credentials management Compare: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/compare/d73ec91ad424...faae72c4f1cb

          Antonio,
          In Access Control Security Realm, you choose Active Directory and input values with subdomain.domain1.com,subdomain.domain2.com. In this case, API token is not working, but cleartext password seems to be working.

          sagayd Sagayaraj David added a comment - Antonio, In Access Control Security Realm, you choose Active Directory and input values with subdomain.domain1.com,subdomain.domain2.com. In this case, API token is not working, but cleartext password seems to be working.

          Hi sagay_d sorry but I'm testing the plugin with a clean jenkins installation and I can't find any section in the jenkins configuration or credentials where appears something like "Access Control Security Realm" or "Active Directory". I guess that is because you have some additional plugins installed.

          I will set this issue as resolved as the basic credential management is supported and already merged to be released in the next plugin version. So I'd wait until the next release, test it again with the new plugin version and in case the problem is still persisting please create a new issue and provide more information about your setup like jenkins version, plugins involved...

          Thank you very much for your colaboration

          flagbit Antonio Mansilla added a comment - Hi sagay_d sorry but I'm testing the plugin with a clean jenkins installation and I can't find any section in the jenkins configuration or credentials where appears something like "Access Control Security Realm" or "Active Directory". I guess that is because you have some additional plugins installed. I will set this issue as resolved as the basic credential management is supported and already merged to be released in the next plugin version. So I'd wait until the next release, test it again with the new plugin version and in case the problem is still persisting please create a new issue and provide more information about your setup like jenkins version, plugins involved... Thank you very much for your colaboration
          flagbit Antonio Mansilla made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          sagayd Sagayaraj David added a comment - - edited

          Hello Antonio,

          Yes we had to install Active Directory plugin. Enable Security. In the security database, we have different options to choose from including Jenkins Own Database and Active Directory. When we have choosen Active Directory and the value is single domain lik domainname.com, the API calls via scripted clients like wget http://jenkins.domain.com/api/xml. it is working good. However when we two+ domains in the domain field of Active Directory, the API token is not recognized in the scripted client calls. Reponds with authentication failure

          If this belongs to different section, can you please create a ticket and track it

          sagayd Sagayaraj David added a comment - - edited Hello Antonio, Yes we had to install Active Directory plugin. Enable Security. In the security database, we have different options to choose from including Jenkins Own Database and Active Directory. When we have choosen Active Directory and the value is single domain lik domainname.com, the API calls via scripted clients like wget http://jenkins.domain.com/api/xml . it is working good. However when we two+ domains in the domain field of Active Directory, the API token is not recognized in the scripted client calls. Reponds with authentication failure If this belongs to different section, can you please create a ticket and track it
          epowell Evan Powell added a comment -

          Global OAuth credentials are working great for me. Thank you for a great easy to use plugin!

          epowell Evan Powell added a comment - Global OAuth credentials are working great for me. Thank you for a great easy to use plugin!
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 168224 ] JNJira + In-Review [ 198378 ]

          People

            flagbit Antonio Mansilla
            epowell Evan Powell
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: