1. A system for automatically generating code for an authorization policy for network resources, the system comprising: one or more processors; and a memory in communication with the one or more processors, wherein the memory contains instructions that when executed by the one or more processors, cause the one or more processors to: automatically generate obligation code for the policy, wherein rules of the policy are modeled using an ontologically defined ruleset; and automatically generate XACML rule code for the policy based on the same ontologically defined ruleset.