Interface Condition
- All Superinterfaces:
Cloneable
Deprecated.
The class
Condition defines an interface
to allow pluggable condition. These are used to control
policy decisions based on parameters such as time,
authentication level of the user session and IP address from which
the user is making the request.
A condition computes a ConditionDecision based on the state
of condition object as set by setProperties
method call and the environment passed in a map of key/value pairs.
ConditionDecision encapsulates whether a Policy
applies for the request and Advice messages generated by
the condition.
The following Condition implementation are provided with the
Policy framework:
- AuthLevelCondition
- LEAuthLevelCondition
- AuthSchemeCondition
- IPCondition
- SimpleTimeCondition
- SessionCondition
- SessionPropertyCondition
- AuthenticateToRealmCondition
- AuthenticateToServiceCondition
- LDAPFilterCondition
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.Key that is used in aAMIdentityMembershipConditionto specify the uuid(s) ofAMIdentiyobjects to which the policy would apply.static final StringDeprecated.Key that is used to specify the application idle time outstatic final StringDeprecated.Key that is used to specify application name for the resources protected by the policystatic final StringDeprecated.Key that is used to define the minimum authentication level in anAuthLevelConditionor the maximum authentication level in aLEAuthLevelConditionof a policy being evaluated.static final StringDeprecated.Key that is used identify the advice messages fromAuthLevelCondition.static final StringDeprecated.Key that is used to define the authentication scheme in anAuthSchemeConditionof a policy.static final StringDeprecated.Key that is used identify the advice messages fromAuthSchemeConditionstatic final StringDeprecated.static final StringDeprecated.Key used inAuthenticateToRealmConditionto specify the realm for which the user should authenticate for the policy to apply.static final StringDeprecated.Key that is used identify the advice messages fromAuthenticateToRealmConditionstatic final StringDeprecated.Key that is used inAuthenticateToServiceConditionto specify the authentication chain for which the user should authenticate for the policy to apply.static final StringDeprecated.Key that is used identify the advice messages fromAuthenticateToServiceConditionstatic final StringDeprecated.Key that is used in anIPConditionto define the DNS name values for which a policy applies.static final StringDeprecated.Key that is used in aSimpleTimeConditionto define the end of date range for which a policy applies.The value corresponding to the key has to be aSetthat has just one element which is aStringthat corresponds to the pattern described below.static final StringDeprecated.Key that is used in aSimpleTimeConditionto define the end of day of week range for which a policy applies.static final StringDeprecated.Key that is used inIPConditionto define the end of IP address range for which a policy applies.static final StringDeprecated.Key that is used in aSimpleTimeConditionto define the end of time range during which a policy applies.The value corresponding to the key has to be aSetthat has just one element which is aStringthat conforms to the pattern described here.static final StringDeprecated.Key that is used in aSimpleTimeConditionto define the time zone basis to evaluate the policy.static final StringDeprecated.Key that is passed in theenvparameter while invokinggetConditionDecisionmethod of anAMIdentityMembershipCondition.static final StringDeprecated.Key that is used in aLDAPFilterConditionto define the ldap filter that should be satisfied by the ldap entry of the user for the condition to be satisifed The value should be aSetwith only one element.static final StringDeprecated.Key that is used inSessionConditionto define the maximum session time in minutes for which a policy applies.static final StringDeprecated.Key that is used to define the authentication level of the request.static final StringDeprecated.Key that is used to define the name of authentication scheme of the request.static final StringDeprecated.Key that is used to identify the names of authenticated realms in the request.static final StringDeprecated.Key that is used to identify the names of authentication chains in the request.static final StringDeprecated.Key that is used to define request DNS name that is passed in theenvparameter while invokinggetConditionDecisionmethod of anIPCondition.static final StringDeprecated.Key that is used to define request IP address that is passed in theenvparameter while invokinggetConditionDecisionmethod of anIPCondition.static final StringDeprecated.Key that is used to define the time zone that is passed in theenvparameter while invokinggetConditionDecisionmethod of aSimpleTimeConditionValue for the key should be aTimeZoneobject.static final StringDeprecated.Key that is used in aSimpleTimeConditionto define the start of date range for which a policy applies.static final StringDeprecated.Key that is used in aSimpleTimeConditionto define the start of day of week range for which a policy applies.static final StringDeprecated.Key used inIPConditionto define the start of IP address range for which a policy applies.static final StringDeprecated.Key that is used inSimpleTimeConditionto define the beginning of time range during which a policy applies.static final StringDeprecated.Key inSessionConditionthat is used to define the option to terminate the session if the session exceeds the maximum session time.static final StringDeprecated.Key that is used to identify the advice messages fromTransactionConditionstatic final StringDeprecated.Key that is passed in theenvparameter while invokinggetConditionDecisionmethod of aSessionPropertyConditionto indicate if a case insensitive match needs to done of the property value against same name property in the user's single sign on token. -
Method Summary
Modifier and TypeMethodDescriptionclone()Deprecated.Returns a copy of this object.Deprecated.Gets the decision computed by this condition object, based on theMapof environment parametersgetDisplayName(String property, Locale locale) Deprecated.Gets the display name for the property name.Deprecated.Gets the properties of the conditionDeprecated.Returns a list of property names for the condition.getPropertySyntax(String property) Deprecated.Returns the syntax for a property namegetValidValues(String property) Deprecated.Returns a set of valid values given the property name.voidsetProperties(Map<String, Set<String>> properties) Deprecated.Sets the properties of the condition.
-
Field Details
-
AUTH_LEVEL
Deprecated.Key that is used to define the minimum authentication level in anAuthLevelConditionor the maximum authentication level in aLEAuthLevelConditionof a policy being evaluated. In case ofAuthLevelConditionpolicy would apply if the request authentication level is at least the level defined in condition while in case ofLEAuthLevelConditionpolicy would apply if the request authentication level is less than or equal to the level defined in the condition. The value should be aSetwith only one element. The element should be aString, parse-able as an integer or a realm qualified integer like "sun:1" where "sun" is a realm name.":" needs to used a delimiter between realm name and the level.- See Also:
-
REQUEST_AUTH_LEVEL
Deprecated.Key that is used to define the authentication level of the request. Its passed down in theenvMap to thegetConditionDecisioncall of anAuthLevelConditionorLEAuthLevelConditionfor condition evaluation.The value should be an Integer or a
SetofStrings. If it is aSetofStrings, each element of the set has to be parseable as integer or should be a realm qualified integer like "sun:1". If theenvparameter is null or does not define value forREQUEST_AUTH_LEVEL, the value forREQUEST_AUTH_LEVELis obtained from the single sign on token of the user -
AUTH_SCHEME
Deprecated.Key that is used to define the authentication scheme in anAuthSchemeConditionof a policy. Policy would apply if the authentication scheme of the request is same as defined in the condition. The value should be aSetwith only one element. The element should be aString, the authentication scheme name.- See Also:
-
APPLICATION_NAME
Deprecated.Key that is used to specify application name for the resources protected by the policy- See Also:
-
APPLICATION_IDLE_TIMEOUT
Deprecated.Key that is used to specify the application idle time out- See Also:
-
REQUEST_AUTH_SCHEMES
Deprecated.Key that is used to define the name of authentication scheme of the request. Its passed down as part of theenvMap togetConditionDecisionof anAuthSchemeConditionfor condition evaluation. Value for the key should be aSetwith each element being aString. If theenvparameter is null or does not define value forREQUEST_AUTH_SCHEMES, the value forREQUEST_AUTH_SCHEMESis obtained from the single sign on token of the user -
AUTHENTICATE_TO_REALM
Deprecated.Key used inAuthenticateToRealmConditionto specify the realm for which the user should authenticate for the policy to apply. The value should be aSetwith only one element. The should be aString, the realm name.- See Also:
-
REQUEST_AUTHENTICATED_TO_REALMS
Deprecated.Key that is used to identify the names of authenticated realms in the request. Its passed down as part of theenvMap togetConditionDecisionof anAuthenticateToRealmConditionfor condition evaluation. Value for the key should be aSetwith each element being aStringIf theenvparameter is null or does not define value forREQUEST_AUTHENTICATED_TO_REALMS, the value forREQUEST_AUTHENTICATED_TO_REALMSis obtained from the single sign on token of the user -
AUTHENTICATE_TO_SERVICE
Deprecated.Key that is used inAuthenticateToServiceConditionto specify the authentication chain for which the user should authenticate for the policy to apply. The value should be aSetwith only one element. The should be aString, the realm name.- See Also:
-
REQUEST_AUTHENTICATED_TO_SERVICES
Deprecated.Key that is used to identify the names of authentication chains in the request. Its passed down as part of theenvMap togetConditionDecisionof anAuthenticateToServiceConditionfor condition evaluation. Value for the key should be aSetwith each element being aString. If theenvparameter is null or does not define value forREQUEST_AUTHENTICATED_TO_SERVICES, the value forREQUEST_AUTHENTICATED_TO_SERVICESis obtained from the single sign on token of the user -
AUTH_SCHEME_CONDITION_ADVICE
Deprecated.Key that is used identify the advice messages fromAuthSchemeCondition- See Also:
-
AUTHENTICATE_TO_SERVICE_CONDITION_ADVICE
Deprecated.Key that is used identify the advice messages fromAuthenticateToServiceCondition- See Also:
-
AUTH_LEVEL_CONDITION_ADVICE
Deprecated.Key that is used identify the advice messages fromAuthLevelCondition.- See Also:
-
AUTH_TREE_CONDITION_ADVICE
Deprecated.- See Also:
-
AUTHENTICATE_TO_REALM_CONDITION_ADVICE
Deprecated.Key that is used identify the advice messages fromAuthenticateToRealmCondition- See Also:
-
TRANSACTION_CONDITION_ADVICE
Deprecated.Key that is used to identify the advice messages fromTransactionCondition- See Also:
-
START_IP
Deprecated.Key used inIPConditionto define the start of IP address range for which a policy applies. The value corresponding to the key has to be aSetthat has just one element which is aStringthat conforms to the pattern described here. If a value is defined for START_IP, a value should also be defined for END_IP. The patterns for IP Version 4 is : n.n.n.n where n would take any integer value between 0 and 255 inclusive. Some sample values are: 122.100.85.45 145.64.55.35 15.64.55.35 The patterns for IP Version 6 is: x:x:x:x:x:x:x:x where x are the hexadecimal values of the eight 16-bit pieces of the address Some sample values are: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 1080:0:0:0:8:800:200C:417A -
END_IP
Deprecated.Key that is used inIPConditionto define the end of IP address range for which a policy applies. The value corresponding to the key has to be aSetthat has just one element which is aStringthat conforms to the pattern described here. If a value is defined for END_IP, a value should also be defined for START_IP. The patterns is : n.n.n.n where n would take any integer value between 0 and 255 inclusive. Some sample values are 122.100.85.45 145.64.55.35 15.64.55.35 The patterns for IP Version 6 is: x:x:x:x:x:x:x:x where x are the hexadecimal values of the eight 16-bit pieces of the address Some sample values are: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 1080:0:0:0:8:800:200C:417A -
DNS_NAME
Deprecated.Key that is used in anIPConditionto define the DNS name values for which a policy applies. The value corresponding to the key has to be aSetwhere each element is aStringthat conforms to the patterns described here. The patterns is :ccc.ccc.ccc.ccc *.ccc.ccc.ccc
where c is any valid character for DNS domain/host name. There could be any number of.ccccomponents. Some sample values are:www.sun.com finace.yahoo.com *.yahoo.com
- See Also:
-
REQUEST_IP
Deprecated.Key that is used to define request IP address that is passed in theenvparameter while invokinggetConditionDecisionmethod of anIPCondition. Value for the key should be aStringthat is a string representation of IP of the client, For IP version 4: The form is n.n.n.n where n is a value between 0 and 255 inclusive. For IP version 6: The form is x:x:x:x:x:x:x:x where x is the hexadecimal values of the eight 16-bit pieces of the address -
REQUEST_DNS_NAME
Deprecated.Key that is used to define request DNS name that is passed in theenvparameter while invokinggetConditionDecisionmethod of anIPCondition. Value for the key should be a set of strings representing the DNS names of the client, in the formccc.ccc.cccfor IP version 4. For IP version 6, the form would bex:x:x:x:x:x:x:xIf theenvparameter is null or does not define value forREQUEST_DNS_NAME, the value forREQUEST_DNS_NAMEis obtained from the single sign on token of the user -
LDAP_FILTER
Deprecated.Key that is used in aLDAPFilterConditionto define the ldap filter that should be satisfied by the ldap entry of the user for the condition to be satisifed The value should be aSetwith only one element. The element should be aString.- See Also:
-
MAX_SESSION_TIME
Deprecated.Key that is used inSessionConditionto define the maximum session time in minutes for which a policy applies. The value corresponding to the key has to be aSetthat has just one element which is a string and parse-able as anInteger.- See Also:
-
TERMINATE_SESSION
Deprecated.Key inSessionConditionthat is used to define the option to terminate the session if the session exceeds the maximum session time. The value corresponding to the key has to be aSetthat has just one element which is a string. The option is on if the string value is equal totrue.- See Also:
-
START_TIME
Deprecated.Key that is used inSimpleTimeConditionto define the beginning of time range during which a policy applies. The value corresponding to the key has to be aSetthat has just one element which is aStringthat conforms to the pattern described here. If a value is defined forSTART_TIME, a value should also be defined forEND_TIME. The patterns is:HH:mmSome sample values are08:25 18:45- See Also:
-
END_TIME
Deprecated.Key that is used in aSimpleTimeConditionto define the end of time range during which a policy applies.The value corresponding to the key has to be aSetthat has just one element which is aStringthat conforms to the pattern described here. If a value is defined forEND_TIME, a value should also be defined forSTART_TIME. The patterns is:HH:mmSome sample values are08:25 18:45 -
START_DAY
Deprecated.Key that is used in aSimpleTimeConditionto define the start of day of week range for which a policy applies. The value corresponding to the key has to be aSetthat has just one element which is aStringthat is one of the valuesSun, Mon, Tue, Wed, Thu, Fri, Sat.If a value is defined forSTART_DAY, a value should also be defined forEND_DAY. Some sample values areSun Mon- See Also:
-
END_DAY
Deprecated.Key that is used in aSimpleTimeConditionto define the end of day of week range for which a policy applies. Its defined in aSimpleTimeConditionassociated with the policy. The value corresponding to the key has to be aSetthat has just one element which is aStringthat is one of the valuesSun, Mon, Tue, Wed, Thu, Fri, Sat.If a value is defined forEND_DAY, a value should also be defined forSTART_DAY. Some sample values areSun Mon- See Also:
-
START_DATE
Deprecated.Key that is used in aSimpleTimeConditionto define the start of date range for which a policy applies. The value corresponding to the key has to be aSetthat has just one element which is aStringthat corresponds to the pattern described below. If a value is defined forSTART_DATE, a value should also be defined forEND_DATE. The pattern isyyyy:MM:dd Some sample values are 2001:02:26 2002:12:31- See Also:
-
END_DATE
Deprecated.Key that is used in aSimpleTimeConditionto define the end of date range for which a policy applies.The value corresponding to the key has to be aSetthat has just one element which is aStringthat corresponds to the pattern described below. If a value is defined forEND_DATE, a value should also be defined forSTART_DATE. The pattern isyyyy:MM:dd Some sample values are 2001:02:26 2002:12:31 -
ENFORCEMENT_TIME_ZONE
Deprecated.Key that is used in aSimpleTimeConditionto define the time zone basis to evaluate the policy. The value corresponding to the key has to be a one elementSetwhere the element is aStringthat is one of the standard timezone IDs supported by java or aStringof the patternGMT[+|-]hh[[:]mm]here. If the value is not a valid time zone id and does not match the patternGMT[+|-]hh[[:]mm], it would default to GMT- See Also:
-
REQUEST_TIME_ZONE
Deprecated.Key that is used to define the time zone that is passed in theenvparameter while invokinggetConditionDecisionmethod of aSimpleTimeConditionValue for the key should be aTimeZoneobject. This would be used only if theENFORCEMENT_TIME_ZONEis not defined for theSimpleTimeCondition -
VALUE_CASE_INSENSITIVE
Deprecated.Key that is passed in theenvparameter while invokinggetConditionDecisionmethod of aSessionPropertyConditionto indicate if a case insensitive match needs to done of the property value against same name property in the user's single sign on token.- See Also:
-
INVOCATOR_PRINCIPAL_UUID
Deprecated.Key that is passed in theenvparameter while invokinggetConditionDecisionmethod of anAMIdentityMembershipCondition. The value specifies the uuid(s) for which the policy would apply. The value should be aSet. Each element of theSetshould be a String, the uuid of theAMIdentityobjet.- See Also:
-
AM_IDENTITY_NAME
Deprecated.Key that is used in aAMIdentityMembershipConditionto specify the uuid(s) ofAMIdentiyobjects to which the policy would apply. These uuid(s) are specified in the condition at policy definition time. The value should be aSetEach element of theSetshould be a String, the uuid of the invocator.- See Also:
-
-
Method Details
-
getPropertyNames
Deprecated.Returns a list of property names for the condition.- Returns:
- list of property names
-
getPropertySyntax
Deprecated.Returns the syntax for a property name- Parameters:
property- property name- Returns:
Syntaxfor the property name- See Also:
-
getDisplayName
Deprecated.Gets the display name for the property name. Thelocalevariable could be used by the plugin to customize the display name for the given locale. Thelocalevariable could benull, in which case the plugin must use the default locale.- Parameters:
property- property namelocale- locale for which the property name must be customized- Returns:
- display name for the property name.
- Throws:
PolicyException- If the display name could not be retrieved.
-
getValidValues
Deprecated.Returns a set of valid values given the property name. This method is called if the property Syntax is either the SINGLE_CHOICE or MULTIPLE_CHOICE.- Parameters:
property- property name- Returns:
- Set of valid values for the property.
- Throws:
PolicyException- if unable to get the Syntax.
-
setProperties
Deprecated.Sets the properties of the condition. This influences theConditionDecisionthat would be computed by a call to methodgetConditionDecision(Map)and theAdvicemessages generated included in theConditionDecision.ConditionDecisionencapsulates whether a policy applies for the request and advice messages generated by the condition. For example, for aSimpleTimeCondition, the properties would defineStartTimeandEndTime, to define the time range during which the policy applies- Parameters:
properties- the properties of the condition that would influence theConditionDecisionreturned by a call to methodgetConditionDecision(Map). Keys of the properties have to be String. Value corresponding to each key have to be aSetofStringelements. Each implementation of Condition could add further restrictions on the keys and values of thisMap.- Throws:
PolicyException- for any abnormal condition- See Also:
-
getProperties
Deprecated.Gets the properties of the condition- Returns:
- properties of the condition
- See Also:
-
getConditionDecision
ConditionDecision getConditionDecision(SSOToken token, Map<String, Set<String>> env) throws PolicyException, SSOExceptionDeprecated.Gets the decision computed by this condition object, based on theMapof environment parameters- Parameters:
token- single-sign-onSSOTokenof the userenv- request specific environmentMapof key/value pairs For example this would contain IP address of remote client for anIPCondition.- Returns:
- the condition decision.
The condition decision encapsulates whether a
Policyapplies for the request andadvicemessages generated by the condition. Policy framework continues evaluating aPolicyonly if it applies to the request as indicated by theConditionDecision. Otherwise, further evaluation of thePolicyis skipped. However, theAdvicemessages encapsulated in theConditionDecisionare aggregated and passed up, encapsulated in thePolicyDecision. - Throws:
PolicyException- if the decision could not be computedSSOException- if SSO token is not valid- See Also:
-
clone
Object clone()Deprecated.Returns a copy of this object.- Returns:
- a copy of this object
-