Interface Authorizer
- 
 public interface AuthorizerProvides the interface for authorizing a user per request.- Author:
- Marc de Lignie
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidauthorize(AuthenticatedUser user, RequestMessage msg)Checks whether a user is authorized to have a script request from a gremlin client answered and raises anAuthorizationExceptionif this is not the case.Bytecodeauthorize(AuthenticatedUser user, Bytecode bytecode, Map<String,String> aliases)Checks whether a user is authorized to have a gremlin bytecode request from a client answered and raises anAuthorizationExceptionif this is not the case.voidsetup(Map<String,Object> config)This method is called once upon system startup to initialize theAuthorizer.
 
- 
- 
- 
Method Detail- 
setupvoid setup(Map<String,Object> config) throws AuthorizationException This method is called once upon system startup to initialize theAuthorizer.- Throws:
- AuthorizationException
 
 - 
authorizeBytecode authorize(AuthenticatedUser user, Bytecode bytecode, Map<String,String> aliases) throws AuthorizationException Checks whether a user is authorized to have a gremlin bytecode request from a client answered and raises anAuthorizationExceptionif this is not the case. The returned bytecde is used for further processing of the request.- Parameters:
- user-- AuthenticatedUserthat needs authorization.
- bytecode- The gremlin- Bytecoderequest to authorize the user for.
- aliases- A- Mapwith a single key/value pair that maps the name of the- TraversalSourcein the- Bytecoderequest to name of one configured in Gremlin Server.
- Returns:
- The original or modified Bytecodeto be used for further processing.
- Throws:
- AuthorizationException
 
 - 
authorizevoid authorize(AuthenticatedUser user, RequestMessage msg) throws AuthorizationException Checks whether a user is authorized to have a script request from a gremlin client answered and raises anAuthorizationExceptionif this is not the case.- Parameters:
- user-- AuthenticatedUserthat needs authorization.
- msg-- RequestMessagein which the- Tokens.ARGS_GREMLIN argument can contain an arbitrary succession of script statements.
- Throws:
- AuthorizationException
 
 
- 
 
-