1. A method comprising: retrieving, by a computer system, policy attachment metadata identifying a web service policy and a policy subject prior to the web service policy attaching to the policy subject at runtime, the policy attachment metadata indicating that the web service policy attaches to the policy subject at runtime; receiving, by the computer system, a constraint expression configured to return a Boolean result prior to the web service policy attaching to the policy subject at runtime, the constraint expression being dependent on at least one parameter whose value is only available at runtime of the policy subject; and modifying, by the computer system, the policy attachment metadata prior to the web service policy attaching to the policy subject at runtime to include a reference to the constraint expression, wherein the modified policy attachment metadata indicates that the web service policy attaches to the policy subject when the constraint expression is satisfied at runtime of the policy subject, wherein the modified policy attachment metadata indicates that the web service policy does not attach to the policy subject when the constraint expression fails to be satisfied at runtime of the policy subject.