virtual ~SecurityPolicyRule() {}
/**
+ * Returns the rule's class/type.
+ *
+ * @return the class/type of the object
+ */
+ virtual const char* getType() const=0;
+
+ /**
* Evaluates the rule against the given request and message.
*
+ * <p>An exception will be raised if the message is invalid according to
+ * a policy rule.
+ *
* @param message the incoming message
* @param request the protocol request
* @param policy SecurityPolicy to provide various components and track message data
- *
- * @throws BindingException raised if the message/request is not acceptable to the policy rule
*/
virtual void evaluate(
- const xmltooling::XMLObject& message, const xmltooling::GenericRequest* request, SecurityPolicy& policy
+ const xmltooling::XMLObject& message,
+ const xmltooling::GenericRequest* request,
+ SecurityPolicy& policy
) const=0;
};
void SAML_API registerSecurityPolicyRules();
/**
- * SecurityPolicyRule for processing SAML 1.x messages.
- *
- * Extracts message ID, timestamp, and issuer information.
- */
- #define SAML1MESSAGE_POLICY_RULE "SAML1Message"
-
- /**
- * SecurityPolicyRule for processing SAML 2.0 messages.
- *
- * Extracts message ID, timestamp, and issuer information.
- */
- #define SAML2MESSAGE_POLICY_RULE "SAML2Message"
-
- /**
* SecurityPolicyRule for TLS client certificate authentication.
*
* Evaluates client certificates against the issuer's metadata.
#define MESSAGEFLOW_POLICY_RULE "MessageFlow"
/**
+ * SecurityPolicyRule for disabling security.
+ *
+ * Allows the message issuer to be authenticated regardless of the message or
+ * transport. Used mainly for debugging or in situations that I wouldn't care to
+ * comment on.
+ */
+ #define NULLSECURITY_POLICY_RULE "NullSecurity"
+
+ /**
* SecurityPolicyRule for protocol message "blob" signing.
*
* Allows the message issuer to be authenticated using a non-XML digital signature