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 -
Method Summary
Modifier and TypeMethodDescriptionorg.odpi.openmetadata.frameworks.connectors.properties.users.NamedListgetNamedList(String listName) Look up a particular named list in the collection.Return all of the known named lists in this collectionlongRetrieve the refresh time from the secrets store.Retrieve a secret from the secrets store.org.odpi.openmetadata.frameworks.connectors.properties.users.UserAccountRetrieve the requested user definitions stored in the secrets collection.getUsers()Retrieve any user definitions stored in the secrets collection.voidinitialize(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, startMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
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:
initializein classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Parameters:
connectorInstanceId- unique id for the connector instance useful for messages etcconnectionProperties- POJO for the configuration used to create the connector.
-
getRefreshTimeInterval
public long getRefreshTimeInterval()Retrieve the refresh time from the secrets store.- Specified by:
getRefreshTimeIntervalin classorg.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:
getSecretin classorg.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:
getNamedListin classorg.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.ConnectorCheckedExceptionReturn all of the known named lists in this collection- Overrides:
getNamedListsin classorg.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:
getUserin classorg.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.ConnectorCheckedExceptionRetrieve any user definitions stored in the secrets collection.- Overrides:
getUsersin classorg.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
Return the HTTPBodyPublisher populated with the data for the http request.- Parameters:
data- HTTP request parameters- Returns:
- populated HTTPBodyPublisher
-
ofJSON
Return the HTTPBodyPublisher populated with the data for the http request.- Parameters:
data- HTTP request parameters- Returns:
- populated HTTPBodyPublisher
-