メインコンテンツまでスキップ

OP VC Securing Mechanism Implementation Guidelines

本文書は Securing Verifiable Credentials using JOSE and COSE に準拠した OP VC の各クレーム、プロパティの値を具体的に指定する文書です。

注記

現在 OP VC の Securing Mechanism を Securing Verifiable Credentials using JOSE and COSE のみに限定しています。今後他の方式を採用する可能性があります。

Securing VC with JOSE

ヘッダー

  • typ ヘッダーパラメーターは vc+jwt でなければなりません (MUST)。
  • kid ヘッダーパラメーターは JWK Thumbprint でなければなりません (MUST)。
  • cty ヘッダーパラメーターは vc でなければなりません (MUST)。

ペイロード

次の表に基づき、データモデルのプロパティと JWT クレームは一対一対応します。仕様策定者はそうなるようにデータモデルを定義する必要があります (MUST)。

JWT ペイロードにデータモデルのプロパティと JWT クレームの両方を含めても構いません (MAY)。ただし、その場合にはデータモデルのプロパティと JWT クレームの値は競合してはなりません (MUST NOT)。

注記

Originator Profile 技術研究組合 (OP-CIP) の開発するアプリケーションでは、JWT ペイロードにデータモデルのプロパティと JWT クレームの両方を含めて署名します。

データモデルJWT
issuer (文字列)iss
issuer.idiss
credentialSubject.idsub
(署名した日時)iat
(署名失効日時)exp

追加の JWT クレーム

iat, exp

REQUIRED. JWT (RFC 7519) の仕様に従います。

Core Profile

ヘッダー:

{
"typ": "vc+jwt",
"cty": "vc",
"kid": "...",
"alg": "ES256"
}

ペイロード:

{
"iss": "dns:example.org",
"sub": "dns:example.jp",
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://originator-profile.org/ns/credentials/v1"
],
"type": ["VerifiableCredential", "CoreProfile"],
"issuer": "dns:example.org",
"credentialSubject": {
"id": "dns:example.jp",
"type": "Core",
"jwks": {
"keys": [
{
"x": "ypAlUjo5O5soUNHk3mlRyfw6ujxqjfD_HMQt7XH-rSg",
"y": "1cmv9lmZvL0XAERNxvrT2kZkC4Uwu5i1Or1O-4ixJuE",
"crv": "P-256",
"kid": "jJYs5_ILgUc8180L-pBPxBpgA3QC7eZu9wKOkh9mYPU",
"kty": "EC"
}
]
}
},
"iat": 1688623395,
"exp": 1720245795
}
Content Attestation

ヘッダー:

{
"typ": "vc+jwt",
"cty": "vc",
"kid": "...",
"alg": "ES256"
}

ペイロード

{
"iss": "dns:example.com",
"sub": "urn:uuid:78550fa7-f846-4e0f-ad5c-8d34461cb95b",
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://originator-profile.org/ns/credentials/v1",
"https://originator-profile.org/ns/cip/v1",
{ "@language": "ja" }
],
"type": ["VerifiableCredential", "ContentAttestation"],
"issuer": "dns:example.com",
"credentialSubject": {
"id": "urn:uuid:78550fa7-f846-4e0f-ad5c-8d34461cb95b",
"type": "Article",
"headline": "<Webページのタイトル>",
"image": {
"id": "https://media.example.com/image.png",
"digestSRI": "sha256-2ntYAX8nslHxMv5h7Wdv5QDaWxHq6dIOVAdwB9VztrY="
},
"description": "<Webページの説明>",
"author": ["山田花子"],
"editor": ["山田太郎"],
"datePublished": "2023-07-04T19:14:00Z",
"dateModified": "2023-07-04T19:14:00Z",
"genre": "Arts & Entertainment"
},
"allowedUrl": ["https://media.example.com/articles/2024-06-30"],
"target": [
{
"type": "VisibleTextTargetIntegrity",
"cssSelector": "<CSS セレクター>",
"integrity": "sha256-GYC9PqfIw0qWahU6OlReQfuurCI5VLJplslVdF7M95U="
},
{
"type": "ExternalResourceTargetIntegrity",
"integrity": "sha256-+M3dMZXeSIwAP8BsIAwxn5ofFWUtaoSoDfB+/J8uXMo="
}
],
"iat": 1688623395,
"exp": 1720245795
}
Profile Annotation (Certificate)

ヘッダー:

{
"typ": "vc+jwt",
"cty": "vc",
"kid": "...",
"alg": "ES256"
}

ペイロード:

{
"iss": "dns:pa-issuer.example.org",
"sub": "dns:pa-holder.example.jp",
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://originator-profile.org/ns/credentials/v1",
"https://originator-profile.org/ns/cip/v1",
{ "@language": "ja" }
],
"type": ["VerifiableCredential", "Certificate"],
"issuer": "dns:pa-issuer.example.org",
"credentialSubject": {
"id": "dns:pa-holder.example.jp",
"type": "ECJP",
"addressCountry": "JP",
"name": "○○新聞社 (※開発用サンプル)",
"corporateNumber": "0000000000000",
"postalCode": "000-0000",
"addressRegion": "東京都",
"addressLocality": "千代田区",
"streetAddress": "○○○",
"certificationSystem": {
"id": "urn:uuid:5374a35f-57ce-43fd-84c3-2c9b0163e3df",
"type": "CertificationSystem",
"name": "法人番号システムWeb-API",
"ref": "https://www.houjin-bangou.nta.go.jp/"
}
},
"iat": 1688623395,
"exp": 1720245795
}

暗号アルゴリズム

暗号アルゴリズムは「暗号アルゴリズム」に従います。

検証プロセス

VC の検証者は VC DM 2.0 に準拠した検証の実装を用いて検証することができます。

注記

将来、各検証の失敗に対応する ProblemDetails オブジェクト を定義する可能性があります。

@originator-profile/securing-mechanism において実装されている検証処理は次のプロセスでおこなわれます。

検証プロセスで扱うデータの構造については次のリファレンスを確認してください。

  • 未復号 VC
  • VcVerifyFailed
  • VcValidateFailed
  • OP VC DM 検証者
  • 検証済み VC

セキュリティ

TODO

Verifiable Credentials Data Model 2.0 セクション 9に記載のあるセキュリティの考慮事項を参考にしてください。