Interface CredentialsExportService

All Known Implementing Classes:
CredentialsExportServiceImpl

@ExperimentalApi public interface CredentialsExportService
Since:
5.15
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Iterable<Path>
    Export all shared credentials to default location in Bamboo home dir.
    @NotNull Iterable<Path>
    exportCredentials(@NotNull CredentialsData credentialsData)
    Export a shared credential to default location in Bamboo home dir.
    importCredentials(@NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties credentialProperties)
    Validates exported credential properties within Bamboo context (e.g.
    @NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties
    Converts data from a YAML document to credential export properties.
    @NotNull com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials
    toSpecsEntity(@NotNull CredentialsData credentialsData)
     
  • Method Details

    • exportAllCredentials

      @NotNull @NotNull Iterable<Path> exportAllCredentials()
      Export all shared credentials to default location in Bamboo home dir. Credentials will have their configuration encrypted for confidential data security.
      Returns:
      paths to files updated by export process
    • exportCredentials

      @NotNull @NotNull Iterable<Path> exportCredentials(@NotNull @NotNull CredentialsData credentialsData)
      Export a shared credential to default location in Bamboo home dir. The entity should be encrypted for data security.
      Returns:
      paths to files updated by export process
      See Also:
    • toEntityProperties

      @NotNull @NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties toEntityProperties(String yamlString) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Converts data from a YAML document to credential export properties. This method performs validation of YAML types and of the properties without Bamboo context (e.g. no database integrity is verified).
      Parameters:
      yamlString -
      Returns:
      credential properties after contextless validation
      Throws:
      YamlValidationException - if the format of the YAML file is invalid
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if the imported properties were not valid
    • importCredentials

      @NotNull @NotNull CredentialsData importCredentials(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.credentials.SharedCredentialsProperties credentialProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationException
      Validates exported credential properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.
      Parameters:
      credentialProperties - credential properties to import
      Returns:
      saved credential entity
      Throws:
      YamlValidationException - if the format of the YAML file is invalid (plugins will parse their part here)
      com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException - if data validation fails
    • toSpecsEntity

      @NotNull @NotNull com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentials toSpecsEntity(@NotNull @NotNull CredentialsData credentialsData)