-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added e2e test for OpenID4VP s2s flow (#2617)
- Loading branch information
1 parent
ab0aefa
commit 30a3bd6
Showing
27 changed files
with
365 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: "3.7" | ||
services: | ||
nodeA-backend: | ||
image: "${IMAGE_NODE_A:-nutsfoundation/nuts-node:master}" | ||
ports: | ||
- "11323:1323" | ||
environment: | ||
NUTS_CONFIGFILE: /opt/nuts/nuts.yaml | ||
volumes: | ||
- "./node-A/nuts.yaml:/opt/nuts/nuts.yaml:ro" | ||
- "./node-A/data:/opt/nuts/data:rw" | ||
- "../../tls-certs/nodeA-backend-certificate.pem:/opt/nuts/certificate-and-key.pem:ro" | ||
- "../../tls-certs/truststore.pem:/opt/nuts/truststore.pem:ro" | ||
- "./node-A/presentationexchangemapping.json:/opt/nuts/presentationexchangemapping.json:ro" | ||
healthcheck: | ||
interval: 1s # Make test run quicker by checking health status more often | ||
nodeA: | ||
image: nginx:1.25.1 | ||
ports: | ||
- "10443:443" | ||
volumes: | ||
- "./node-A/nginx.conf:/etc/nginx/nginx.conf:ro" | ||
- "../../tls-certs/nodeA-certificate.pem:/etc/nginx/ssl/server.pem:ro" | ||
- "../../tls-certs/nodeA-certificate.pem:/etc/nginx/ssl/key.pem:ro" | ||
- "../../tls-certs/truststore.pem:/etc/nginx/ssl/truststore.pem:ro" | ||
- "./node-A/html:/etc/nginx/html:ro" | ||
nodeB: | ||
image: "${IMAGE_NODE_B:-nutsfoundation/nuts-node:master}" | ||
ports: | ||
- "21323:1323" | ||
environment: | ||
NUTS_CONFIGFILE: /opt/nuts/nuts.yaml | ||
volumes: | ||
- "./node-B/data:/opt/nuts/data:rw" | ||
- "./node-B/nuts.yaml:/opt/nuts/nuts.yaml:ro" | ||
- "../../tls-certs/nodeB-certificate.pem:/opt/nuts/certificate-and-key.pem:ro" | ||
- "../../tls-certs/truststore.pem:/opt/nuts/truststore.pem:ro" | ||
- "../../tls-certs/truststore.pem:/etc/ssl/certs/truststore.pem:ro" | ||
healthcheck: | ||
interval: 1s # Make test run quicker by checking health status more often |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log debug; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
keepalive_timeout 65; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
|
||
upstream nodeA-backend { | ||
server nodeA-backend:1323; | ||
} | ||
|
||
server { | ||
server_name nodeA; | ||
listen 443 ssl; | ||
http2 on; | ||
ssl_certificate /etc/nginx/ssl/server.pem; | ||
ssl_certificate_key /etc/nginx/ssl/key.pem; | ||
ssl_client_certificate /etc/nginx/ssl/truststore.pem; | ||
ssl_verify_client optional; | ||
ssl_verify_depth 1; | ||
ssl_protocols TLSv1.3; | ||
|
||
location / { | ||
proxy_set_header X-Ssl-Client-Cert $ssl_client_escaped_cert; | ||
proxy_pass http://nodeA-backend; | ||
} | ||
|
||
location /ping { | ||
auth_request /delegated; | ||
auth_request_set $auth_status $upstream_status; | ||
} | ||
|
||
location = /delegated { | ||
internal; | ||
proxy_pass http://nodeA-backend/internal/auth/v1/accesstoken/verify; | ||
proxy_method HEAD; | ||
proxy_pass_request_body off; | ||
proxy_set_header X-Ssl-Client-Cert $ssl_client_escaped_cert; | ||
proxy_set_header Content-Length ""; | ||
proxy_set_header X-Original-URI $request_uri; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
verbosity: debug | ||
strictmode: false | ||
internalratelimiter: false | ||
datadir: /opt/nuts/data | ||
http: | ||
default: | ||
address: :1323 | ||
auth: | ||
publicurl: https://nodeA | ||
v2apienabled: true | ||
presentationexchangemappingfile: /opt/nuts/presentationexchangemapping.json | ||
contractvalidators: | ||
- dummy | ||
irma: | ||
autoupdateschemas: false | ||
tls: | ||
truststorefile: /opt/nuts/truststore.pem | ||
certfile: /opt/nuts/certificate-and-key.pem | ||
certkeyfile: /opt/nuts/certificate-and-key.pem |
43 changes: 43 additions & 0 deletions
43
e2e-tests/oauth-flow/openid4vp/node-A/presentationexchangemapping.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"test": { | ||
"format": { | ||
"ldp_vp": { | ||
"proof_type": ["JsonWebSignature2020"] | ||
}, | ||
"ldp_vc": { | ||
"proof_type": ["JsonWebSignature2020"] | ||
} | ||
}, | ||
"id": "pd_any_care_organization", | ||
"name": "Care organization", | ||
"purpose": "Finding a care organization for authorizing access to medical metadata", | ||
"input_descriptors": [ | ||
{ | ||
"id": "id_nuts_care_organization_cred", | ||
"constraints": { | ||
"fields": [ | ||
{ | ||
"path": ["$.type"], | ||
"filter": { | ||
"type": "string", | ||
"const": "NutsOrganizationCredential" | ||
} | ||
}, | ||
{ | ||
"path": ["$.credentialSubject.organization.name"], | ||
"filter": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"path": ["$.credentialSubject.organization.city"], | ||
"filter": { | ||
"type": "string" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
verbosity: debug | ||
strictmode: false | ||
internalratelimiter: false | ||
datadir: /opt/nuts/data | ||
http: | ||
default: | ||
address: :1323 | ||
auth: | ||
tlsenabled: true | ||
v2apienabled: true | ||
publicurl: https://nodeB | ||
contractvalidators: | ||
- dummy | ||
irma: | ||
autoupdateschemas: false | ||
tls: | ||
truststorefile: /opt/nuts/truststore.pem | ||
certfile: /opt/nuts/certificate-and-key.pem | ||
certkeyfile: /opt/nuts/certificate-and-key.pem | ||
|
Oops, something went wrong.