public class DataAccessCtl extends Object
| Modifier and Type | Field and Description |
|---|---|
static Function<HttpAction,String> |
paramUserServlet
Get the user from
?user query string parameter. |
static Function<HttpAction,String> |
requestUserServlet
Get the user from the servlet context via
HttpServletRequest.getRemoteUser() |
static Symbol |
symAuthorizationService
Symbol for the
AuthorizationService. |
| Constructor and Description |
|---|
DataAccessCtl() |
| Modifier and Type | Method and Description |
|---|---|
static Dataset |
controlledDataset(Dataset dsBase,
AuthorizationService reg)
Return a
DatasetGraph with added data access control. |
static DatasetGraph |
controlledDataset(DatasetGraph dsgBase,
AuthorizationService reg)
Return a
DatasetGraph with added data access control. |
static DatasetGraph |
filteredDataset(DatasetGraph dsg,
SecurityContext sCxt)
Return a read-only
DatasetGraphFilteredView that fulfils the SecurityContext. |
static boolean |
isAccessControlled(DatasetGraph dsg)
Return whether a
DatasetGraph has access control, either because it is wrapped in
DatasetGraphAccessControl or because it has the context settings. |
public static final Symbol symAuthorizationService
AuthorizationService.
This is an alternative to DatasetGraphAccessControl.isAccessControlled(DatasetGraph)public static final Function<HttpAction,String> requestUserServlet
HttpServletRequest.getRemoteUser()public static final Function<HttpAction,String> paramUserServlet
?user query string parameter. Use carefully; for situations where the user name has
been authenticated already and is being passed on securely. Also for testing.public static Dataset controlledDataset(Dataset dsBase, AuthorizationService reg)
DatasetGraph with added data access control.
Use of the original DatasetGraph is not controlled.public static DatasetGraph controlledDataset(DatasetGraph dsgBase, AuthorizationService reg)
DatasetGraph with added data access control. Use of the original
DatasetGraph is not controlled.public static boolean isAccessControlled(DatasetGraph dsg)
DatasetGraph has access control, either because it is wrapped in
DatasetGraphAccessControl or because it has the context settings.public static DatasetGraph filteredDataset(DatasetGraph dsg, SecurityContext sCxt)
DatasetGraphFilteredView that fulfils the SecurityContext.
See also SecurityContext.filterTDB(org.apache.jena.sparql.core.DatasetGraph, org.apache.jena.query.QueryExecution) which is more efficient.
This code creates a general solution.Licensed under the Apache License, Version 2.0