Class WSO2MIResourceConnector
- All Implemented Interfaces:
AuditLoggingComponent,SecureConnectorExtension,VirtualConnectorExtension
/management).
Authentication is a two step exchange, unlike the JDBC- and OAuth2-based connectors in this family:
GET /management/loginwith HTTP Basic Auth (username:password) returns{ "AccessToken": "..." }.- That token is presented as a
Bearertoken on every subsequent Management API call.
Open design point (odpi/egeria#9245): the exact wiring of this login/session-token exchange into
Egeria's RESTClientFactory / secrets-store machinery is still being agreed with the Egeria
maintainers. The current implementation obtains the base client from the factory (which applies the
configured Basic credentials) for the login call, then holds the resulting bearer token on this
connector. This will be revised to match whatever session-token pattern Egeria settles on.
v1 scope is deliberately minimal: authenticate, then list the deployed APIs. Proxy Services, Sequences, Endpoints, Inbound Endpoints, Connectors, Message Stores/Processors, Templates and Tasks are follow-up increments.
-
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.ConnectorBase
connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the detail for a single deployed API by name (GET /management/apis?apiName={name}).Return the bearer token obtained from the lastlogin()call, or null if not yet authenticated.Return the component description that is used by this connector in the audit log.listAPIs()List the REST APIs currently deployed on the Micro Integrator.voidlogin()Exchange the configured Basic credentials for a short-lived bearer token viaGET /management/login, and hold it for subsequent calls.voidsetAuditLog(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidsetWSO2InstanceName(String wso2InstanceName) Set up a new instance name (must be called beforestart()).voidstart()Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, fromCamelToCanonicalCase, fromCanonicalToCamelCase, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayValue, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getSecretsCollectionName, getSecretsLocation, getSecretsProvider, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingElement, 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
-
WSO2MIResourceConnector
public WSO2MIResourceConnector()
-
-
Method Details
-
setAuditLog
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 interfaceAuditLoggingComponent- Parameters:
auditLog- audit log object
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceAuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
setWSO2InstanceName
Set up a new instance name (must be called beforestart()).- Parameters:
wso2InstanceName- new instance name
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
startin classConnectorBase- Throws:
ConnectorCheckedException- the connector detected a problem.UserNotAuthorizedException- connector disconnected
-
login
Exchange the configured Basic credentials for a short-lived bearer token viaGET /management/login, and hold it for subsequent calls.- Throws:
PropertyServerException- the login call failed or returned no token
-
getBearerToken
Return the bearer token obtained from the lastlogin()call, or null if not yet authenticated.- Returns:
- string token
-
listAPIs
List the REST APIs currently deployed on the Micro Integrator.- Returns:
- list of
APIInfo; an empty list if none are deployed - Throws:
PropertyServerException- problem with the call
-
getAPI
Return the detail for a single deployed API by name (GET /management/apis?apiName={name}).- Parameters:
apiName- name of the API- Returns:
APIInfo, or null if the Micro Integrator has no API with that name- Throws:
PropertyServerException- problem with the call
-