Skip to content

"gematik sektoraler IDP" and Testsuite to test any "Sektoraler IDP" as part of the IDP federation

License

Notifications You must be signed in to change notification settings

gematik/app-gemSekIdp

Repository files navigation

Overview

Project gemSekIdp-global consists of 3 subprojects. These are:

  • gsi-fedmaster: MVP of a Fedmaster, used to work with a local federation

  • gsi-server: "gematik sektoraler IDP" - MVP of a sectoral IDP, used to develop/test the gsi-testsuite

  • gsi-testsuite: Approval test suite (Zulassungstests) for sectoral IDPs, will be executed as integration tests


just build project

To quickly check your build environment without running any tests (just build idp sektoral server and testsuite) do in project root: mvn clean package -Dskip.unittests

build project and run unit tests (skip integration tests == skip testsuite execution)

mvn clean test -Dskip.inttests

build project and run integration tests (unit tests will be executed as well as long as they are not skipped)

To execute integration tests you have to set the environment variable where the tiger test framework find its configuration:

export TIGER_TESTENV_CFGFILE=tiger-external-Idp.yaml mvn test

In order to run the integration tests (= testsuite) follow the instruction listed under "Test an external sectoral IDP".

The keys gsi-fedmaster/src/main/resources/keys/ref-fedmaster-sig-privkey.pem gsi-server/src/main/resources/keys/ref-gsi-sig-privkey.pem are added for unit tests only and can be published.

Test an external sectoral IDP (e.g. your own server)

  • To check test environment, the gsi-server can be used. Just build/start this server and execute runTestsuite-external-Idp.sh.
  • The address of the SUT (system under test == sectoral IDP server) is configured in gsi-testsuite/tiger-external-Idp.yaml. Local gsi-server is set as default.
  • In order to validate the structure of an ID_TOKEN one has to add its value (base64 encoded) to the tc_properties-file that is used during the test execution

Serenity BDD Report

run gsi-server locally

  • check entity statement: curl http://localhost:8085/.well-known/openid-federation will produce a jwt like this:

entity statement: eyJhbGciOiJFUzI1NiIsInR5cCI6ImVudGl0eS1zdGF0ZW1lbnQrand0Iiwia2lkIjoicHVrX2lkcF9zaWcifQ.eyJpc3MiOiJodHRwczovL2dzaS5kZXYuZ2VtYXRpay5zb2x1dGlvbnMiLCJzdWIiOiJodHRwczovL2dzaS5kZXYuZ2VtYXRpay5zb2x1dGlvbnMiLCJpYXQiOjE3MDY3OTA1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uX2VuY3J5cHRpb25fYWxnX3ZhbHVlc19zdXBwb3J0ZWQiOlsiRUNESC1FUyJdLCJpZF90b2tlbl9lbmNyeXB0aW9uX2VuY192YWx1ZXNfc3VwcG9ydGVkIjpbIkEyNTZHQ00iXSwidXNlcl90eXBlX3N1cHBvcnRlZCI6WyJJUCJdfSwiZmVkZXJhdGlvbl9lbnRpdHkiOnsibmFtZSI6ImdlbWF0aWsgc2VrdG9yYWxlciBJRFAiLCJjb250YWN0cyI6WyJzdXBwb3J0QGlkcDQ3MTEuZGUiLCJpZG1AZ2VtYXRpay5kZSJdLCJob21lcGFnZV91cmkiOiJodHRwczovL2lkcDQ3MTEuZGUifX19.RLW70R4rsmf_4m98pJIDpEWaKImK3QKv2MBRGiL8ImREJv_8srz-niYe5ObxMAJ4mOw1cy3OYkWaDfyY-eeMnw

Copy this jwt to the clipboard and paste it www.jwt.io to see the content.

run federation locally

content moved to project FEDIS not yet available, link will follow

OpenAPI Specification

You can receive the OpenAPI Specification under the following paths

  • GsiServer Port: 8085
  • FedMasterServer Port: 8083
Format Path
JSON http://127.0.0.1:port/v3/api-docs
YAML http://127.0.0.1:port/v3/api-docs.yaml
SWAGGER http://127.0.0.1:port/swagger-ui.html