Class YAMLSecretsStoreConnector

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
org.odpi.openmetadata.adapters.connectors.secretsstore.yaml.YAMLSecretsStoreConnector
All Implemented Interfaces:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension

public class YAMLSecretsStoreConnector extends org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
YAMLSecretsStoreConnector retrieves secrets from a YAML File
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.frameworks.connectors.properties.users.NamedList
    getNamedList(String listName)
    Look up a particular named list in the collection.
    Map<String,org.odpi.openmetadata.frameworks.connectors.properties.users.NamedList>
    Return all of the known named lists in this collection
    long
    Retrieve the refresh time from the secrets store.
    getSecret(String secretName)
    Retrieve a secret from the secrets store.
    org.odpi.openmetadata.frameworks.connectors.properties.users.UserAccount
    getUser(String userId)
    Retrieve the requested user definitions stored in the secrets collection.
    Map<String,org.odpi.openmetadata.frameworks.connectors.properties.users.UserAccount>
    Retrieve any user definitions stored in the secrets collection.
    void
    initialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties connectionProperties)
    Call made by the ConnectorProvider to initialize the Connector with the base services.
    Return the HTTPBodyPublisher populated with the data for the http request.
    Return the HTTPBodyPublisher populated with the data for the http request.

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector

    checkSecretsStillValid, getConnectorComponentDescription, setAuditLog, start

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase

    disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, toString

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector

    clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • YAMLSecretsStoreConnector

      public YAMLSecretsStoreConnector()
  • Method Details

    • initialize

      public void initialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties connectionProperties)
      Call made by the ConnectorProvider to initialize the Connector with the base services.
      Overrides:
      initialize in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Parameters:
      connectorInstanceId - unique id for the connector instance useful for messages etc
      connectionProperties - POJO for the configuration used to create the connector.
    • getRefreshTimeInterval

      public long getRefreshTimeInterval()
      Retrieve the refresh time from the secrets store.
      Specified by:
      getRefreshTimeInterval in class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
      Returns:
      how long the secrets can be cached - 0 means indefinitely
    • getSecret

      public String getSecret(String secretName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Retrieve a secret from the secrets store.
      Specified by:
      getSecret in class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
      Parameters:
      secretName - name of the secret.
      Returns:
      secret
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - problem with the store
    • getNamedList

      public org.odpi.openmetadata.frameworks.connectors.properties.users.NamedList getNamedList(String listName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Look up a particular named list in the collection.
      Overrides:
      getNamedList in class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
      Parameters:
      listName - name of a list
      Returns:
      corresponding named list or null
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem with the connector
    • getNamedLists

      public Map<String,org.odpi.openmetadata.frameworks.connectors.properties.users.NamedList> getNamedLists() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Return all of the known named lists in this collection
      Overrides:
      getNamedLists in class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
      Returns:
      map of named lists in this collection
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem with the connector
    • getUser

      public org.odpi.openmetadata.frameworks.connectors.properties.users.UserAccount getUser(String userId) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Retrieve the requested user definitions stored in the secrets collection.
      Overrides:
      getUser in class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
      Parameters:
      userId - userId for the lookup
      Returns:
      associated user details or null
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - problem with the store
    • getUsers

      public Map<String,org.odpi.openmetadata.frameworks.connectors.properties.users.UserAccount> getUsers() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Retrieve any user definitions stored in the secrets collection.
      Overrides:
      getUsers in class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
      Returns:
      map of userIds to user details
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - problem with the store
    • ofForm

      public HttpRequest.BodyPublisher ofForm(Map<String,Object> data)
      Return the HTTPBodyPublisher populated with the data for the http request.
      Parameters:
      data - HTTP request parameters
      Returns:
      populated HTTPBodyPublisher
    • ofJSON

      public HttpRequest.BodyPublisher ofJSON(Map<String,Object> data)
      Return the HTTPBodyPublisher populated with the data for the http request.
      Parameters:
      data - HTTP request parameters
      Returns:
      populated HTTPBodyPublisher