org.apache.synapse.securevault.secret

## Interface SecretRepository

- All Known Implementing Classes:
    FileBaseSecretRepository

      public interface SecretRepository

  Represents the abstraction 'Repository of secret' Implementation can be any type - file,jdbc

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getEncryptedData(String alias)` Returns the encrypted Value of provided alias name .
    `SecretRepository` | `getParent()` Returns the parent secret repository
    `String` | `getSecret(String alias)` Returns the secret of provided alias name .
    `void` | `init(Properties properties, String id)` Initializes the repository based on provided properties
    `void` | `setParent(SecretRepository parent)` Sets the parent secret repository Secret Repositories are made a chain so that , one can get a secret from other.

- - ### Method Detail

    - #### init

          void init(Properties properties,
                    String id)

      Initializes the repository based on provided properties
      Parameters:
        `properties` - Configuration properties
        `id` - Identifier to identify properties related to the corresponding repository

    - #### getSecret

          String getSecret(String alias)

      Returns the secret of provided alias name . An alias represents the logical name for a look up secret
      Parameters:
        `alias` - Alias name for look up a secret
      Returns:
        Secret if there is any , otherwise ,alias itself

    - #### getEncryptedData

          String getEncryptedData(String alias)

      Returns the encrypted Value of provided alias name . An alias represents the logical name for a look up secret
      Parameters:
        `alias` - Alias name for look up a secret
      Returns:
        encrypted Value if there is any , otherwise ,alias itself

    - #### setParent

          void setParent(SecretRepository parent)

      Sets the parent secret repository Secret Repositories are made a chain so that , one can get a secret from other. For example, JDBC password can be in file based secret repository
      Parameters:
        `parent` - Parent secret repository

    - #### getParent

          SecretRepository getParent()

      Returns the parent secret repository
      Returns:
        Parent secret repository

Copyright © 2005–2017 Apache Software Foundation. All rights reserved.