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 TypeMethodDescriptionvoiddeleteUserAccount(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) Determine the appropriate setting for the zones depending on the user and the current zones set up for the element.getUserAccount(String userId) Retrieve information about a specific usergetWithdrawZonesForUser(List<String> currentZones, String typeName, String serviceName, String userId) Determine the appropriate setting for the zones depending on the user and the current zones set up for the element.voidsetUserAccount(OpenMetadataUserAccount userAccount) Create/update information about a specific user.
-
Method Details
-
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 nd 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.
-
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 Determine the appropriate setting for the zones depending on the user and the current zones set up for the element. This is called whenever an element is published.- Parameters:
currentZones- default setting of the published zonestypeName- type of the elementserviceName- name of the called serviceuserId- name of the user- Returns:
- list of published zones for the user
- Throws:
InvalidParameterException- one of the parameter values is invalidPropertyServerException- a problem calculating the zonesUserNotAuthorizedException- unknown user
-
getWithdrawZonesForUser
List<String> getWithdrawZonesForUser(List<String> currentZones, String typeName, String serviceName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Determine the appropriate setting for the zones depending on the user and the current zones set up for the element. This is called whenever an element is withdrawn.- Parameters:
currentZones- default setting of the default zonestypeName- type of the elementserviceName- name of the called serviceuserId- name of the user- Returns:
- list of published zones for the user
- Throws:
InvalidParameterException- one of the parameter values is invalidPropertyServerException- a problem calculating the zonesUserNotAuthorizedException- unknown user
-