Class StoutAttributeProvider

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.ow2.authzforce.core.pdp.api.AttributeProvider, org.ow2.authzforce.core.pdp.api.CloseableNamedAttributeProvider, org.ow2.authzforce.core.pdp.api.NamedAttributeProvider

    public class StoutAttributeProvider
    extends org.ow2.authzforce.core.pdp.api.BaseNamedAttributeProvider
    Provides an Authzforce attribute provider that allows relatively easy configuration of various attributes for use in the policy decision point.
    • Constructor Detail

      • StoutAttributeProvider

        public StoutAttributeProvider()
        Allows an instance to be created outside the PDP.
    • Method Detail

      • getProvidedAttributes

        public Set<oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType> getProvidedAttributes()
      • get

        public <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue> org.ow2.authzforce.core.pdp.api.value.AttributeBag<AV> get​(org.ow2.authzforce.core.pdp.api.AttributeFqn attributeGUID,
                                                                                                                                            org.ow2.authzforce.core.pdp.api.value.Datatype<AV> attributeDatatype,
                                                                                                                                            org.ow2.authzforce.core.pdp.api.EvaluationContext context)
                                                                                                                                     throws org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
        Throws:
        org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
      • getStoutAttributeByIdAndSubject

        public Collection<AttributeValue<?>> getStoutAttributeByIdAndSubject​(String id,
                                                                             String subject)
        Returns a request for a simple, Stout attribute by attribute id and subject.
        Parameters:
        id - attribute id
        subject - subject name
        Returns:
        collection of attributes or null if none found
      • convertRetrievedValueToXacmlFormat

        protected <AV extends org.ow2.authzforce.core.pdp.api.value.AttributeValue> org.ow2.authzforce.core.pdp.api.value.SimpleValue<?> convertRetrievedValueToXacmlFormat​(org.ow2.authzforce.core.pdp.api.value.Datatype<AV> attributeDatatype,
                                                                                                                                                                            String id,
                                                                                                                                                                            String subject,
                                                                                                                                                                            AttributeValue<?> retrievedValue)
      • findSubjectInEnvironmentContext

        protected String findSubjectInEnvironmentContext​(org.ow2.authzforce.core.pdp.api.EvaluationContext context)
      • loadAttributeConfiguration

        protected void loadAttributeConfiguration()
      • addAttributeDefinition

        protected void addAttributeDefinition​(StoutAttribute attribute)