Access Requests and Grants#

Access Requests and Grants Flow#

Inrupt’s Enterprise Solid Server (ESS) supports an authorization mechanism based on Access Requests and Grants. With access requests and grants:

  1. An agent/requestor creates an access request for resources owned by another agent. This request includes the specific access mode (e.g. Read, Write, Append), the resource(s) to access, the owner of the resource(s), etc.

  2. The resource owner can review the access request and either grant the access request (resulting in an access grant) or deny the access request (resulting in an access denial).

  3. If the requesting agent has an access grant, the requesting agent can exchange the access grant for an access token in order to access the resources referenced in the access grant.

Enable Use of Access Grants#

ESS uses Access Control Policy (ACP) to define policies that determine access to Pod resources. To be able to use access grants for a resource, the resource must have a policy that enables the use of access grants.


The policy only enables the use of access grants on the resource for the access modes specified in the policy. To determine the access for an agent who is using an access grant, ESS uses the intersection of:

  • The allowed access specified by the resource’s ACP, and

  • The granted access specified in the access grant for that resource.

For example:

  • A resource has a policy that enables the use of access grants for Read access.

  • A requesting agent has received an access grant for that resource that allows Read and Write access.


  • The requesting agent can use the access grant to Read the resource only.

  • The requesting agent cannot use the access grant to Write the resource, even though the access grant specifies both Read and Write access.

Using the following code, the resource owner can enable the use of Access Grants to read and write the resource. If you pass in a Container (i.e., its URL ends with a slash /), the code enables the use of access grants for the Container and all its children/descendents (including those created later).

import com.inrupt.client.auth.Session;
import com.inrupt.client.openid.OpenIdSession;
import com.inrupt.client.solid.SolidSyncClient;
import com.inrupt.client.solid.SolidNonRDFSource;
import com.inrupt.client.accessgrant.AccessGrantUtils;
import com.inrupt.client.vocabulary.ACL;


public class ExampleClass {

   private SolidSyncClient client;  // Client for the resource owner.
   // ... Logic to initialize the client has been omitted for brevity.

   public void addReadWriteAccessGrantEnablingPolicy(String resourceURL) {

       try (final SolidNonRDFSource myResource =, SolidNonRDFSource.class)) {
           myResource.getMetadata().getAcl().ifPresent(acl -> {
               try (final SolidRDFSource acr =, SolidRDFSource.class)) {
                   AccessGrantUtils.accessControlPolicyTriples(acl, ACL.Read, ACL.Write)


To handle access requests and grants, Inrupt’s Java Client Library provides the inrupt-client-accessgrant module. See Setup.

The inrupt-client-accessgrant provides:


AccessGrantClient can interact with the ESS Access Grant Service; specifically, AccessGrantClient can be used to create/verify/query/fetch access requests and grants.


AccessGrantSession allows for the use of access grant(s) to interact with resource(s); specifically, using an AccessGrantSession, SolidClient/SolidSyncClient can access resources using the access grant(s).

Next Steps#

Create Access Requests/Grants

Create access requests and access grants.

Use Access Grants

Use Access Grants to access Pod resources.