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:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
YAMLSecretsStoreConnector retrieves secrets from a YAML File
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
secretsCollectionName
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetNamedList
(String listName) Look up a particular named list in the collection.Return all of the known named lists in this collectionlong
Retrieve the refresh time from the secrets store.Retrieve a secret from the secrets store.Retrieve the requested user definitions stored in the secrets collection.getUsers()
Retrieve any user definitions stored in the secrets collection.void
initialize
(String connectorInstanceId, 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.protected void
Request that the subclass refreshes its secrets.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
checkSecretsStillValid, getConnectorComponentDescription, resetRefreshTime, setAuditLog, start
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods 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
Call made by the ConnectorProvider to initialize the Connector with the base services.- Overrides:
initialize
in classConnectorBase
- 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:
getRefreshTimeInterval
in classSecretsStoreConnector
- Returns:
- how long the secrets can be cached - 0 means indefinitely
-
getSecret
Retrieve a secret from the secrets store.- Specified by:
getSecret
in classSecretsStoreConnector
- Parameters:
secretName
- name of the secret.- Returns:
- secret
- Throws:
ConnectorCheckedException
- problem with the store
-
getNamedList
Look up a particular named list in the collection.- Overrides:
getNamedList
in classSecretsStoreConnector
- Parameters:
listName
- name of a list- Returns:
- corresponding named list or null
- Throws:
ConnectorCheckedException
- there is a problem with the connector
-
getNamedLists
Return all of the known named lists in this collection- Overrides:
getNamedLists
in classSecretsStoreConnector
- Returns:
- map of named lists in this collection
- Throws:
ConnectorCheckedException
- there is a problem with the connector
-
getUser
Retrieve the requested user definitions stored in the secrets collection.- Overrides:
getUser
in classSecretsStoreConnector
- Parameters:
userId
- userId for the lookup- Returns:
- associated user details or null
- Throws:
ConnectorCheckedException
- problem with the store
-
getUsers
Retrieve any user definitions stored in the secrets collection.- Overrides:
getUsers
in classSecretsStoreConnector
- Returns:
- map of userIds to user details
- Throws:
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
-
refreshSecrets
protected void refreshSecrets()Request that the subclass refreshes its secrets.- Specified by:
refreshSecrets
in classSecretsStoreConnector
-