public interface Authorizer
Modifier and Type | Method and Description |
---|---|
Bytecode |
authorize(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 an
AuthorizationException if this is not the case. |
void |
authorize(AuthenticatedUser user,
RequestMessage msg)
Checks whether a user is authorized to have a script request from a gremlin client answered and raises an
AuthorizationException if this is not the case. |
void |
setup(Map<String,Object> config)
This method is called once upon system startup to initialize the
Authorizer . |
void setup(Map<String,Object> config) throws AuthorizationException
Authorizer
.AuthorizationException
Bytecode authorize(AuthenticatedUser user, Bytecode bytecode, Map<String,String> aliases) throws AuthorizationException
AuthorizationException
if this is not the case. The returned bytecde is used for further processing of
the request.user
- AuthenticatedUser
that needs authorization.bytecode
- The gremlin Bytecode
request to authorize the user for.aliases
- A Map
with a single key/value pair that maps the name of the TraversalSource
in the
Bytecode
request to name of one configured in Gremlin Server.Bytecode
to be used for further processing.AuthorizationException
void authorize(AuthenticatedUser user, RequestMessage msg) throws AuthorizationException
AuthorizationException
if this is not the case.user
- AuthenticatedUser
that needs authorization.msg
- RequestMessage
in which the Tokens
.ARGS_GREMLIN argument can contain an arbitrary succession of script statements.AuthorizationException
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.