1. A machine-implemented method to execute on a machine, comprising: detecting, by the machine, a request by a principal for access to a resource, access is conditioned on a status of a role associated with the request, the principal, and the resource, the role provides instance-level granularity for security permission assignments with respect to accessing the resource, the instance-level granularity represents instance-level data created by an application within a context manager and the instance-level data includes a name associated with the resource, parameter data associated with the principal, parameter data associated with the resource, and parameter data passed by the principal in a call to the method; providing, by the machine via the context manager a processing environment within which the resource and the method process and the context manager providing transaction services, lifecycle management services, memory persistence, and security service, the context manager also informing the method of the request and the context manager providing a list of available roles for the principal back to the method that the method resolves within the context of the request, the processing environment provided by the context manager is a virtual machine overlaid on an operating system; evaluating, by the machine, a constraint associated with the role to determine the status, the constraint is an expression that evaluates to a percentage, the expression includes operators, values, function calls, method calls, and variables, and the constraint is either a global constraint or a local constraint; and providing, by the machine, the status to the context manager, which decides whether to provide access to the resource for purposes of satisfying the request.