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
secretsCollectionNameFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteUser(String userId) Delete the requested user definitions stored in the secrets collection.getNamedList(String listName) Look up a particular named list in the collection.Return all the known named lists in this collectionlongRetrieve 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.voidinitialize(String connectorInstanceId, Connection connectionDetails) 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 voidRequest that the subclass refreshes its secrets.protected voidRequest that the subclass save its secrets.voidsaveUser(String userId, UserAccount userAccount) Save the requested user definitions in the secrets collection.voidstart()Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
checkSecretsStillValid, getConnectorComponentDescription, getSecretsCollectionName, getSecretsLocation, getSecretsProvider, resetRefreshTime, setAuditLogMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, fromCamelToCanonicalCase, fromCanonicalToCamelCase, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getSecretsCollectionName, getSecretsLocation, getSecretsProvider, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
YAMLSecretsStoreConnector
public YAMLSecretsStoreConnector()
-
-
Method Details
-
initialize
public void initialize(String connectorInstanceId, Connection connectionDetails) throws ConnectorCheckedException Call made by the ConnectorProvider to initialize the Connector with the base services.- Overrides:
initializein classConnectorBase- Parameters:
connectorInstanceId- unique id for the connector instance useful for messages etcconnectionDetails- POJO for the configuration used to create the connector- Throws:
ConnectorCheckedException- a problem within the connector.
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
startin classSecretsStoreConnector- Throws:
ConnectorCheckedException- the connector detected a problem.UserNotAuthorizedException- the connector was disconnected before/during start
-
getRefreshTimeInterval
public long getRefreshTimeInterval()Retrieve the refresh time from the secrets store.- Specified by:
getRefreshTimeIntervalin classSecretsStoreConnector- Returns:
- how long the secrets can be cached - 0 means indefinitely
-
getSecret
Retrieve a secret from the secrets store.- Specified by:
getSecretin 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:
getNamedListin classSecretsStoreConnector- Parameters:
listName- name of a list- Returns:
- corresponding named list or null
- Throws:
ConnectorCheckedException- a problem with the connector
-
getNamedLists
Return all the known named lists in this collection- Overrides:
getNamedListsin classSecretsStoreConnector- Returns:
- map of named lists in this collection
- Throws:
ConnectorCheckedException- a problem with the connector
-
getUser
Retrieve the requested user definitions stored in the secrets collection.- Overrides:
getUserin classSecretsStoreConnector- Parameters:
userId- userId for the lookup- Returns:
- associated user details or null
- Throws:
ConnectorCheckedException- problem with the store
-
saveUser
Save the requested user definitions in the secrets collection.- Overrides:
saveUserin classSecretsStoreConnector- Parameters:
userId- userId for the lookupuserAccount- associated user details- Throws:
ConnectorCheckedException- a problem with the connector
-
deleteUser
Delete the requested user definitions stored in the secrets collection.- Overrides:
deleteUserin classSecretsStoreConnector- Parameters:
userId- userId for the lookup- Throws:
ConnectorCheckedException- a problem with the connector
-
getUsers
Retrieve any user definitions stored in the secrets collection.- Overrides:
getUsersin 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
Request that the subclass refreshes its secrets.- Specified by:
refreshSecretsin classSecretsStoreConnector- Throws:
ConnectorCheckedException- problem with secrets file
-
saveSecrets
Request that the subclass save its secrets.- Specified by:
saveSecretsin classSecretsStoreConnector- Throws:
ConnectorCheckedException- problem with secrets file
-