Consent Management

Example Setup

This example setup shows one of the many possible ways to enable consent-based access decisions with IDENTOS Consent Management tools.

In our example, we'll build off the Access Management Example Setup by using an IDENTOS Wallet to add a user to the authorization flow. This simple consent flow... Expand.

TODO: Create overview diagram.

By the end of this tutorial, you'll have used the Wallet to do the following:

  • Enroll an Authorization Server in the Wallet (Step 1)
  • Add Resource Definitions in the Wallet (Step 2)
  • Enroll a Data Source in the Wallet (Step 3)

Prerequisites

If you'd like to try this setup for yourself, please note the following assumptions:

  • You've already completed the Access Management Quickstart.
  • You have admin access to an IDENTOS Wallet that's already installed and running (this should already be setup for you).
  • You know how to make API calls using cURL (client URL command line utility).

Define placeholder variables

Step-by-Step Procedure

TBD

TODO: Create overview diagram.

1. Enroll an Authorization Server

Enroll the Authorization Server used in the Access Management Quickstart

2. Add Resource Definitions

Create the same Resource types/definitions/scopes created in the Authorization Server from the Access Management Quickstart

3. Enroll a Data Source

Enroll a data source (in this case, the Resource Server from Access Management Quickstart; mention that an IDP can also be a data source)

4. Enroll a Client

Prerequisites: Configure Client as UMA Client, add/emphasize Client Redirect URL

Enroll the client from the Access Management Quickstart example (blood glucose app)

5. Create a Ticket

🌟 Key Concept: A Ticket is what allows a Client to obtain an Access Token from the Authorization Server. Tickets contain all the information that defines what Resources a Client can access.

To create a Ticket in the Authorization Server, we'll need to...

  1. Define the Ticket Purpose in the Authorization Server.
  2. Create a Capability Ticket in the Authorization Server. This links the Ticket Purpose to the Client making the request.
  3. Define the Requested Resource in the Authorization Server. This links the Client to the types of Resources and scopes they can access.
  4. Create a Requested Resource Capability Ticket in the Authorization Server. This combines the Capability Ticket and Requested Resource into a single Ticket that represents the Client's overall permissions for accessing a Resource.

For our example, we want to create a Ticket that allows the hospital's web application to read blood-glucose-level Resources.

1

Define the Ticket Purpose in the Authorization Server.

Run the API call below to declare that the purpose of the ticket is "Blood Glucose App wants to read your blood glucose records." In certain authorization flows, this is the message that would be presented to an end user. Since this is the first purpose we're declaring, it will be id = 1 in the purpose database.

Curl

2

Create a Capability Ticket for the Client in the Authorization Server.

Run the API call below to create the Blood Glucose App Ticket with the unique ID of blood-glucose-app in the capability-ticket database. This will also associate the Capability Ticket with the Ticket Purpose and the OAuth client (id = 1) created in Step 3.

Curl

3

Define the Requested Resource in the Authorization Server.

Run the API call below to declare the blood-glucose-level Resource Definition from Step 2 with the Client, Ticket Purpose, and read scope. Since this is our first Requested Resource, it will be id = 1 in the requested-resource database.

Curl

4

Create a Requested Resource Capability Ticket in the Authorization Server.

Finally, run the API call below to create a single Ticket that combines the Capability Ticket and Requested Resource we created in the previous API calls. Since this is the first Ticket we're making, it will be id = 1 in the requested-resources-capability-tickets database.

Curl


Step 4 complete! Now that we have a Ticket, the Client can use the Ticket to obtain an Access Token from the Authorization Server.

Note that the Client won't necessarily "have" or "present" this Ticket themselves. In reality, it's more of an internal record that the Authorization Server checks when a Client requests an Access Token.

6. Get an Access Token

🌟 Key Concept: An Access Token is a credential granted by the Authorization Server that allows Client applications to access protected Resources from a Resource Server. The Authorization Server will only grant an Access Token if the Client has a valid Ticket.

To get an Access Token from the Authorization Server, we'll need to...

  1. Use a Ticket to request an authorization code from the Authorization Server.
  2. Use the authorization code to request an Access Token from the Authorization Server.
  3. Retrieve the Access Token from the Authorization Server.

We've already created a Ticket for our Client in the previous step. When the Client requests a protected Resource, the Authorization Server will check the request against the Client's ticket. If the request is inline with the Resource defintion and scopes that the Client is authorized to access, then then Authorization Server will grant an Access Token to the Client.

For our example,

1

Retrieve an authorization code from the Authorization Server.

Navigate to the URL below to GET an authorization code... Expand.

Shell


The authorization code will be appended to the redirect URL (code). In this case, the authorization code is df4ba24c-ebfb-43b8-90d9-64d90f7dd647.

Shell

2

Use the authorization code to request an Access Token from the Authorization Server.

Run the API call below to request an Access Token using the authorization code obtained in the previous step.

Curl

3

Retrieve the Access Token from the Authorization Server response.

The response will include the access_token, as well as other details such as when the Access Token expires and what the available scopes are.

Curl


Step 4 complete! Read on to finish the setup and learn the next steps.

🎉 Tutorial complete! Congratulations! You've just...

Next Steps

TBD

  • Learn how to manage consent with the Wallet?
  • Add an Identity Provider (as Data Source)



Updated 15 Apr 2024
Did this page help you?