Skip to content

Commit a153111

Browse files
authored
Merge pull request #210178 from cljung/cljung-vc-post-ga-08
Presentation attestation - new page
2 parents 88968ec + 10da354 commit a153111

File tree

6 files changed

+149
-14
lines changed

6 files changed

+149
-14
lines changed

articles/active-directory/verifiable-credentials/TOC.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838
items:
3939
- name: Directory based - Employee
4040
href: how-to-use-quickstart-verifiedemployee.md
41-
- name: ID Token Hint credentials
41+
- name: Id token hint attestation
4242
href: how-to-use-quickstart.md
43-
- name: ID Token credentials
43+
- name: Id token attestation
4444
href: how-to-use-quickstart-idtoken.md
45-
- name: Self Issued credentials
45+
- name: Presentation attestation
46+
href: how-to-use-quickstart-presentation.md
47+
- name: Self issued attestation
4648
href: how-to-use-quickstart-selfissued.md
4749
- name: Use the Verified ID Network
4850
href: how-use-vcnetwork.md

articles/active-directory/verifiable-credentials/credential-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The following four attestation types are currently available to be configured in
101101

102102
* **ID token hint**: The sample App and Tutorial use the ID token Hint. When this option is configured, the relying party app will need to provide claims that should be included in the verifiable credential in the Request Service API issuance request. Where the relying party app gets the claims from is up to the app, but it can come from the current sign-in session, from backend CRM systems or even from self asserted user input. To configure this option, please see this [how to guide](how-to-use-quickstart.md)
103103

104-
* **Verifiable credentials**: The end result of an issuance flow is to produce a verifiable credential but you may also ask the user to Present a verifiable credential in order to issue one. The rules definition is able to take specific claims from the presented verifiable credential and include those claims in the newly issued verifiable credential from your organization.
104+
* **Verifiable credentials**: The end result of an issuance flow is to produce a verifiable credential but you may also ask the user to Present a verifiable credential in order to issue one. The rules definition is able to take specific claims from the presented verifiable credential and include those claims in the newly issued verifiable credential from your organization. To configure this option, please see this [how to guide](how-to-use-quickstart-presentation.md)
105105

