Class OpenMetadataPlatformSecurityVerifier

java.lang.Object
org.odpi.openmetadata.metadatasecurity.server.OpenMetadataPlatformSecurityVerifier

public class OpenMetadataPlatformSecurityVerifier extends Object
OpenMetadataPlatformSecurityVerifier provides the plug-in point for the open metadata platform connector
  • Constructor Details

    • OpenMetadataPlatformSecurityVerifier

      public OpenMetadataPlatformSecurityVerifier()
  • Method Details

    • setPlatformSecurityConnection

      public static void setPlatformSecurityConnection(String userId, String delegatingUserId, String serverPlatformURL, Connection connection) throws InvalidParameterException, UserNotAuthorizedException
      Override the default location of the configuration documents.
      Parameters:
      userId - calling user.
      delegatingUserId - external userId making request
      serverPlatformURL - URL Root of the server platform.
      connection - connection used to create and configure the connector that interacts with the real store.
      Throws:
      InvalidParameterException - one of the properties is either null or invalid
      UserNotAuthorizedException - the user is not authorized to access this platform
    • getPlatformSecurityConnection

      public static Connection getPlatformSecurityConnection(String userId, String delegatingUserId) throws UserNotAuthorizedException
      Return the connection object for the configuration store. Null is returned if the server should use the default store.
      Parameters:
      userId - calling user
      delegatingUserId - external userId making request
      Returns:
      connection response
      Throws:
      UserNotAuthorizedException - the user is not authorized to access this platform
    • clearPlatformSecurityConnection

      public static void clearPlatformSecurityConnection(String userId, String delegatingUserId) throws UserNotAuthorizedException
      Clear the connection object for the configuration store. Null is returned if the server should use the default store.
      Parameters:
      userId - calling user
      delegatingUserId - external userId making request
      Throws:
      UserNotAuthorizedException - the user is not authorized to access this platform
    • getLogonUser

      public static OpenMetadataUserAccount getLogonUser(String accountUserId)
      Return information about a user requesting a bearer token
      Parameters:
      accountUserId - calling user
      Returns:
      known details of the user
    • getUser

      public static OpenMetadataUserAccount getUser(String userId, String delegatingUserId, String accountUserId) throws UserNotAuthorizedException
      Return information about a user.
      Parameters:
      userId - calling user
      delegatingUserId - external userId making request
      accountUserId - user account identifier
      Returns:
      known details of the user
      Throws:
      UserNotAuthorizedException - user not recognized
    • updateLoginUserAccount

      public static void updateLoginUserAccount(OpenMetadataUserAccount userAccount)
      Update information about a specific user. This is used to update user details nd reset the password.
      Parameters:
      userAccount - security properties about the user
    • updateUserAccount

      public static void updateUserAccount(String userId, String delegatingUserId, OpenMetadataUserAccount userAccount) throws UserNotAuthorizedException
      Update information about a specific user. This is used to update user details nd reset the password.
      Parameters:
      userId - calling user
      delegatingUserId - external userId making request
      userAccount - security properties about the user
      Throws:
      UserNotAuthorizedException - user not recognized
    • deleteUserAccount

      public static void deleteUserAccount(String userId, String delegatingUserId, String accountUserId) throws UserNotAuthorizedException
      Delete information about a specific user.
      Parameters:
      userId - calling user
      delegatingUserId - external userId making request
      accountUserId - calling user
      Throws:
      UserNotAuthorizedException - user not recognized
    • validateUserForNewServer

      public static void validateUserForNewServer(String userId) throws UserNotAuthorizedException
      Check that the calling user is authorized to create new servers.
      Parameters:
      userId - calling user
      Throws:
      UserNotAuthorizedException - the user is not authorized to access this platform
    • validateUserAsOperatorForPlatform

      public static void validateUserAsOperatorForPlatform(String userId) throws UserNotAuthorizedException
      Check that the calling user is authorized to issue operator requests to the OMAG Server Platform.
      Parameters:
      userId - calling user
      Throws:
      UserNotAuthorizedException - the user is not authorized to issue operator commands to this platform
    • validateUserAsInvestigatorForPlatform

      public static void validateUserAsInvestigatorForPlatform(String userId) throws UserNotAuthorizedException
      Check that the calling user is authorized to issue diagnostic requests to the OMAG Server Platform.
      Parameters:
      userId - calling user
      Throws:
      UserNotAuthorizedException - the user is not authorized to issue diagnostic commands to this platform