소개
TrustBloc이란(What is TrustBloc?)
차세대 디지털 ID 네트워크를위한 공통 표준 및 개발 프레임 워크를 설정하기위한 상호 운용성 이니셔티브입니다.
왜 TrustBloc을 사용합니까?(Why use TrustBloc?)
오늘날 일상적인 사용자가 자신의 신원을 저장, 배포 및 제어 할 수 있도록 디지털 신원을 만드는 것을 목표로하는 여러 프로젝트가 존재합니다. 그러나 이러한 솔루션 중 상당수는 부분적으로 만 제공되며 서로 잘 통합되지 않을 수 있습니다.
TrustBloc은 생산 준비가 된 디지털 ID 플랫폼을 배포 할 수있는 종단 간 아키텍처를 제공합니다.
아키텍쳐
위의 다이어그램은 TrustBloc 이니셔티브와 관련된 구성 요소의 개요를 나타냅니다.
TrustBloc 이니셔티브는 컨소시엄이 문서 출처 및 데이터 교환을 가능하게하는 공통 인프라를 제공하는 동시에 이러한 컨소시엄이 서비스 제공에 따라 차별화 할 수 있도록합니다. 우리는 제안 된 Hyperledger Aries 프로젝트와 함께 Hyperledger Fabric의 기존 커뮤니티 노력을 기반으로 구축하고 있습니다.
TrustBloc 이니셔티브는 컨소시엄 기반 문서 출처 및 서비스를 제공하여 신뢰 장애를 줄이는 것을 목표로합니다. 우리는 Fabric에서 DID를 관리하고 노출 할 수 있도록하고보다 일반적으로 문서 출처를 가능하게합니다. 다음 기능은 이니셔티브의 초기 목표입니다.
- 문서 출처(DID 포함)를 위한 기본 기능(out-of-the-box capabilities)을 제공.
- Hyperledger Fabric 개인 컬렉션을 강화하여 사이드 트리를 제공. 각 식별자 또는 문서에 대해 개별 Fabric 트랜잭션을 수행하지 않고도 식별자와 문자를 채널에 고정할 수 있음.
- 오프 체인 분산 스토리지 모델을 활성화하여 트랜잭션을 지원.
- 특정 조직으로 범위가 지정된 데이터에 대한 저장소 및 쿼리 모델을 지원
특정 조직으로 범위가 지정된 데이터에 대한 저장소 및 쿼리 모델을 지원
데이터 교환 구성 요소(Data Exchange Components)
TrustBloc은 또한 검증 가능한 자격 증명 교환 흐름을 제공합니다. 우리는 DID, 검증 가능한 자격 증명 및 허브를 기반으로 디지털 신원 교환을위한 모델을 활성화하고 있습니다. 이는 다음을 통해 달성됩니다.
- 새로운 커뮤니티 사양 (예 : DID 및 검증 가능한 자격 증명) 활용.
- 원장 기반 DID 및 검증 가능한 자격 증명에 고정하는 동안 피어 DID를 사용하여 데이터 교환 트랜잭션을 설정할 수 있음.
- 효율적인 실시간 데이터 교환을 위해 허브 기반 모델을 지원.
Message Routing and Storage
Summary
이 제안은 다음을 가능하게하기 위해 Hyperledger Aries / Indy 및 DIF 커뮤니티의 여러 제안을 재사용, 수정 및 조정합니다.
- 발급자가 발급을 위해 사용자의 사전 동의를 요구하는 경우와 같은 자격 증명 교환을 위한 진보된 사용 사례
- 메시지 전달 보장-에이전트를 일시적으로 사용할 수 없는 경우에도 중재자에서 에이전트로 메시지를 사용자 지정 라우팅
- 중재자에서 에이전트로 메시지를 사용자 지정 라우팅
- 통합 메시지 라우팅 프로토콜 및 API
- 암호화 키와 분리 된 암호화 된 ID의 안전한 저장
- 지갑 동기화를 위한 더 간단한 모델
- 단순 및 이중 메시징 패러다임
특히,이 제안은 다음 제안에 의해 정립 된 기반을 기반으로합니다.
- DIF Identity Hub
- Aries RFC 0046: Mediators and Relays
- Aries RFC 0019: Encryption Envelope
- Aries RFC 0094: Cross Domain Messaging
- Aries RFC 0050: Wallets
다음은 일반적인 단순화 된 보기입니다.
1 - 허브 스토리지(Hub Storage)
DIF Identity Hub의 컬렉션 인터페이스 및 복제 프로토콜에 해당합니다.
여기에 저장된 개체는 에이전트만 액세스 할 수 있으므로 Permissions API는 무시됩니다.
이 스토리지 서비스는 여기에 표시된대로 스토리지 인터페이스의 구현으로 에이전트의 지갑에 연결됩니다.
2 - 중재자(Mediator)
중재자는 메시지를 필터링 (승인)하고 사용자가 지정한 허브 저장소 위치에 저장된 사용자 지정 규칙에 따라 ID 소유자가 선택한 에이전트로 라우팅합니다.
중재자는 전달이 확인 될 때까지 에이전트로 전송된 전달되지 않은 메시지를 버퍼링합니다.
중재자는 여러 가지 흥미로운 사용 사례를 지원하기 위해 다양한 방법으로 확장 될 수 있습니다. 예를 들어 발급 사의 대리인은 요청을 이행하기 위해 다른 중재자 (해당 대리인의 사전 동의가 있음)로부터 공동 작업을 요청할 수 있습니다.
3 - Relay Network
주권 도메인 간의 메시지는 릴레이 네트워크를 통해 전송됩니다.
중재자는 요구 사항에 따라 하나 또는 여러 중계 네트워크를 통해 통신 할 수 있습니다.
예를 들어, 중재자는 에이전트의 개인 정보를 보호하기 위해 공용 TOR 릴레이 네트워크를 활용하거나 단순히 인터넷을 사용할 수 있습니다.
신뢰할 수있는 컨텍스트(Trusted Contexts)
위의 다이어그램에 보여진 기본 교환은 많은 실제 사용 사례를 해결하지만, 발급자가 사용자 데이터의 소유자로 남아있는 시나리오를 지원하도록 확장되어야하며 사용자는 제어 위치에 있습니다.
사용자는 Peer DID를 공유하여 다른 당사자에게 직접 자신을 소개하거나 공인 기관의 잘 알려진 블록 체인 고정 DID를 표시하는 앱을 통해 이러한 다른 피어를 발견할 수 있습니다.
블록 체인에 고정된 잘 알려진 DID를 가진 당사자를 표시하는 모바일 에이전트는 모두 신뢰할 수 있는 발급자(신뢰할 수있는 발급자는 표시되지 않음)의 검증 가능한 자격 증명을 보유합니다.
각각의 파티에게(개별적으로) 소개되면, 사용자는 멤버십에 필요한 검증 가능한 자격 증명과 함께이 컨텍스트에서 사용할 새 DID 식별자를 각각 요청하여 모든 파티간에 신뢰할 수있는 컨텍스트를 생성합니다.
신뢰할 수있는 컨텍스트의 설정은 사용자가 다른 당사자에게 동의 영수증을 제공하는 것으로 끝납니다.
신뢰할 수 있는 컨텍스트 기반 릴레이(Relays based on Trusted Context)
이전 다이어그램은 신뢰할 수있는 컨텍스트의 논리적 구성을 보여준 것이고, 더 명확하게하기 위해 참가자 사이에는 신뢰할 수있는 컨텍스트를 기반으로 라우팅하는 중재자 및 중계 네트워크가 있습니다. 특히 사용자 데이터는 중개자와 릴레이 네트워크를 통과합니다.
함께 모아서(Putting it all together)
신뢰 컨텍스트는 다음을 통해 실현됩니다.
- 컨텍스트 내에서 DID를 식별자로 사용
- 사용자 데이터 표현을 위해 검증 가능한 자격 증명 사용
잘 알려진 표준 스키마를 따르는 사용자의 동의 확인 포함 - 당사자간에 협상 된 자격 증명 스키마
- 당사자간에 협상 된 릴레이 네트워크
- 에이전트에게 메시지 전달을 보장하는 중재자
컨텍스트 내에서 DID를 식별자로 사용
또 다른 시나리오는 UMA와 유사한 방식으로 사용자 중재자에게 위임하는 발급자 중재자가 있습니다.
Privacy-Enhanced OAuth 2.0
Status: DRAFT
Introduction
Purpose of this document
This document describes a reference implementation of OAuth 2.0 with unregistered clients communicating and authenticating securely over the backchannel with decentralized identifiers and verifiable credentials.
Motivation
There is a desire to leverage existing OAuth 2.0 infrastructure to build a privacy-enhanced data sharing solution.
Finalized in 2012, OAuth 2.0 ([RFC6749]), is an established authorization framework well suited to give a piece of software access to protected resources with the owner’s consent. It was not, however, designed with the principles of Privacy by Design ([PRIV-DESIGN]) in mind.
First published in 2009, the principles of privacy by design became widely known after the GDPR adopted them ([GDPR-PRIV]) and began enforcement in 2018. We seek to address two key principles of privacy by design that OAuth 2.0 does not:
Protect the user’s privacy by keeping the solution User-Centric
- Use the authorization grant mechanism of OAuth 2.0 to keep the user in the locus of control.
- Use decentralized identifiers (DIDs) ([DID-CORE]) so the user (and the other actors) can avoid undesired correlation.
Protect the user’s privacy with end-to-end security
- Use end-to-end authenticated encryption of the messages and data while in transit.
Objectives
- Allow a client to request the user for access to resources hosted on a resource server.
- Conceal the client’s location from the resource server’s location (and vice versa).
- Allow the user to grant the client access to the resources.
- Allow the user to revoke access to the client.
- Allow the user to indicate the location of these resources to the client.
- Minimize exposure of the client’s identity from the resource server (and vice versa).
- Ensure confidentiality in communications through the frontchannel.
- Ensure confidentiality in communications through the backchannel.
Constraints
- Use OAuth 2.0 (authorization code grant type).
- No modification of OAuth components in client nor resource server domains.
- Use decentralized identifiers.
System Overview
System Overview
- Green arrows indicate frontchannel communication.
- Blue arrows indicate backchannel communication over a secure transport.
- Black arrows indicate backchannel communication in their normal (HTTP) form.
The figure above shows the main components of the system. It depicts a normal OAuth 2 setup with the client, resource owner, authorization server and resource server roles but adds two new components:
Broker:
OAuth 2.0 requires clients to be registered at the authorization server [1] before sending the authorization request. Our objectives preclude this, therefore the user requires a “broker” component that will relay the authorization request appropriately and to the right location.
Adapter:
The adapters pack and unpack normal authorization requests, token exchange/refresh requests, and requests to the resources to and from HTTP transport and secure, end-to-end encrypted channels between the user, client, and server domains. They also isolate the OAuth 2 components in the client and server domains from the complexity of the network.
VC 서비스[Verifiable Credential Service (VCS)]
VC란 무엇입니까(What is a Verifiable Credential (VC))?
우리는 매일 자격 증명을 사용합니다. 정부에서 발급 한 운전 면허증은 우리가 도로에서 차량을 운전할 수 있음을 증명합니다. 영주권 카드는 개인의 이민 신분을 보여줍니다.
확인 가능한 자격 증명은 내용이 암호로 증명 / 검증 (VC-TERM) 될 수있는 문서입니다. VC는 물리적 자격 증명과 동일한 데이터를 보유 할 수 있습니다. TrustBloc 프로젝트의 범위 내에서 자격 증명을 확인하는 이러한 행위는 디지털 신원 및 서명과 같은 기술의 도움으로 수행 될 수 있습니다. 디지털 서명을 사용하면 자격 증명이 제공 될 때 무결성이 추가됩니다.
확인 가능한 자격 증명 보유자는 확인 가능한 프레젠테이션을 생성 한 다음 이러한 확인 가능한 프레젠테이션을 확인자와 공유하여 특정 특성을 가진 확인 가능한 자격 증명을 보유하고 있음을 증명할 수 있습니다. 검증 가능한 자격 증명과 검증 가능한 프레젠테이션은 모두 빠르게 전송 될 수 있으므로 멀리서 신뢰를 구축하려고 할 때 물리적인 상대보다 더 편리합니다. (VC-DEF)
Edge-Service
TrustBloc의 Edge-Service에는 VC의 발급과 확인을 처리하는 서버가 포함되어 있습니다.
Configuring the service
Edge-Service는 다음 모드에서 사용할 수 있습니다:
- Issuer
- Verifier
- Holder
- Governance
서버를 위한 구성 플래그
Start vc-rest inside the edge-service
Usage:
vc-rest start [flags]
Flags:
--api-token string Check for bearer token in the authorization header (optional). Alternatively, this can be set with the following environment variable: VC_REST_API_TOKEN
-f, --backoff-factor string If no VC is found when attempting to retrieve a VC from the EDV, this is the factor to increase the time to wait for subsequent retries after the first. Alternatively, this can be set with the following environment variable: BACKOFF-FACTOR
-b, --bloc-domain string Bloc domain
--database-prefix string An optional prefix to be used when creating and retrieving underlying databases. Alternatively, this can be set with the following environment variable: DATABASE_PREFIX
-t, --database-type string The type of database to use for everything except key storage. Supported options: mem, couchdb. Alternatively, this can be set with the following environment variable: DATABASE_TYPE
-v, --database-url string The URL of the database. Not needed if using memstore. For CouchDB, include the username:password@ text if required. Alternatively, this can be set with the following environment variable: DATABASE_URL
-e, --edv-url string URL EDV instance is running on. Format: HostName:Port.
--governance-claims-file string Path to governance claimsAlternatively, this can be set with the following environment variable: VC_REST_GOVERNANCE_CLAIMS_FILE
-h, --help help for start
-u, --host-url string URL to run the vc-rest instance on. Format: HostName:Port.
-x, --host-url-external string Host External Name:Port This is the URL for the host server as seen externally. If not provided, then the host url will be used here. Alternatively, this can be set with the following environment variable: VC_REST_HOST_URL_EXTERNAL
-i, --initial-backoff-millisec string If no VC is found when attempting to retrieve a VC from the EDV, this is the time to wait (in milliseconds) before the first retry attempt. Alternatively, this can be set with the following environment variable: INITIAL_BACKOFF_MILLISEC
--kms-secrets-database-prefix string An optional prefix to be used when creating and retrieving the underlying KMS secrets database. Alternatively, this can be set with the following environment variable: KMSSECRETS_DATABASE_PREFIX
-k, --kms-secrets-database-type string The type of database to use for storage of KMS secrets. Supported options: mem, couchdb. Alternatively, this can be set with the following environment variable: KMSSECRETS_DATABASE_TYPE
-s, --kms-secrets-database-url string The URL of the database. Not needed if using memstore. For CouchDB, include the username:password@ text if required. It's recommended to not use the same database as the one set in the database-url flag (or the DATABASE_URL env var) since having access to the KMS secrets may allow the host of the provider to decrypt EDV encrypted documents. Alternatively, this can be set with the following environment variable: DATABASE_URL
-l, --log-level string Logging level to set. Supported options: CRITICAL, ERROR, WARNING, INFO, DEBUG.Defaults to info if not set. Setting to debug may adversely impact performance. Alternatively, this can be set with the following environment variable: LOG_LEVEL
-a, --max-retries string If no VC is found when attempting to retrieve a VC from the EDV, this is the maximum number of times to retry retrieval. Defaults to 5 if not set. Alternatively, this can be set with the following environment variable: MAX-RETRIES
-m, --mode string Mode in which the vc-rest service will run. Possible values: ['issuer', 'verifier', 'holder', 'combined'] (default: combined).
--request-tokens stringArray Tokens used for http request Alternatively, this can be set with the following environment variable: VC_REST_REQUEST_TOKENS
--tls-cacerts stringArray Comma-Separated list of ca certs path.Alternatively, this can be set with the following environment variable: VC_REST_TLS_CACERTS
--tls-systemcertpool string Use system certificate pool. Possible values [true] [false]. Defaults to false if not set. Alternatively, this can be set with the following environment variable: VC_REST_TLS_SYSTEMCERTPOOL
-r, --universal-resolver-url string Universal Resolver instance is running on. Format: HostName:Port.
예 : 이슈어 모드에서 실행
다음은 Edge Service를 구성하는 방법을 보여주는 Docker Compose 파일의 스니펫입니다. 여기에 선언된 환경 변수를 사용합니다.
issuer.vcs.example.com:
container_name: issuer.vcs.example.com
image: ${VCS_IMAGE}:${VCS_IMAGE_TAG}
environment:
- VC_REST_HOST_URL=0.0.0.0:8070
- VC_REST_HOST_URL_EXTERNAL=https://issuer-vcs.trustbloc.local
- EDV_REST_HOST_URL=https://edv.trustbloc.local/encrypted-data-vaults
- BLOC_DOMAIN=${BLOC_DOMAIN}
- UNIVERSAL_RESOLVER_HOST_URL=https://did-resolver.trustbloc.local/1.0/identifiers
- VC_REST_MODE=issuer
- DATABASE_TYPE=couchdb
- DATABASE_URL=${COUCHDB_USERNAME}:${COUCHDB_PASSWORD}@shared.couchdb:5984
- DATABASE_PREFIX=issuer
- KMSSECRETS_DATABASE_TYPE=couchdb
- KMSSECRETS_DATABASE_URL=${COUCHDB_USERNAME}:${COUCHDB_PASSWORD}@shared.couchdb:5984
- KMSSECRETS_DATABASE_PREFIX=issuer
- VC_REST_TLS_CACERTS=/etc/tls/trustbloc-dev-ca.crt
- VC_REST_TLS_SYSTEMCERTPOOL=true
- VC_REST_API_TOKEN=vcs_issuer_rw_token
- VIRTUAL_HOST=issuer-vcs.trustbloc.local
ports:
- 8070:8070
entrypoint: ""
# wait 20 seconds for couchdb to start
command: /bin/sh -c "sleep 20;/tmp/scripts/vcs_configure.sh& vc-rest start"
volumes:
- ../scripts/:/tmp/scripts #https://github.com/trustbloc/edge-sandbox/tree/master/test/bdd/fixtures/scripts
- ../keys/tls:/etc/tls
depends_on:
- edv.example.com
networks:
- demo-net
edv.example.com:
container_name: edv.example.com
image: ${EDV_IMAGE}:${EDV_IMAGE_TAG}
environment:
- EDV_HOST_URL=0.0.0.0:8081
- EDV_DATABASE_TYPE=couchdb
- EDV_DATABASE_URL=${COUCHDB_USERNAME}:${COUCHDB_PASSWORD}@shared.couchdb:5984
- EDV_DATABASE_PREFIX=edv
- VIRTUAL_HOST=edv.trustbloc.local
ports:
- 8081:8081
command: start
networks:
- demo-net
다른 모드를 구성하는 방법의 예는 다음 저장소에서 사용할 수 있습니다.
서비스 배포
Edge-Service를 배포하려면 다음 구성 요소가 필요합니다.
노트
상호 작용 예시
trustbloc/edge-sandbox
Demonstration environments. Contribute to trustbloc/edge-sandbox development by creating an account on GitHub.
github.com
Sidetree
Sidetree Fabric
Sidetree Mock
Edge Components
DID Resolvers
DID Registrars
VCS Components (CHAPI + VC Services)
Issuing a VC
VC를 발급하려면 먼저 프로필을 만들어야합니다.
1. VC 발급
HTTP POST /{profile}/credentials/issueCredential
{
"credential":{
"@context":[
"https://www.w3.org/2018/credentials/v1"
],
"id":"http://example.edu/credentials/1872",
"type":"VerifiableCredential",
"credentialSubject":{
"id":"did:example:ebfeb1f712ebc6f1c276e12ec21"
},
"issuer":{
"id":"did:example:76e12ec712ebc6f1c221ebfeb1f",
"name":"Example University"
},
"issuanceDate":"2010-01-01T19:23:24Z",
"credentialStatus":{
"id":"https://example.gov/status/24",
"type":"CredentialStatusList2017"
}
},
"options":{
"assertionMethod":"did:trustbloc:testnet.trustbloc.local:EiAiijiRNEAflOr6ZOJN5A7BCFQD1pwFMI1MPzHr3bXezg=="
}
}
2. VC 구성 및 발급
HTTP POST /{profile}/credentials/composeAndIssueCredential
{
"issuer":"did:example:uoweu180928901",
"subject":"did:example:oleh394sqwnlk223823ln",
"types":[
"UniversityDegree"
],
"issuanceDate":"2020-03-25T19:38:54.45546Z",
"expirationDate":"2020-06-25T19:38:54.45546Z",
"claims":{
"name":"John Doe"
},
"evidence":{
"id":"http://example.com/policies/credential/4",
"type":"IssuerPolicy"
},
"termsOfUse":{
"id":"http://example.com/policies/credential/4",
"type":"IssuerPolicy"
},
"proofFormat":"jws",
"proofFormatOptions":{
"kid":"did:trustbloc:testnet.trustbloc.local:EiAtPEWAphdPVRxlKpr8N43uyLMhgF-9SFmYfINVpDIzUA==#key-1"
}
}
VC 검증
HTTP POST /verifier/credentials
{
"verifiableCredential":{
"@context":[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"credentialSchema":[
],
"credentialStatus":{
"id":"http://issuer.vc.rest.example.com:8070/status/1",
"type":"CredentialStatusList2017"
},
"credentialSubject":{
"degree":{
"degree":"MIT",
"type":"BachelorDegree"
},
"id":"did:example:ebfeb1f712ebc6f1c276e12ec21",
"name":"Jayden Doe",
"spouse":"did:example:c276e12ec21ebfeb1f712ebc6f1"
},
"id":"http://example.gov/credentials/3732",
"issuanceDate":"2020-03-16T22:37:26.544Z",
"issuer":{
"id":"did:example:oakek12as93mas91220dapop092",
"name":"University"
},
"proof":{
"created":"2020-04-09T15:35:35Z",
"jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..kN1srfFqoiejHJwxM8Y0Y9yIonAvFeF2Aoiv6_LTkPqcNXc2rXwT94-uO_PQJbxWJgTD78MvpfCJWsUSRvgCBw",
"proofPurpose":"assertionMethod",
"type":"Ed25519Signature2018",
"verificationMethod":"did:trustbloc:testnet.trustbloc.local:EiD3KVRkHAHt6aLO4Kp5PSO3pNhAY_GPZXuKUekVk1uboQ==#key-1"
},
"type":[
"VerifiableCredential",
"UniversityDegreeCredential"
]
},
"options":{
"checks":[
"proof"
]
}
}
TestNet에 연결
TODO
Edge-service 이용
데모를 사용하려면 데모 발급자 홈페이지로 이동하십시오.
그런 다음 각 데모를 위해 아래 비디오의 단계를 따르십시오.
이 데모는 에지 서비스를위한 데모 환경 인 Edge-Sandbox를 사용합니다.
월렛 등록(Register A Wallet)
아래 비디오와 같이 지갑을 등록하십시오:
Adapters
어뎁터 란(What is an Adapter?)
TrustBloc의 Edge-Adapter는 DIDComm 작업을 지원하기 위해 RP(Relying Party, 신뢰 파티)와 이슈어 컴포넌트의 중개자 역할을합니다.
TrustBloc의 Edge-Adapter는 이슈어와 RP를 실행하는 데 사용할 수 있습니다.
github.com/trustbloc/edge-adapter/tree/master/cmd/adapter-rest
서버를 위한 플래그:
Start adapter-rest inside the edge-adapter
Usage:
adapter-rest start [flags]
Flags:
--didcomm-db-path string Path to database. Alternatively, this can be set with the following environment variable: ADAPTER_REST_DIDCOMM_DB_PATH
--didcomm-inbound-host string Inbound Host Name:Port. This is used internally to start the didcomm server. Alternatively, this can be set with the following environment variable: ADAPTER_REST_DIDCOMM_INBOUND_HOST
--didcomm-inbound-host-external string Inbound Host External Name:Port. This is the URL for the inbound server as seen externally. If not provided, then the internal inbound host will be used here. Alternatively, this can be set with the following environment variable: ADAPTER_REST_DIDCOMM_INBOUND_HOST_EXTERNAL
--dids-trustbloc-domain string URL to the did:trustbloc consortium's domain. Alternatively, this can be set with the following environment variable: ADAPTER_REST_TRUSTBLOC_DOMAIN
--dsn string Datasource Name with credentials if required. Format must be <driver>:[//]<driver-specific-dsn>. Examples: 'mysql://root:secret@tcp(localhost:3306)/adapter', 'mem://test'. Supported drivers are [mem, mysql]. Alternatively, this can be set with the following environment variable: ADAPTER_REST_DSN
--dsn-timeout string Total time in seconds to wait until the datasource is available before giving up. Default: seconds. Alternatively, this can be set with the following environment variable: ADAPTER_REST_DSN_TIMEOUT
--governance-vcs-url string Governance VCS instance is running on. Format: HostName:Port.
-h, --help help for start
-u, --host-url string URL to run the adapter-rest instance on. Format: HostName:Port.
--hydra-url string Base URL to the hydra service.Alternatively, this can be set with the following environment variable: ADAPTER_REST_HYDRA_URL
--log-level string Sets the logging level. Possible values are [DEBUG, INFO, WARNING, ERROR, CRITICAL] (default is INFO). Alternatively, this can be set with the following environment variable: ADAPTER_REST_LOGLEVEL (default "INFO")
--mode string Mode in which the edge-adapter service will run. Possible values: ['issuer', 'rp'].
--op-url string URL for the OIDC provider.Alternatively, this can be set with the following environment variable: ADAPTER_REST_OP_URL
--presentation-definitions-file string Path to presentation definitions file with input_descriptors.
--request-tokens stringArray Tokens used for http request Alternatively, this can be set with the following environment variable: ADAPTER_REST_REQUEST_TOKENS
--static-path string Path to the folder where the static files are to be hosted under /ui.Alternatively, this can be set with the following environment variable: ADAPTER_REST_STATIC_FILES
--tls-cacerts stringArray Comma-Separated list of ca certs path. Alternatively, this can be set with the following environment variable: ADAPTER_REST_TLS_CACERTS
--tls-serve-cert string Path to the server certificate to use when serving HTTPS. Alternatively, this can be set with the following environment variable: ADAPTER_REST_TLS_SERVE_CERT
--tls-serve-key string Path to the private key to use when serving HTTPS. Alternatively, this can be set with the following environment variable: ADAPTER_REST_TLS_SERVE_KEY
--tls-systemcertpool string Use system certificate pool. Possible values [true] [false]. Defaults to false if not set. Alternatively, this can be set with the following environment variable: ADAPTER_REST_TLS_SYSTEMCERTPOOL
-r, --universal-resolver-url string Universal Resolver instance is running on. Format: HostName:Port.
RP 어댑터
RP (신뢰 당사자) 어댑터는 DIDComm에서 표준 OpenID Connect 흐름을 활성화합니다.
RP 어댑터 구성
다음은 Edge Adapter를 RP로 사용하도록 구성하는 방법을 보여주는 Docker Compose 파일의 스니펫입니다.
rp.adapter.rest.example.com:
container_name: rp.adapter.rest.example.com
image: ${RP_ADAPTER_REST_IMAGE}:latest
environment:
- ADAPTER_REST_HOST_URL=0.0.0.0:8070
- ADAPTER_REST_TLS_CACERTS=/etc/tls/ec-cacert.pem
- ADAPTER_REST_GOVERNANCE_VCS_URL=http://governance.vcs.example.com:8066
- ADAPTER_REST_TLS_SYSTEMCERTPOOL=true
- ADAPTER_REST_TLS_SERVE_CERT=/etc/tls/ec-pubCert.pem
- ADAPTER_REST_TLS_SERVE_KEY=/etc/tls/ec-key.pem
- ADAPTER_REST_DSN=mysql://rpadapter:rpadapter-secret-pw@tcp(mysql:3306)/
- ADAPTER_REST_OP_URL=http://PUT-SOMETHING-HERE.com
- ADAPTER_REST_PRESENTATION_DEFINITIONS_FILE=/etc/testdata/presentationdefinitions.json
- ADAPTER_REST_DIDCOMM_INBOUND_HOST=0.0.0.0:8071
- ADAPTER_REST_DIDCOMM_INBOUND_HOST_EXTERNAL=http://rp.adapter.rest.example.com:8071
- ADAPTER_REST_TRUSTBLOC_DOMAIN=${BLOC_DOMAIN}
- ADAPTER_REST_HYDRA_URL=https://hydra.trustbloc.local:4445
- ADAPTER_REST_UNIVERSAL_RESOLVER_URL=http://did.rest.example.com:8072/1.0/identifiers
- ADAPTER_REST_DSN_TIMEOUT=45
ports:
- 8070:8070
entrypoint: ""
command: /bin/sh -c "adapter-rest start"
volumes:
- ../keys/tls:/etc/tls
- ../testdata:/etc/testdata
networks:
- bdd_net
depends_on:
- hydra
- mysql
RP 어댑터 배포
OIDC 클라이언트를 TrustBloc RP 어댑터에 통합하는 방법에 대해 알아 보려면 통합 가이드를 읽어보세요.
이슈어 어댑터
이 구성 요소는 발급자를 대신하여 DIDComm 관련 사용 사례를 수행하는 중개자입니다.
이슈어 어댑터 구성
다음은 발급자로 사용하기 위해 Edge Adapter를 구성하는 방법을 보여주는 Docker Compose 파일의 스니펫입니다.
issuer.adapter.rest.example.com:
container_name: issuer.adapter.rest.example.com
image: ${ISSUER_ADAPTER_REST_IMAGE}:latest
environment:
- ADAPTER_REST_HOST_URL=0.0.0.0:9070
- ADAPTER_REST_GOVERNANCE_VCS_URL=http://governance.vcs.example.com:8066
- ADAPTER_REST_TLS_CACERTS=/etc/tls/ec-cacert.pem
- ADAPTER_REST_TLS_SYSTEMCERTPOOL=true
- ADAPTER_REST_TLS_SERVE_CERT=/etc/tls/ec-pubCert.pem
- ADAPTER_REST_TLS_SERVE_KEY=/etc/tls/ec-key.pem
- ADAPTER_REST_DIDCOMM_INBOUND_HOST=0.0.0.0:9071
- ADAPTER_REST_DIDCOMM_INBOUND_HOST_EXTERNAL=http://issuer.adapter.rest.example.com:9071
- ADAPTER_REST_TRUSTBLOC_DOMAIN=${BLOC_DOMAIN}
- ADAPTER_REST_UNIVERSAL_RESOLVER_URL=http://did.rest.example.com:8072/1.0/identifiers
- ADAPTER_REST_DSN=mysql://issueradapter:issueradapter-secret-pw@tcp(mysql:3306)/
- ADAPTER_REST_DSN_TIMEOUT=45
ports:
- 9070:9070
- 9071:9071
entrypoint: ""
command: /bin/sh -c "adapter-rest start"
volumes:
- ../keys/tls:/etc/tls
networks:
- bdd_net
이슈어 어뎁터 배포하기
Adapter 컴포넌트 (CHAPI + DIDComm)
흐름도
증거 및 운전 면허증 (DL) 흐름
이 컴포넌트들은 유저에게 운전 면허증과 같은 VC와 함께 서비스에 접근하는 것을 허락합니다.
- 이슈어 어뎁터
- RP 어뎁터
통합 DL, 증거 및 신용 점수 흐름
은행계좌 개요: Bank Account usecase.
이 시나리오는 개인이 로컬 및 원격 자격 증명을 모두 사용하여 은행 계좌를 개설하는 방법을 보여줍니다. 로컬 자격 증명은 사용자의 지갑에 저장되고 원격 자격 증명은 타사에 저장됩니다.
은행 계좌를 만들려면 운전 면허증 (로컬 자격 증명), 운전 면허증 증명 (원격 자격 증명) 및 신용 점수 (원격 자격 증명)가 필요합니다.
은행계좌는 운전면허증 이슈어와 신용점수 이슈어로부터 VC로 발급됩니다.
Adapter/DIDComm 흐름을 사용합니다.
아래 데모를 확인하세요.
은행계좌 생성.
운전면허증, 증거와 신용점수
'IT > Did(Edge-sandbox)' 카테고리의 다른 글
NET :: ERR_CERT_AUTHORITY_INVALID (0) | 2021.04.15 |
---|---|
ORY Hydra (0) | 2021.03.08 |
Encrypted Data Vaults 0.1 (0) | 2021.01.25 |
openAPI.yml 분석 (0) | 2020.11.25 |
edv 실행순서 (0) | 2020.11.24 |