Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop -> Main #9

Merged
merged 78 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a09c131
Fixed the ignore file due to changes in directory hierarchy.
moratori Jun 10, 2024
89dccbd
Fixed due to changes in the data structure of `proof_types_supported`.
moratori Jun 11, 2024
37329ac
renamed cryptographic_suites_supported to credential_signing_alg_valu…
moratori Jun 11, 2024
92938df
Fixed to cache metadata in memory.
moratori Jun 11, 2024
b3cd539
Run prettier
moratori Jun 13, 2024
1f4824a
Define data types related to IssuerMetadata
moratori Jun 13, 2024
e9184aa
Generate schema for issuer metadata.
moratori Jun 13, 2024
3f36163
Implemented localization of IssuerMetadata.
moratori Jun 13, 2024
97ee165
Added new dependencies related to metadata loading and localization.
moratori Jun 13, 2024
e4da235
Add `--required` option.
moratori Jun 13, 2024
08a7c5e
Improved data type accuracy
moratori Jun 13, 2024
cb9df2b
Fixed to conform to the latest metadata types.
moratori Jun 13, 2024
b7c987e
Fixed to include JSON schema files in build artifacts.
moratori Jun 13, 2024
c681b24
Fixed to interpret Accept-Language when requesting metadata.
moratori Jun 13, 2024
7ab3a64
Fixed locale identifier.
moratori Jun 13, 2024
abc56b2
Ideally, it should be implemented by calling common functions, but `p…
moratori Jun 13, 2024
e6a34ac
Fixed locale identifier.
moratori Jun 13, 2024
47f5b56
Fixed to receive resolved result as locale string.
moratori Jun 13, 2024
db47cce
Run prettier
moratori Jun 13, 2024
3e13f12
Remove unnecessary log.
moratori Jun 13, 2024
30359c3
Fixed to make a deep copy before passing data to destructive functions.
moratori Jun 13, 2024
72b628d
Regeneration with yarn install
moratori Jun 13, 2024
55399a7
Fixed to make it configurable whether or not to localize metadata.
moratori Jun 14, 2024
b006878
Run prettier
moratori Jun 14, 2024
e525111
Fixed data type of `CredentialOffer`.
moratori Jun 14, 2024
8cc6f16
replaced `user_pin_required` in Credential Offer with a `tx_code` object
moratori Jun 14, 2024
4c72b8c
optionalize tx_code
moratori Jun 14, 2024
3ca6aa3
Fixes due to TxCode being an object instead of a boolean.
moratori Jun 14, 2024
657d032
Generalizing the schema validation function and changing the director…
moratori Jun 15, 2024
49fcfe2
Run prettier
moratori Jun 15, 2024
83f1428
Updates due to changes in library implementation.
moratori Jun 15, 2024
f30a579
Run prettier
moratori Jun 15, 2024
f8ac3ad
Add test for readLocalIssuerMetadata
moratori Jun 15, 2024
a15f5b9
Define `CredentialRequest` type
moratori Jun 15, 2024
8c843ec
Fixed to automatically generate json schema.
moratori Jun 15, 2024
38724a6
Run prettier
moratori Jun 15, 2024
03a0a05
Improve type definition
moratori Jun 15, 2024
b8397ed
Exclude auto-generated JSON files from Prettier
moratori Jun 15, 2024
09eee23
Modified data type naming to use the `Format Identifier` in the speci…
moratori Jun 16, 2024
84e6e48
Implement user-defined Type Guard functions.
moratori Jun 16, 2024
30a33a5
Split issuance process. Added data type validation.
moratori Jun 16, 2024
60d47f6
Remove unnecessary definitions.
moratori Jun 16, 2024
1d20b8f
Remove unnecessary data types.
moratori Jun 17, 2024
26b435b
Add `CredentialRequestLdpVc` and `CredentialRequestJwtVcJsonLd`.
moratori Jun 17, 2024
97f9cfe
Improved accuracy of `Proof` type.
moratori Jun 17, 2024
aa20a6f
Fix `validateProof` to use `Proof` as the argument type. Also, modifi…
moratori Jun 17, 2024
4bdc025
Removed untestable case (because `proof_type` is guaranteed to exist …
moratori Jun 17, 2024
ebf0df2
Add eslint comment.
moratori Jun 17, 2024
8861075
Reinstall as devDependency.
moratori Jun 17, 2024
e2daa65
Add tests.
moratori Jun 17, 2024
b686cce
Fixed a bug related to HTTP Body retrieval.
moratori Jun 17, 2024
ea25165
Fixed an issue where schema under `dist` could not be loaded properly.
moratori Jun 17, 2024
4c44f65
Fixes to keep up with changes in the library.
moratori Jun 17, 2024
c97e77a
Changes due to reinstallation.
moratori Jun 17, 2024
40427da
Fixes to keep up with changes in the library.
moratori Jun 17, 2024
829d8b0
Remove unnecessary checks. (Because the type definition guarantees th…
moratori Jun 17, 2024
d9ce75c
Fixes to keep up with changes in the library.
moratori Jun 17, 2024
5d79102
Modification of test cases due to changes in request data checking lo…
moratori Jun 17, 2024
f2c9b8a
Changes due to reinstallation.
moratori Jun 17, 2024
13e6277
Run prettier
moratori Jun 17, 2024
9df05f1
Changed the data structure of CredentialResponse.
moratori Jun 18, 2024
3a13f02
Fixes to conform to current directory structure.
moratori Jul 16, 2024
6012408
Add demo app
moratori Jul 16, 2024
6f35a6c
Added a command to remove unwanted `node_modules`.
moratori Jul 18, 2024
92faa8b
Fixed to appropriate values as a demo app.
moratori Jul 18, 2024
3dc0067
Fixed a typo
moratori Jul 18, 2024
aaac87d
Fixed to appropriate values as a demo app.
moratori Jul 18, 2024
e19e6b0
Add remove command.
moratori Jul 18, 2024
3ee33bc
Fixed incorrect readme path.
moratori Jul 18, 2024
300cf0f
Added explanation of metadata modification to README.
moratori Jul 18, 2024
b6d7fd3
Merge pull request #7 from moratori/add-demo-app-event-certificate-ma…
sadamu Jul 19, 2024
ceb0959
add CloudFormation template and fix script path
sadamu Jul 22, 2024
a5bde30
fix English README for cloudformation
sadamu Jul 22, 2024
39265d1
fix RP review
sadamu Jul 22, 2024
274f19b
Merge pull request #8 from sadamu/add_CF_template
moratori Jul 22, 2024
940c184
Merge branch develop into adopt-first-implementors-draft
moratori Jul 23, 2024
daf378c
Fix to make the demo app conform to ID1.
moratori Jul 23, 2024
733a115
Merge pull request #6 from moratori/adopt-first-implementors-draft
ryosuke-wakaba Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ dist
cli/bin
cli/out

employee-vci/.env
employee-vci/TEST_DB
employee-vci/database.sqlite
employee-vci/dist
demos/employee-vci/.env
demos/employee-vci/TEST_DB
demos/employee-vci/database.sqlite
demos/employee-vci/dist

proxy-vci/.env
proxy-vci/TEST_DB
proxy-vci/database.sqlite
proxy-vci/dist
demos/proxy-vci/.env
demos/proxy-vci/TEST_DB
demos/proxy-vci/database.sqlite
demos/proxy-vci/dist

participation-cert-vci/.env
participation-cert-vci/TEST_DB
participation-cert-vci/database.sqlite
participation-cert-vci/dist
demos/participation-cert-vci/.env
demos/participation-cert-vci/TEST_DB
demos/participation-cert-vci/database.sqlite
demos/participation-cert-vci/dist

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/oid4vci/types/protocolSchema/*.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 OWNED Project
Copyright (c) 2024 OWND Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 9 additions & 7 deletions codedeploy/scripts/after_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
source /root/.bashrc
nvm use 18

cd /srv/common
yarn install
yarn build

if [[ "$DEPLOYMENT_GROUP_NAME" =~ ^identity ]]; then
cd /srv/proxy-vci/
cd /srv/demos/proxy-vci/ || exit
pwd
fi

# Todo event用vciのディレクトリが決まったらパスを変える
if [[ "$DEPLOYMENT_GROUP_NAME" =~ ^event ]]; then
cd /srv/participation-cert-vci/
cd /srv/demos/event-certificate-manager/backend|| exit
git clone https://github.com/OWND-Project/OWND-Project-VCI.git
cd ./OWND-Project-VCI || exit
yarn
yarn build
cd /srv/backend || exit
yarn
pwd
fi

if [[ "$DEPLOYMENT_GROUP_NAME" =~ ^employee ]]; then
cd /srv/employee-vci/
cd /srv/demos/employee-vci/ || exit
pwd
fi

Expand Down
12 changes: 6 additions & 6 deletions codedeploy/scripts/application_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ source /root/.bashrc
nvm use 18

if [[ "$DEPLOYMENT_GROUP_NAME" =~ ^identity ]]; then
cd /srv/proxy-vci/
pm2 start "yarn start" --name identity-vci
cd /srv/demos/proxy-vci/ || exit
pm2 start "yarn start" --name backend
fi

if [[ "$DEPLOYMENT_GROUP_NAME" =~ ^event ]]; then
cd /srv/participation-cert-vci/
pm2 start "yarn start" --name event-vci
cd /srv/demos/event-certificate-manager/ || exit
pm2 start "yarn start" --name backend
fi

if [[ "$DEPLOYMENT_GROUP_NAME" =~ ^employee ]]; then
cd /srv/employee-vci/
pm2 start "yarn start" --name employee-vci
cd /srv/demos/employee-vci/ || exit
pm2 start "yarn start" --name backend
fi
5 changes: 4 additions & 1 deletion codedeploy/scripts/application_stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
source /root/.bashrc
. ~/.nvm/nvm.sh
nvm use 18
pm2 delete all
# pm2のプロセスが存在するか確認
if pm2 list | grep -qE "backend"; then
pm2 delete all
fi
1 change: 1 addition & 0 deletions demos/employee-vci/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ CREDENTIAL_OFFER_ENDPOINT=openid-credential-offer://
VCI_PRE_AUTH_CODE_EXPIRES_IN=86400
VCI_ACCESS_TOKEN_EXPIRES_IN=86400
VCI_ACCESS_TOKEN_C_NONCE_EXPIRES_IN=30
RESOLVE_ACCEPT_LANGUAGE=false
2 changes: 1 addition & 1 deletion demos/employee-vci/.mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process.env.DATABASE_FILEPATH = "./TEST_DB";
process.env.BASIC_AUTH_USERNAME="username"
process.env.BASIC_AUTH_PASSWORD="password"
process.env.OAUTH2_TOKEN_ENDPOINT="https://example.com/oauth2/token"
process.env.CREDENTIAL_ISSUER="https://datasign-vci.tunnelto.dev"
process.env.CREDENTIAL_ISSUER="https://example.com"
process.env.CREDENTIAL_OFFER_ENDPOINT="openid-credential-offer://"
process.env.VCI_ACCESS_TOKEN_EXPIRES_IN="86400"
process.env.VCI_ACCESS_TOKEN_C_NONCE_EXPIRES_IN="30"
Expand Down
9 changes: 7 additions & 2 deletions demos/employee-vci/READM.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Employee VCI API Summary

### Common API
For details on the common API, please see [README.md](../common/README.md).
For details on the common API, please see [README.md](../../src/README.md).

- POST `/admin/keys/new`
- POST `/admin/keys/:kid/revoke`
Expand Down Expand Up @@ -38,6 +38,11 @@ Create the `.env` file based on the `.env.template`. Please adjust the content a
| VCI_ACCESS_TOKEN_EXPIRES_IN | 86400 |
| VCI_ACCESS_TOKEN_C_NONCE_EXPIRES_IN | 86400 |

## Configuring Credential Issuer Metadata

Please modify the JSON file that exists under the `metadata` directory to match your operating environment.
In particular, the `REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM` in the JSON file should be the actual domain that can communicate with the wallet.

## Specific API

### POST `/admin/employees/new`
Expand Down Expand Up @@ -127,7 +132,7 @@ Example Response
"subject": {
"employeeNo": "1"
},
"credentialOffer": "openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdatasign-vci.tunnelto.dev%22%2C%22credentials%22%3A%5B%22EmployeeCredential%22%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22tH5yamPFHZ8pVr95Fhp26GCnzwAvgCfQ%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D",
"credentialOffer": "openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.example.com%22%2C%22credentials%22%3A%5B%22EmployeeCredential%22%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22tH5yamPFHZ8pVr95Fhp26GCnzwAvgCfQ%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D",
"userPin": "28092571"
}
```
2 changes: 1 addition & 1 deletion demos/employee-vci/READM_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ http://localhost:3003/admin/employees/1/credential-offer \
"subject": {
"employeeNo": "1"
},
"credentialOffer": "openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdatasign-vci.tunnelto.dev%22%2C%22credentials%22%3A%5B%22EmployeeCredential%22%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22tH5yamPFHZ8pVr95Fhp26GCnzwAvgCfQ%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D",
"credentialOffer": "openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.example.com%22%2C%22credentials%22%3A%5B%22EmployeeCredential%22%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22tH5yamPFHZ8pVr95Fhp26GCnzwAvgCfQ%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D",
"userPin": "28092571"
}
```
6 changes: 3 additions & 3 deletions demos/employee-vci/metadata/dev/authorization_server.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"issuer": "https://datasign-demo-vci.tunnelto.dev",
"authorization_endpoint": "https://datasign-demo-vci.tunnelto.dev/authorize",
"token_endpoint": "https://datasign-demo-vci.tunnelto.dev/token",
"issuer": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM",
"authorization_endpoint": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/authorize",
"token_endpoint": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/token",
"token_endpoint_auth_methods_supported": ["client_secret_basic", "private_key_jwt"],
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"],
"jwks_uri": "https://server.example.com/jwks.json",
Expand Down
51 changes: 29 additions & 22 deletions demos/employee-vci/metadata/dev/credential_issuer_metadata.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,75 @@
{
"credential_issuer": "https://datasign-demo-vci.tunnelto.dev",
"authorization_servers": ["https://datasign-demo-vci.tunnelto.dev"],
"credential_endpoint": "https://datasign-demo-vci.tunnelto.dev/credentials",
"credential_issuer": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM",
"authorization_servers": ["https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM"],
"credential_endpoint": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/credentials",
"display": [
{
"name": "株式会社DataSign",
"locale": "ja_JP",
"name": "株式会社Example",
"locale": "ja-JP",
"logo": {
"url": "https://datasign-demo-vci.tunnelto.dev/public/datasign-inc-logo.png",
"alt_text": "株式会社DataSignのロゴ"
"uri": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/images/company-logo.png",
"alt_text": "株式会社Exampleのロゴ"
},
"background_color": "#003289",
"text_color": "#FFFFFF"
},
{
"name": "DataSign Inc.",
"name": "Example Inc.",
"locale": "en-US",
"logo": {
"url": "https://datasign-demo-vci.tunnelto.dev/public/datasign-inc-logo.png",
"alt_text": "a square logo of a DataSign Inc."
"uri": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/images/company-logo.png",
"alt_text": "a square logo of a Example Inc."
},
"background_color": "#003289",
"text_color": "#FFFFFF"
}
],
"credentials_supported": {
"credential_configurations_supported": {
"EmployeeIdentificationCredential": {
"format": "vc+sd-jwt",
"scope": "EmployeeIdentification",
"cryptographic_binding_methods_supported": [
"jwk"
],
"cryptographic_suites_supported": [
"credential_signing_alg_values_supported": [
"ES256K"
],
"proof_types_supported": [
"jwt"
],
"proof_types_supported": {
"jwt": {
"proof_signing_alg_values_supported": [
"ES256",
"ES256K"
]
}
},
"display": [
{
"name": "社員証",
"locale": "ja",
"locale": "ja-JP",
"logo": {
"url": "https://datasign-demo-vci.tunnelto.dev/public/employee-identification-credential-logo.png",
"uri": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/images/credential-logo.png",
"alt_text": "社員証のロゴ"
},
"background_color": "#003289",
"background_image": "https://datasign-demo-vci.tunnelto.dev/images/DataSign.png",
"background_image": {
"uri": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/images/credential-background.png"
},
"text_color": "#FFFFFF"
},
{
"name": "Employee Identification Credential",
"locale": "en-US",
"logo": {
"url": "https://datasign-demo-vci.tunnelto.dev/public/employee-identification-credential-logo.png",
"uri": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/images/credential-logo.png",
"alt_text": "a square logo of a Employee Identification Credential"
},
"background_color": "#003289",
"background_image": "https://datasign-demo-vci.tunnelto.dev/images/DataSign.png",
"background_image": {
"uri": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/images/credential-background.png"
},
"text_color": "#FFFFFF"
}
],
"credential_definition": {
"vct": "EmployeeIdentificationCredential",
"claims": {
"companyName": {
Expand Down Expand Up @@ -137,7 +145,6 @@
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
"cryptographic_suites_supported": [
"ES256K"
],
"proof_types_supported": [
"jwt"
],
"proof_types_supported": {
"jwt": {
"proof_signing_alg_values_supported": [
"ES256",
"ES256K"
]
}
},
"display": [
{
"name": "Identity Credential",
Expand Down
6 changes: 3 additions & 3 deletions demos/employee-vci/metadata/prod/authorization_server.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"issuer": "https://datasign.jp:8443",
"authorization_endpoint": "https://datasign.jp:8443/authorize",
"token_endpoint": "https://datasign.jp:8443/token",
"issuer": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM",
"authorization_endpoint": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/authorize",
"token_endpoint": "https://REPLACE-WITH-ISSUERS-DOMAIN.EXAMPLE.COM/token",
"token_endpoint_auth_methods_supported": ["client_secret_basic", "private_key_jwt"],
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"],
"jwks_uri": "https://server.example.com/jwks.json",
Expand Down
Loading