This file describes how to run cdoc2-rp-server in your local development machine, without
external infrastructure.
(Docker must be installed)
From db-changelog directory run:
cd db-changelog
docker compose up -dThis starts a Postgres container (db-rp, see db-changelog/docker-compose.yml) listening on
localhost:7433.
From db-changelog directory run:
mvn clean compile liquibase:updateFrom cdoc2-rp-server directory run:
mvn clean install(psql in docker must be running)
From webapp directory run:
java -jar target/cdoc2-rp-server-webapp-VER.jarwhere VER is the version of the package built by mvn install previously (e.g.
target/cdoc2-rp-server-webapp-0.8.0.jar).
The bundled webapp/src/main/resources/application.properties already ships a localhost dev
configuration (self-signed keystore/truststores, connection to the dockerized Postgres started
above, demo SID/MID service URLs), so the server can be started as-is without providing
-Dspring.config.location. Provide a custom application.properties in the same folder as the
jar if you need to override any property (see README.md for the full list of app.* /
spring.* properties).
Or run the server with -Dlogging.config=target/test-classes/logback.xml if you need to see logs.
Note: to enable TLS handshake debugging, add -Djavax.net.debug=ssl:handshake option.
The logging format can be changed by providing logback configuration.
An example OpenTelemetry-compatible Logback configuration is included in otel-logback.xml.
To include the logback configuration, use the -Dlogging.config JVM option.
Example of running the server with otel-logback.xml:
java -Dlogging.config=webapp/src/main/resources/otel-logback.xml -jar target/cdoc2-rp-server-webapp-VER.jar
By default the server listens on https://localhost:7600 and its actuator (management) endpoints
on https://localhost:17600.
cdoc2-rp-server calls out to cdoc2-auth-server for parts of the MID/SID flow
(app.restclient.auth-server.hostUrl, defaults to https://localhost:7500). See
cdoc2-auth-server/getting-started.md if you want both servers running locally to exercise the
full flow.
#Testing
curl -k https://localhost:17600/actuator/healthResponse:
{"status":"UP","components":{"db":{"status":"UP","details":{"database":"PostgreSQL","validationQuery":"isValid()"}},"livenessState":{"status":"UP"},"readinessState":{"status":"UP"}}}curl -k https://localhost:7600/.well-known/jwks.jwsReturns the public key(s) (app.well-known.publicKeys) that cdoc2-rp-server uses to sign MID/SID
countersignatures.
curl -i -k -X POST https://localhost:7600/session_nonceResponse:
HTTP/1.1 200
{"nonce":"..."}