Groovy API reference

CredentialProvider

4 minute readReference

createCredentialProvider

Create a new credential provider.

Arguments

Argument NameTypeDescription

projectName

String

Name of the project that the credential provider belongs to. (Required)

credentialProviderName

String

Unique name of the credential provider within the project. (Required)

accountName

String

Applicable for 'cyberark' provider type. Name of the account where the passwords will be retrieved from.

applicationId

String

Applicable for 'cyberark' provider type. Unique application ID that is defined in the vault.

authMethodsMapping

String

Applicable for 'hashicorp' provider type. Mapping in JSON format for authentication methods (for example, \{"approle":"some_approle_mapping", "userpass":"some_userpass_mapping"}).

cyberarkProvider

String

Applicable for 'cyberark' provider type. The CyberArk credential provider type or the access provider to use.

cyberarkSafe

String

Applicable for 'cyberark' provider type. Name of the safe where the passwords will be retrieved from.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

keyPassword

String

Applicable for 'cyberark' provider type. Password for the key.

namespace

String

Applicable for 'hashicorp' provider type. The namespace within the Vault Enterprise instance to use.

password

String

Applicable for 'cyberark' and 'hashicorp' provider types. Password for the connection to the server.

providerType

String

Credential provider type.

roleId

String

Applicable for 'hashicorp' provider type. RoleID of the role used by the AppRole authentication mechanism within Vault.

secretEnginePath

String

Applicable for 'hashicorp' provider type. Path at which the specified secret engine is enabled.

secretEngineType

String

Applicable for 'hashicorp' provider type. Name of the secret engine.

secretId

String

Applicable for 'hashicorp' provider type. SecretID used by the AppRole authentication mechanism.

serverUrl

String

Applicable for 'cyberark' and 'hashicorp' provider types. URL for connecting to the credential provider.

store

String

Applicable for 'cyberark' provider type. PKCS 12 storage with certificates and keys for connection to the server.

storePassword

String

Applicable for 'cyberark' provider type. Password for the store.

testConnection

Boolean

Whether the connection to the credential provider should be tested before saving the configuration. Defaults to true.

testSecret

String

Applicable for 'cyberark CCP' provider type. Test secret to test the connection for a CCP credential provider type.

token

String

Applicable for 'hashicorp' provider type. Token for the connection to the HashiCorp Vault server.

useResponseWrapping

Boolean

If true, the secretID will be unwrapped before saving. Defaults to false.

userName

String

Applicable for 'cyberark' and 'hashicorp' provider types. User name for the connection to the server.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.createCredentialProvider(
                projectName: 'test-projectName',
                credentialProviderName: 'test-credentialProviderName'
                /* optional arguments */)

deleteCredentialProvider

Delete a credential provider.

Arguments

Argument NameTypeDescription

projectName

String

Name of the project that the credential provider belongs to. (Required)

credentialProviderName

String

Unique name of the credential provider within the project. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteCredentialProvider(
                projectName: 'test-projectName',
                credentialProviderName: 'test-credentialProviderName')

getCredentialProvider

Retrieve a credentialPprovider by name.

Arguments

Argument NameTypeDescription

projectName

String

Name of the project that the credential provider belongs to. (Required)

credentialProviderName

String

Unique name of the credential provider within the project. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getCredentialProvider(
                projectName: 'test-projectName',
                credentialProviderName: 'test-credentialProviderName')

getCredentialProviders

Retrieve all credential providers in a project.

Arguments

Argument NameTypeDescription

projectName

String

Name of the project that the credential provider belongs to. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getCredentialProviders(
                projectName: 'test-projectName')

modifyCredentialProvider

Modify a credential provider.

Arguments

Argument NameTypeDescription

projectName

String

Name of the project that the credential provider belongs to. (Required)

credentialProviderName

String

Unique name of the credential provider within the project. (Required)

accountName

String

Applicable for 'cyberark' provider type. Name of the account where the passwords will be retrieved from.

applicationId

String

Applicable for 'cyberark' provider type. Unique application ID that is defined in the vault.

authMethodsMapping

String

Applicable for 'hashicorp' provider type. Mapping in JSON format for authentication methods (for example, \{"approle":"some_approle_mapping", "userpass":"some_userpass_mapping"}).

cyberarkProvider

String

Applicable for 'cyberark' provider type. The CyberArk credential provider type or the access provider to use.

cyberarkSafe

String

Applicable for 'cyberark' provider type. Name of the safe where the passwords will be retrieved from.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

keyPassword

String

Applicable for 'cyberark' provider type. Password for the key.

namespace

String

Applicable for 'hashicorp' provider type. The namespace within the Vault Enterprise instance to use.

newName

String

New name for an existing object that is being renamed.

password

String

Applicable for 'cyberark' and 'hashicorp' provider types. Password for the connection to the server.

providerType

String

Credential provider type.

roleId

String

Applicable for 'hashicorp' provider type. RoleID of the role used by the AppRole authentication mechanism within Vault.

secretEnginePath

String

Applicable for 'hashicorp' provider type. Path at which the specified secret engine is enabled.

secretEngineType

String

Applicable for 'hashicorp' provider type. Name of the secret engine.

secretId

String

Applicable for 'hashicorp' provider type. SecretID used by the AppRole authentication mechanism.

serverUrl

String

Applicable for 'cyberark' and 'hashicorp' provider types. URL for connecting to the credential provider.

store

String

Applicable for 'cyberark' provider type. PKCS 12 storage with certificates and keys for connection to the server.

storePassword

String

Applicable for 'cyberark' provider type. Password for the store.

testConnection

Boolean

Whether the connection to the credential provider should be tested before saving the configuration. Defaults to true.

testSecret

String

Applicable for 'cyberark CCP' provider type. Test secret to test the connection for a CCP credential provider type.

token

String

Applicable for 'hashicorp' provider type. Token for the connection to the HashiCorp Vault server.

useResponseWrapping

Boolean

If true, the secretID will be unwrapped before saving. Defaults to false.

userName

String

Applicable for 'cyberark' and 'hashicorp' provider types. User name for the connection to the server.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.modifyCredentialProvider(
                projectName: 'test-projectName',
                credentialProviderName: 'test-credentialProviderName'
                /* optional arguments */)