106106
* **Self-attested claims**: When this option is selected, the user can type information directly into Authenticator. At this time, strings are the only supported input for self attested claims. To configure this option, please see this [how to guide](how-to-use-quickstart-selfissued.md)
107107

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
title: Issue verifiable credentials by presenting claims from an existing verifiable credential
3+
description: Learn how to use a quickstart to create custom credentials for from other VC attestation
4+
documentationCenter: ''
5+
author: barclayn
6+
manager: amycolannino
7+
ms.service: decentralized-identity
8+
ms.topic: how-to
9+
ms.subservice: verifiable-credentials
10+
ms.date: 07/06/2022
11+
ms.author: barclayn
12+
13+
#Customer intent: As a verifiable credentials administrator, I want to create a verifiable credential for self-asserted claims scenario.
14+
---
15+
16+
# Issue verifiable credentials by presenting claims from an existing verifiable credential
17+
18+
[!INCLUDE [Verifiable Credentials announcement](../../../includes/verifiable-credentials-brand.md)]
19+
20+
A [rules definition](rules-and-display-definitions-model.md#rulesmodel-type) that uses the [presentations attestation](rules-and-display-definitions-model.md#verifiablepresentationattestation-type) type produces an issuance flow where you want the user to present another verifiable credential in the wallet during issuance and where claim values for issuance of the new credential are taken from the presented credential. An example of this can be when you present your VerifiedEmployee credential to get a visitors pass credential.
21+
22+
## Create a custom credential with the presentations attestation type
23+
24+
In the Azure portal, when you select **Add credential**, you get the option to launch two quickstarts. Select **custom credential**, and then select **Next**.
25+
26+
:::image type="content" source="media/how-to-use-quickstart/quickstart-startscreen.png" alt-text="Screenshot of the 'Issue credentials' quickstart for creating a custom credential.":::
27+
28+
On the **Create a new credential** page, enter the JSON code for the display and the rules definitions. In the **Credential name** box, give the credential a name. This name is just an internal name for the credential in the portal. The type name of the credential is defined in the `vc.type` property name in the rules definition. To create the credential, select **Create**.
29+
30+
:::image type="content" source="media/how-to-use-quickstart/quickstart-create-new.png" alt-text="Screenshot of the 'Create a new credential' page, displaying JSON samples for the display and rules files.":::
31+
32+
## Sample JSON display definitions
33+
34+
The JSON display definition is nearly the same, regardless of attestation type. You only have to adjust the labels according to the claims that your verifiable credential has. The expected JSON for the display definitions is the inner content of the displays collection. The JSON is a collection, so if you want to support multiple locales, add multiple entries with a comma as separator.
35+
36+
```json
37+
{
38+
"locale": "en-US",
39+
"card": {
40+
"backgroundColor": "#000000",
41+
"description": "Use your verified credential to prove to anyone that you know all about verifiable credentials.",
42+
"issuedBy": "Microsoft",
43+
"textColor": "#ffffff",
44+
"title": "Verified Credential Expert",
45+
"logo": {
46+
"description": "Verified Credential Expert Logo",
47+
"uri": "https://didcustomerplayground.blob.core.windows.net/public/VerifiedCredentialExpert_icon.png"
48+
}
49+
},
50+
"consent": {
51+
"instructions": "Present your True Identity card to issue your VC",
52+
"title": "Do you want to get your Verified Credential?"
53+
},
54+
"claims": [
55+
{
56+
"claim": "vc.credentialSubject.firstName",
57+
"label": "First name",
58+
"type": "String"
59+
},
60+
{
61+
"claim": "vc.credentialSubject.lastName",
62+
"label": "Last name",
63+
"type": "String"
64+
}
65+
]
66+
}
67+
```
68+
69+
## Sample JSON rules definitions
70+
71+
The JSON attestation definition should contain the **presentations** name. The **inputClaim** in the mapping section defines what claims should be captured in the credential the user presents. They need to have the prefix `$.vc.credentialSubject`. The **outputClaim** defined the name of the claims in the credential being issued.
72+
73+
The following rules definition will ask the user to present the **True Identity** credential during issuance. This credential comes from the [public demo application](https://woodgroveemployee.azurewebsites.net/).
74+
75+
```json
76+
{
77+
"attestations": {
78+
"presentations": [
79+
{
80+
"mapping": [
81+
{
82+
"outputClaim": "firstName",
83+
"required": true,
84+
"inputClaim": "$.vc.credentialSubject.firstName",
85+
"indexed": false
86+
},
87+
{
88+
"outputClaim": "lastName",
89+
"required": true,
90+
"inputClaim": "$.vc.credentialSubject.lastName",
91+
"indexed": false
92+
}
93+
],
94+
"required": false,
95+
"credentialType": "TrueIdentity",
96+
"contracts": [
97+
"https://verifiedid.did.msidentity.com/v1.0/tenants/3c32ed40-8a10-465b-8ba4-0b1e86882668/verifiableCredentials/contracts/M2MzMmVkNDAtOGExMC00NjViLThiYTQtMGIxZTg2ODgyNjY4dHJ1ZSBpZGVudGl0eSBwcm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TmJfUElmdFhfOGciLCJyZWNvdmVyeUNvbW1pdG1lbnQiOiJFaUN2RFdOTFhzcE1sbGJfbTFJal96ZV9SaWNKOWdFLUM1b2dlN1NnZTc5cy1BIn19"
101+
]
102+
}
103+
]
104+
},
105+
"validityInterval": 2592001,
106+
"vc": {
107+
"type": [
108+
"VerifiedCredentialExpert"
109+
]
110+
}
111+
}
112+
```
113+
114+
| Property | Type | Description |
115+
| -------- | -------- | -------- |
116+
|`credentialType`| string | credential type being requested during issuance. `TrueIdentity` in the above example. |
117+
|`contracts` | string (array) | list of manifest URL(s) of credentials being requested. In the above example, the manifest URL is the manifest for `True Identity` |
118+
| `trustedIssuers` | string (array) | a list of allowed issuer DIDs for the credential being requested. In the above example, the DID is the DID of the `True Identity`issuer. |
119+
120+
Values
121+
122+
## Authenticator experience during issuance
123+
124+
During issuance, Authenticator prompts the user to select a matching credential. If the user has multiple matching credentials in the wallet, the user must select which one to present.
125+
126+
:::image type="content" source="media/how-to-use-quickstart-presentation/issue-presentation.png" alt-text="Screenshot of presentations claims input.":::
127+
128+
## Configure the samples to issue your custom credential
129+
130+
To configure your sample code to issue and verify your custom credential, you need:
131+
132+
- Your tenant's issuer decentralized identifier (DID)
133+
- The credential type
134+
- The manifest URL to your credential
135+
136+
The easiest way to find this information for a custom credential is to go to your credential in the Azure portal. Select **Issue credential**. Then you have access to a text box with a JSON payload for the Request Service API. Replace the placeholder values with your environment's information. The issuer’s DID is the authority value.
137+
138+
:::image type="content" source="media/how-to-use-quickstart/quickstart-config-sample-2.png" alt-text="Screenshot of the quickstart custom credential issue.":::
139+
140+
## Next steps
141+
142+
See the [Rules and display definitions reference](rules-and-display-definitions-model.md).

articles/active-directory/verifiable-credentials/how-to-use-quickstart.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,7 @@ ms.author: barclayn
1717

1818
[!INCLUDE [Verifiable Credentials announcement](../../../includes/verifiable-credentials-brand.md)]
1919

20-
## Prerequisites
21-
22-
To use the Microsoft Entra Verified ID quickstart, you need only to complete the verifiable credentials onboarding process.
23-
24-
## What is the quickstart?
25-
26-
Entra Verified ID now come with quickstarts in the Azure portal for creating custom credentials. When you use the quickstart, you don't need to edit and upload rules and display files to Azure Storage. Instead, you enter all details in the Azure portal and create the credential on a single page.
27-
28-
>[!NOTE]
29-
>When you work with custom credentials, you provide display definitions and rules definitions in JSON documents. These definitions are stored with the credential details.
20+
A [rules definition](rules-and-display-definitions-model.md#rulesmodel-type) that uses the [idTokenHint attestation](rules-and-display-definitions-model.md#idtokenhintattestation-type) produces an issuance flow where the relying party application passes claim values in the [issuance request payload](issuance-request-api.md#issuance-request-payload). It is the relying party application's responsibility to ensure that required claim values are passed in the request. How the claim values are gathered is up to the application.
3021

3122
## Create a custom credential
3223

111 KB
Loading
-2.04 KB
Loading

0 commit comments

Comments
 (0)