Interface OpenMetadataUserSecurity
- All Known Implementing Classes:
OpenMetadataAccessSecurityConnector
public interface OpenMetadataUserSecurity
This interface is used to authenticate a user and return the properties known about them that can be included in
the resulting JWT token.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSecurityAccessControl(String securityAccessControl) Delete information about a specific security access control.voiddeleteUserAccount(String userId) Delete information about a specific user.getDefaultZonesForUser(List<String> initialZones, String typeName, String serviceName, String userId) Determine the appropriate setting for the default zones depending on the user and the default zones set up for the service.getPublishZonesForUser(List<String> currentZones, String typeName, String serviceName, String userId) Return the governance zones to set on an element that the user is publishing.getSecurityAccessControl(String controlName) Retrieve information about a specific security access control.getUserAccount(String userId) Retrieve information about a specific usergetUserList(UserAccountStatus userAccountStatus, UserAccountType userAccountType) Return the list of defined users.getWithdrawZonesForUser(List<String> currentZones, String typeName, String serviceName, String userId) Return the governance zones to set on an element that the user is withdrawing.voidsetSecurityAccessControl(OpenMetadataSecurityAccessControl securityAccessControl) Create/update information about a specific security access control.voidsetUserAccount(OpenMetadataUserAccount userAccount) Create/update information about a specific user.
-
Method Details
-
getUserList
List<String> getUserList(UserAccountStatus userAccountStatus, UserAccountType userAccountType) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Return the list of defined users.- Parameters:
userAccountStatus- status of the user - or null for any statususerAccountType- type of user - or null for any type- Returns:
- list of userIds
- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
getUserAccount
OpenMetadataUserAccount getUserAccount(String userId) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Retrieve information about a specific user- Parameters:
userId- calling user- Returns:
- security properties about the user
- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
setUserAccount
void setUserAccount(OpenMetadataUserAccount userAccount) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Create/update information about a specific user. This is used to update user details and reset the password.- Parameters:
userAccount- security properties about the user- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
deleteUserAccount
void deleteUserAccount(String userId) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Delete information about a specific user.- Parameters:
userId- calling user- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
getSecurityAccessControl
OpenMetadataSecurityAccessControl getSecurityAccessControl(String controlName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Retrieve information about a specific security access control.- Parameters:
controlName- calling user- Returns:
- security access control
- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
setSecurityAccessControl
void setSecurityAccessControl(OpenMetadataSecurityAccessControl securityAccessControl) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Create/update information about a specific security access control.- Parameters:
securityAccessControl- control properties- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
deleteSecurityAccessControl
void deleteSecurityAccessControl(String securityAccessControl) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Delete information about a specific security access control.- Parameters:
securityAccessControl- calling user- Throws:
InvalidParameterException- one of the elements is invisible to the requesting user.UserNotAuthorizedException- the requesting user is not authorized to issue this request.PropertyServerException- unable to retrieve necessary information to make the decision.
-
getDefaultZonesForUser
List<String> getDefaultZonesForUser(List<String> initialZones, String typeName, String serviceName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Determine the appropriate setting for the default zones depending on the user and the default zones set up for the service. This is called whenever an element is created.- Parameters:
initialZones- default setting of the default zones from the caller's create request.typeName- type of the elementserviceName- name of the called serviceuserId- name of the user- Returns:
- list of default zones for the user
- Throws:
InvalidParameterException- one of the parameter values is invalidPropertyServerException- a problem calculating the zonesUserNotAuthorizedException- unknown user
-
getPublishZonesForUser
List<String> getPublishZonesForUser(List<String> currentZones, String typeName, String serviceName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the governance zones to set on an element that the user is publishing. This is called whenever an element is published, and the element's zones are replaced by the list returned. A null or empty list means that the element is to have no zones, which makes it visible to all users.
An implementation that does not manage publish zones returns the current zones, so that the element is unchanged. One that does, and finds no publish zones defined for the user, throws UserNotAuthorizedException rather than guess whether the element should be left alone or opened up.- Parameters:
currentZones- the zones that the element is in nowtypeName- type of the elementserviceName- name of the called serviceuserId- name of the user- Returns:
- list of published zones for the user - null or empty to remove all zones
- Throws:
InvalidParameterException- one of the parameter values is invalidPropertyServerException- a problem calculating the zonesUserNotAuthorizedException- unknown user, or no publish zones are defined for the user
-
getWithdrawZonesForUser
List<String> getWithdrawZonesForUser(List<String> currentZones, String typeName, String serviceName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the governance zones to set on an element that the user is withdrawing. This is called whenever an element is withdrawn, and the element's zones are replaced by the list returned. A null or empty list means that the element is to have no zones, which makes it visible to all users.
An implementation that does not manage default zones returns the current zones, so that the element is unchanged. One that does, and finds no default zones defined for the user, throws UserNotAuthorizedException rather than guess whether the element should be left alone or opened up.- Parameters:
currentZones- the zones that the element is in nowtypeName- type of the elementserviceName- name of the called serviceuserId- name of the user- Returns:
- list of zones for a withdrawn element - null or empty to remove all zones
- Throws:
InvalidParameterException- one of the parameter values is invalidPropertyServerException- a problem calculating the zonesUserNotAuthorizedException- unknown user, or no default zones are defined for the user
-