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.

          [JENKINS-32574] Support for Jenkins credential storage

          Evan Powell added a comment -

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

          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.

          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 .

          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.

          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".

          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/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/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.

          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

          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

          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

          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

          Evan Powell added a comment -

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

          Evan Powell added a comment - Global OAuth credentials are working great for me. Thank you for a great easy to use plugin!

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

              Created:
              Updated:
              Resolved: