Class SauceCredentials.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<com.cloudbees.plugins.credentials.Credentials>
com.cloudbees.plugins.credentials.CredentialsDescriptor
hudson.plugins.sauce_ondemand.credentials.SauceCredentials.DescriptorImpl
All Implemented Interfaces:
Saveable, Loadable, OnMaster, IconSpec
Enclosing class:
SauceCredentials

@Extension public static class SauceCredentials.DescriptorImpl extends com.cloudbees.plugins.credentials.CredentialsDescriptor
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<com.cloudbees.plugins.credentials.Credentials>
    • doCheckApiKey

      @POST public FormValidation doCheckApiKey(@AncestorInPath Item item, @QueryParameter String value, @QueryParameter String username, @QueryParameter String dataCenter)
      Validates a Sauce Labs username / access key pair against the Sauce Labs accounts API.

      Only administrators (system credentials store) or users allowed to configure the ancestor item (folder store, or the inline "Add credentials" dialog of a job) may trigger the outbound request. Everybody else silently gets FormValidation.ok(), so the endpoint cannot be used as a credentials oracle. Restricted to POST so it cannot be triggered by following a link (SECURITY-3770).

      Parameters:
      item - the ancestor item, or null for the system / user credentials stores
      value - the access key to validate
      username - the Sauce Labs username
      dataCenter - the Sauce Labs data center name, defaults to US_WEST
      Returns:
      the validation result
    • getIconClassName

      public String getIconClassName()
      Specified by:
      getIconClassName in interface IconSpec
      Overrides:
      getIconClassName in class com.cloudbees.plugins.credentials.CredentialsDescriptor