APISonar


org.infinispan.configuration.cache.Configuration.security

> org > infinispan > configuration > cache > Configuration > security
org APIs infinispan APIs configuration APIs cache APIs Configuration APIs security APIs

Example 1
private void writeSecurity(XMLExtendedStreamWriter writer, Configuration configuration) throws XMLStreamException {
      AuthorizationConfiguration authorization = configuration.security().authorization();
      AttributeSet attributes = authorization.attributes();
      if (attributes.isModified()) {
         writer.writeStartElement(Element.SECURITY);
         writer.writeStartElement(Element.AUTHORIZATION);
         attributes.write(writer, AuthorizationConfiguration.ENABLED, Attribute.ENABLED);
         writeCollectionAsAttribute(writer, Attribute.ROLES, authorization.roles());
         writer.writeEndElement();
         writer.writeEndElement();
      }
   }
Example 2
public void init(Cache<?, ?> cache, GlobalConfiguration globalConfiguration, Configuration configuration,
         ClusterRegistry<String, Subject, Integer> clusterRegistry) {
      this.globalConfiguration = globalConfiguration.security();
      this.configuration = configuration.security().authorization();
      this.subjectRoleMaskCache = clusterRegistry;
      authCacheScope = String.format("%s_%s", AuthorizationManager.class.getName(), cache.getName());
      this.authzHelper = new AuthorizationHelper(this.globalConfiguration, AuditContext.CACHE, cache.getName());
   }
Example 3
public void init(@ComponentName(KnownComponentNames.CACHE_NAME) String cacheName,
                    GlobalConfiguration globalConfiguration, Configuration configuration,
                    GlobalSecurityManager globalSecurityManager, EmbeddedCacheManager cacheManager) {
      this.configuration = configuration.security().authorization();
      Cache<CachePrincipalPair, SubjectACL> globalACLCache =
            (Cache<CachePrincipalPair, SubjectACL>) globalSecurityManager.globalACLCache();
      this.authzHelper = new AuthorizationHelper(globalConfiguration.security(), AuditContext.CACHE, cacheName,
            globalACLCache);
      if (globalACLCache != null) {
         SecurityActions.addCacheDependency(cacheManager, cacheName, globalACLCache.getName());
      }
   }