@ApplicationScoped public class WebAcService extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WebAcService.NoopAuthorizationCache |
static interface |
WebAcService.TrellisAuthorizationCache
A
CacheService that can be used for authorization information. |
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_WEBAC_MEMBERSHIP_CHECK
The configuration key controlling whether to check member resources at the AuthZ enforcement point.
|
Constructor and Description |
---|
WebAcService()
Create a WebAC-based authorization service.
|
WebAcService(ResourceService resourceService)
Create a WebAC-based authorization service.
|
WebAcService(ResourceService resourceService,
CacheService<String,Set<IRI>> cache)
Create a WebAC-based authorization service.
|
WebAcService(ResourceService resourceService,
CacheService<String,Set<IRI>> cache,
boolean checkMembershipResources)
Create a WebAC-based authorization service.
|
WebAcService(ServiceBundler services)
Create a WebAC-based authorization service.
|
WebAcService(ServiceBundler services,
CacheService<String,Set<IRI>> cache)
Create a WebAC-based authorization service.
|
Modifier and Type | Method and Description |
---|---|
static String |
generateCacheKey(IRI identifier,
IRI agent)
Generate a key suitable for cache lookups for the given arguments.
|
Set<IRI> |
getAccessModes(IRI identifier,
Session session)
Get the allowable access modes for the given session to the specified resource.
|
void |
initialize()
Initializes the root ACL, if there is no root ACL.
|
public static final String CONFIG_WEBAC_MEMBERSHIP_CHECK
public WebAcService()
public WebAcService(ServiceBundler services)
services
- the trellis service bundler@Inject public WebAcService(ServiceBundler services, @WebAcService.TrellisAuthorizationCache CacheService<String,Set<IRI>> cache)
services
- the trellis service bundlercache
- a cachepublic WebAcService(ResourceService resourceService)
resourceService
- the resource servicepublic WebAcService(ResourceService resourceService, CacheService<String,Set<IRI>> cache)
resourceService
- the resource servicecache
- a cachepublic WebAcService(ResourceService resourceService, CacheService<String,Set<IRI>> cache, boolean checkMembershipResources)
resourceService
- the resource servicecache
- a cachecheckMembershipResources
- whether to check membership resource permissions (default=false)@PostConstruct public void initialize()
public Set<IRI> getAccessModes(IRI identifier, Session session)
identifier
- the resource identifiersession
- the agent's session