Package io.deephaven.server.session
Interface TicketResolver.Authorization
- All Known Implementing Classes:
NoopTicketResolverAuthorization
- Enclosing interface:
- TicketResolver
public static interface TicketResolver.Authorization
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthorizePublishRequest(TicketResolver ticketResolver, ByteBuffer ticket) Implementations must validate that the provided ticket is authorized for the current user.voidauthorizePublishRequest(TicketResolver ticketResolver, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor) Implementations must validate that the provided ticket is authorized for the current user.<T> Ttransform(T source) Implementations must type check the provided source as any type of object can be stored in an export.
-
Method Details
-
transform
<T> T transform(T source) Implementations must type check the provided source as any type of object can be stored in an export.- Parameters:
source- the object to transform (such as by applying ACLs)- Returns:
- an object that has been sanitized to be used by the current user
- ApiNote:
- Types typically encountered are
TableandPartitionedTable. Perform an identity mapping for any types that you do not wish to transform. This method should not error. Implementations may wish to queryExecutionContext.getAuthContext()to apply user-specific transformations to requested resources.
-
authorizePublishRequest
Implementations must validate that the provided ticket is authorized for the current user.- Parameters:
ticketResolver- the ticket resolverticket- the ticket to publish to as a byte buffer; note that the first byte is the route- Throws:
io.grpc.StatusRuntimeException- if the user is not authorized- ApiNote:
- Implementations may wish to query
ExecutionContext.getAuthContext()to apply user-specific transformations to requested resources.
-
authorizePublishRequest
void authorizePublishRequest(TicketResolver ticketResolver, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor) Implementations must validate that the provided ticket is authorized for the current user.- Parameters:
ticketResolver- the ticket resolverdescriptor- the flight descriptor to publish to; note that the first path element is the route- Throws:
io.grpc.StatusRuntimeException- if the user is not authorized- ApiNote:
- Implementations may wish to query
ExecutionContext.getAuthContext()to apply user-specific transformations to requested resources.
-