Class SecretsStoreConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.connectors.SecretsStoreConnector
- All Implemented Interfaces:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent,SecureConnectorExtension,VirtualConnectorExtension
public abstract class SecretsStoreConnector
extends ConnectorBase
implements org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
SecretsStoreConnector is the interface for a connector that is able to retrieve secrets (passwords, certificates, ...) from a secure location.
The secrets store connector is embedded in a connector that needs one or more secrets to perform its tasks. Both connectors are initialised
together by the ConnectorBroker. The secrets store connector is called by the surrounding connector to extract the needed secrets.
When the ConnectorBroker detects that there is a secrets store connector embedded in another connector, it attempts to retrieve the standard
secrets for the corresponding connection object (if they are null):
- userId
- clearPassword
- encryptedPassword
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by subclass to determine if the secrets should be refreshedorg.odpi.openmetadata.frameworks.auditlog.ComponentDescriptionReturn the component description that is used by this connector in the audit log.abstract longRetrieve the refresh time from the secrets store.abstract StringRetrieve a secret from the secrets store.voidsetAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidstart()Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, 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
-
SecretsStoreConnector
public SecretsStoreConnector()
-
-
Method Details
-
getConnectorComponentDescription
public org.odpi.openmetadata.frameworks.auditlog.ComponentDescription getConnectorComponentDescription()Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceorg.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
setAuditLog
public void setAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLogin interfaceorg.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent- Parameters:
auditLog- audit log object
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
startin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.
-
checkSecretsStillValid
public void checkSecretsStillValid()Called by subclass to determine if the secrets should be refreshed -
getSecret
Retrieve a secret from the secrets store.- Parameters:
secretName- name of the secret.- Returns:
- secret
- Throws:
ConnectorCheckedException
-
getRefreshTimeInterval
Retrieve the refresh time from the secrets store.- Returns:
- how long the secrets can be cached - 0 means indefinitely
- Throws:
ConnectorCheckedException- there is a problem with the connector
-