Class OpenMetadataPlatformSecurityConnector

  • All Implemented Interfaces:
    OpenMetadataPlatformSecurity

    public class OpenMetadataPlatformSecurityConnector
    extends ConnectorBase
    implements OpenMetadataPlatformSecurity
    OpenMetadataPlatformSecurityConnector provides the base class for a connector that validates access to the platform services that are not specific to an OMAG Server. This optional connector can be set up once the OMAGServerPlatform is running. The default implementation does not allow any access. It generates well-defined exceptions and console log messages. It is over-ridden to define the required access for the deployment environment. The methods in this base class can be called if access is to be denied as a way of reusing the message logging and exceptions.
    • Field Detail

      • connectorName

        protected java.lang.String connectorName
      • serverRootURL

        protected java.lang.String serverRootURL
    • Constructor Detail

      • OpenMetadataPlatformSecurityConnector

        public OpenMetadataPlatformSecurityConnector()
    • Method Detail

      • logRecord

        protected void logRecord​(java.lang.String logMessageId,
                                 AuditLogRecordSeverity severity,
                                 java.lang.String logMessage)
        Log an audit log record for an event, decision, error, or exception detected by the OMRS.
        Parameters:
        logMessageId - id for the audit log record
        severity - is this an event, decision, error or exception?
        logMessage - description of the audit log record including specific resources involved
      • logConnectorStarting

        protected void logConnectorStarting()
        Write an audit log message to say that the connector is initializing.
      • logConnectorDisconnecting

        protected void logConnectorDisconnecting()
        Write an audit log message to say that the connector is stopping.
      • setServerPlatformURL

        public void setServerPlatformURL​(java.lang.String serverURLRoot)
        Set up the URL Root for the platform where this is running.
        Parameters:
        serverURLRoot - url root
      • throwUnauthorizedPlatformAccess

        protected void throwUnauthorizedPlatformAccess​(java.lang.String userId,
                                                       java.lang.String methodName)
                                                throws UserNotAuthorizedException
        Write an audit log message and throw exception to record an unauthorized access.
        Parameters:
        userId - calling user
        methodName - calling method
        Throws:
        UserNotAuthorizedException - the authorization check failed