Skip to content

Latest commit

 

History

History
94 lines (71 loc) · 2.08 KB

DEVELOPMENT.md

File metadata and controls

94 lines (71 loc) · 2.08 KB

Development Guide Lines

Issuer signer certificate

Generate private key in PKCS#8 format

openssl genpkey -algorithm EC \
-pkeyopt ec_paramgen_curve:prime256v1 \
-out issuer_private_pkcs8.key

Extract public key

openssl pkey -in issuer_private_pkcs8.key -pubout -out issuer_public.key

Create self-signed certificate using PKCS#8 key

openssl req -new -x509 \
-key issuer_private_pkcs8.key \
-out issuer-certificate.crt \
-days 365 \
-subj "/CN=local.dev.swedenconnect.se" \
-addext "subjectAltName = DNS:local.dev.swedenconnect.se" \
-addext "keyUsage = Digital Signature"

Make sure application.properties in the active profile has proper key pair config

credential:
  bundles:
    pem:
      issuercredential:
        private-key: file:./keystores/issuer_private_pkcs8.key
        certificates: file:./keystores/issuer-certificate.crt
        name: "Issuer credential"
  bundle:
    monitoring:
      health-endpoint-enabled: true

Start the server

command line

SPRING_PROFILES_ACTIVE=dev mvn spring-boot:run

docker-compose

See quick-start

cd dev-environment/compose
docker-compose --profile ewc up

The DemoTestsController can not run in compose.

Build

mvn clean verify

VSCode

Tag and Release a new version

Activate the GH-workflow with a tag and push

Example:

git tag -s v0.0.32 -m 'v0.0.32'
git push origin tag v0.0.32

(Currently a gh-workflow and image release flow with act on Tag pushes. It sets the Pom-version, generates a changelog,

Run same code quality test locally as in CI

./developement/codequality.sh