Class ClaimSourceConfiguration

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    JSONClaimSourceConfig

    public class ClaimSourceConfiguration
    extends Object
    implements Serializable
    Every ClaimSource can have a pre or post-processor. These may be either given as JSON objects or as interpretable code. Note that the contract is that if the raw json can be interpreted as a JSON object, then the corresponding property is to be set, otherwise it is to be null.

    Created by Jeff Gaynor
    on 7/23/18 at 8:44 AM

    See Also:
    Serialized Form
    • Field Detail

      • failOnError

        protected boolean failOnError
      • notifyOnFail

        protected boolean notifyOnFail
      • enabled

        protected boolean enabled
      • jsonPreProcessorDone

        protected boolean jsonPreProcessorDone
      • jsonPostProcessorDone

        protected boolean jsonPostProcessorDone
    • Constructor Detail

      • ClaimSourceConfiguration

        public ClaimSourceConfiguration()
    • Method Detail

      • getId

        public String getId()
        Opaque identifier for uniquely identifying this configuratioin
        Returns:
      • setId

        public void setId​(String id)
      • getOmitList

        public List<String> getOmitList()
        This is the list of claims from the headers to omit. In other words, this module will reject these out of hand and never return them in a claims object. This is extremely useful in not having existing claims being over-written (which can happen if something like mod_auth_openidc is acting as an intermediary and adding spurious claims.)
        Returns:
      • setOmitList

        public void setOmitList​(List<String> omitList)
      • setName

        public void setName​(String name)
        Human readable string that describes this configuration
        Parameters:
        name -
      • getName

        public String getName()
      • isEnabled

        public boolean isEnabled()
        Enable this component. If false then this component will not be used, regardless. Among other things this lets administrators turn off a claim source at the spigot if there is, e.g. a compromise in it, without having to reconfigure the client.
        Returns:
      • setEnabled

        public void setEnabled​(boolean enabled)
      • isFailOnError

        public boolean isFailOnError()
        Fail if there is an error, i.e. if the claim source throws an exception, all further processing stops at that point, otherwise, continue, but just don't include the claims from this sournce
        Returns:
      • setFailOnError

        public void setFailOnError​(boolean failOnError)
      • isNotifyOnFail

        public boolean isNotifyOnFail()
        If this claim source has an error, notify the system administrators. This may or may not be an issue, for instance, if the client merely wants to try and retrieve information should it be there, but otherwise it does not matter. At the other end of the spectrum, if the claim source fails it may be an institution-wide issue we need to know about it now.
        Returns:
      • setNotifyOnFail

        public void setNotifyOnFail​(boolean notifyOnFail)
      • getRawPostProcessor

        public String getRawPostProcessor()
        The parseable string for the post processor. These are resolved at runtime because they may rely on the state of the request, such as the current claims and the scopes permitted. This always is set if there is anything in the configuration. The question is whether it consists of valid JSON or interpretable code.
        Returns:
      • setRawPostProcessor

        public void setRawPostProcessor​(String rawPostProcessor)
      • getRawPreProcessor

        public String getRawPreProcessor()
        The parseable string for the preprocessor. See note for getRawPostProcessor().
        Returns:
      • setRawPreProcessor

        public void setRawPreProcessor​(String rawPreProcessor)
      • getJSONPostProcessing

        public net.sf.json.JSONObject getJSONPostProcessing()
      • hasJSONPreProcessing

        public boolean hasJSONPreProcessing()
      • hasJSONPostProcessing

        public boolean hasJSONPostProcessing()
      • getJSONPreProcessing

        public net.sf.json.JSONObject getJSONPreProcessing()
        The json for the pre-processing directives. This has to be done this way since the directives rely on being constructed with the claims at runtime (e.g. for replacement templates).
        Returns:
      • makeProcessor

        protected net.sf.json.JSONObject makeProcessor​(String rawProcessor)
      • setProperties

        public void setProperties​(Map<String,​Object> map)
        Set a bunch of properties for this configuration object.
        Parameters:
        map -
      • getProperties

        public Map<String,​Object> getProperties()
        Get all the properties this knows about.
        Returns:
      • getRetryCount

        public int getRetryCount()
        How many times to retry connecting.
        Returns:
      • setRetryCount

        public void setRetryCount​(int retryCount)
      • getMaxWait

        public long getMaxWait()
        How long to sleep between connection retries in LDAP
        Returns:
      • setMaxWait

        public void setMaxWait​(long maxWait)