Class FunctorRuntimeEngine

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.util.scripting.ScriptingConstants

    public class FunctorRuntimeEngine
    extends edu.uiuc.ncsa.security.util.scripting.ScriptRuntimeEngine
    implements edu.uiuc.ncsa.security.util.scripting.ScriptingConstants

    Created by Jeff Gaynor
    on 2/6/20 at 2:04 PM

    • Field Summary

      • Fields inherited from interface edu.uiuc.ncsa.security.util.scripting.ScriptingConstants

        ALL_PHASES, AUTH_PHASE, EXCHANGE_PHASE, POST_PREFIX, PRE_PREFIX, REFRESH_PHASE, SRE_EXEC_INIT, SRE_EXEC_PHASE, SRE_NO_EXEC_PHASE, SRE_PHASES, SRE_POST_ALL, SRE_POST_AT, SRE_POST_AUTH, SRE_POST_EXCHANGE, SRE_POST_REFRESH, SRE_POST_USER_INFO, SRE_PRE_ALL, SRE_PRE_AT, SRE_PRE_AUTH, SRE_PRE_EXCHANGE, SRE_PRE_REFRESH, SRE_PRE_USER_INFO, SRE_REQ_ACCESS_TOKEN, SRE_REQ_AUDIENCE, SRE_REQ_CLAIM_SOURCES, SRE_REQ_CLAIMS, SRE_REQ_EXTENDED_ATTRIBUTES, SRE_REQ_FLOW_STATES, SRE_REQ_PROXY_CLAIMS, SRE_REQ_REFRESH_TOKEN, SRE_REQ_RESOURCE, SRE_REQ_SCOPES, SRE_TX_REQ_AUDIENCE, SRE_TX_REQ_RESOURCES, SRE_TX_REQ_SCOPES, TOKEN_PHASE, USER_INFO_PHASE
    • Constructor Summary

      Constructors 
      Constructor Description
      FunctorRuntimeEngine​(net.sf.json.JSONObject config)  
    • Constructor Detail

      • FunctorRuntimeEngine

        public FunctorRuntimeEngine​(net.sf.json.JSONObject config)
    • Method Detail

      • run

        public edu.uiuc.ncsa.security.util.scripting.ScriptRunResponse run​(edu.uiuc.ncsa.security.util.scripting.ScriptRunRequest request)
        Specified by:
        run in class edu.uiuc.ncsa.security.util.scripting.ScriptRuntimeEngine
      • serializeState

        public String serializeState()
        Specified by:
        serializeState in class edu.uiuc.ncsa.security.util.scripting.ScriptRuntimeEngine
      • deserializeState

        public void deserializeState​(String state)
        Specified by:
        deserializeState in class edu.uiuc.ncsa.security.util.scripting.ScriptRuntimeEngine
      • noOpSRR

        protected edu.uiuc.ncsa.security.util.scripting.ScriptRunResponse noOpSRR()
      • createSRR

        protected edu.uiuc.ncsa.security.util.scripting.ScriptRunResponse createSRR​(edu.uiuc.ncsa.security.util.scripting.ScriptRunRequest scriptRunRequest)
      • createSRR

        protected edu.uiuc.ncsa.security.util.scripting.ScriptRunResponse createSRR​(edu.uiuc.ncsa.security.util.scripting.ScriptRunRequest scriptRunRequest,
                                                                                    List<ClaimSource> claimSources)
        After the request has been processed, call this to create the correct response object.
        Parameters:
        scriptRunRequest -
        claimSources -
        Returns:
      • updateFSValues

        public static void updateFSValues​(FlowStates2 f,
                                          edu.uiuc.ncsa.security.util.functor.logic.FunctorMap functorMap)
        The contract for this method is that the values of this object (default is all true) will be updated based on the functor map. Unless the values are explicitly changed, they remain.

        Unfortunately this has to be static for backwards compatibility. ClaimSources can have embedded functor scripts that may update claims and the flow. This was because there was not an actual set of control structures for functors that allowed for state to be shared, etc. Net effect is that that has to remain. With the arrival of QDL, there is never a need to have the claim source itself invoke some sort of processing.
        Parameters:
        functorMap -
      • findFSValue

        protected static boolean findFSValue​(edu.uiuc.ncsa.security.util.functor.logic.FunctorMap functorMap,
                                             FlowType type,
                                             boolean previousValue)