- Java 21
- Maven Wrapper (
src/oneid/mvnw) - Quarkus
- Docker and Docker Compose
- MiniStack for local AWS-compatible services (
SSM,DynamoDB,KMS,S3)
The local development entry point for the application is the Maven workspace under src/oneid.
cd src/oneidgitdocker- Docker Compose plugin (
docker compose) - JDK 21
- Maven 3.9.x if you do not want to rely on the wrapper
awsCLI if you want to inspect localSSM,DynamoDB, orKMSfrom the host
The local stack defined in src/oneid/docker-compose.yaml starts these components:
oneid-aws-local: local AWS-compatible services onhttp://localhost:4566oneid-services-seeder: initializes local AWS resources and exits successfully when seeding is completeoneid-ecs-core: Quarkus backend serviceoneid-ecs-internal-idp: internal IDP serviceoneid-fe: Vite frontend dev serveroneid-gateway: nginx gateway exposed onhttp://localhost:8080oneid-lambda-client-registration: local Quarkus lambda container exposed onhttp://localhost:8081oneid-dummy-client: demo client exposed onhttp://localhost:8084
The gateway is the normal browser entry point for the application. It routes:
/,/login,/assetstooneid-fe/oidc,/idps,/clients,/authorize,/logout,/metadata,/health,/samltooneid-ecs-core/idp/tooneid-ecs-internal-idp/clienttooneid-dummy-client
The dummy client credentials are generated at runtime by oneid-services-seeder.
The seeder renders a runtime env file for the dummy client from src/oneid/docker_mock/oneid-aws-seed/dummy-client.env.template, so you do not need to create or update a checked-in .env file before starting the local stack.
The repository uses the it.pagopa.maven:depcheck plugin from GitHub Packages.
Current skipDepcheck behavior is:
- default: depcheck enabled
-DskipDepcheck=false: depcheck enabled-DskipDepcheck=true: depcheck disabled
For direct Maven commands or Docker builds where depcheck is enabled, provide a Maven settings.xml with GitHub Packages credentials:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>github</id>
<username>YOUR_GITHUB_USERNAME</username>
<password>YOUR_GITHUB_TOKEN</password>
</server>
</servers>
</settings>The token only needs read:packages scope for local development.
Run the full local stack from src/oneid:
cd src/oneid
docker compose up --buildIf you only need to rebuild a single service while keeping the stack behavior consistent, run for example:
cd src/oneid
docker compose up --build oneid-ecs-internal-idpIf the Compose plugin is unavailable in your environment, the classic fallback is:
cd src/oneid
docker-compose up --buildTo reset containers, networks, and named volumes created by the stack:
cd src/oneid
docker compose down -vIf you want local AWS resources and seed data but prefer to run Java code outside Docker:
cd src/oneid
docker compose up oneid-aws-local oneid-services-seederThen start the backend with Maven:
cd src/oneid
./mvnw quarkus:dev -P oneid-ecs-core-aggregate -DskipDepcheck=trueIf you want depcheck enabled instead of skipped, use your Maven settings file:
cd src/oneid
./mvnw quarkus:dev -P oneid-ecs-core-aggregate -s settings.xmlThe aggregate profiles currently available in src/oneid/pom.xml are:
oneid-ecs-core-aggregateoneid-lambda-client-registration-aggregateoneid-lambda-service-metadata-aggregateoneid-lambda-update-idp-metadata-aggregateoneid-lambda-is-gh-integration-aggregateoneid-all
src/oneid/docker_mock/oneid-aws-seed/oneid-seeder.sh is the source of truth for local resource initialization.
When oneid-services-seeder runs, it:
- waits for local
DynamoDB,SSM, andKMSononeid-aws-local - generates a fresh local certificate pair for
oneid-ecs-core - generates a fresh local certificate pair for
oneid-ecs-internal-idp - generates fresh dummy client secrets and salts for the local seeded clients
- renders runtime DynamoDB seed data by injecting the generated internal IDP certificate and generated client secret material into the seed payload
- renders a runtime dummy client env file from
src/oneid/docker_mock/oneid-aws-seed/dummy-client.env.template - ensures a local
KMSkey exists and that aliasalias/sign-jwtpoints to it - creates DynamoDB tables if they do not already exist
- inserts demo seed data into local DynamoDB
- stores generated certificates in local
SSM
Use these commands from src/oneid when you change the local seeder logic.
Run the Bash syntax check:
cd src/oneid
bash -n docker_mock/oneid-aws-seed/oneid-seeder.shRun the zero-dependency helper self-check:
cd src/oneid
python3 docker_mock/oneid-aws-seed/render_runtime_seed.py --self-checkValidate the helper in the same container image used by the local stack:
cd src/oneid
docker build -f docker_mock/oneid-aws-seed/Dockerfile -t local/oneid-seeder-validate .
docker run --rm --entrypoint python3 \
-v "$PWD"/docker_mock/oneid-aws-seed:/home/aws:ro \
-v /tmp/oneid-runtime-validate:/runtime \
local/oneid-seeder-validate \
/home/aws/render_runtime_seed.py \
--dynamodb-template /home/aws/dynamodb/batchDynamo.json \
--dummy-client-template /home/aws/dummy-client.env.template \
--output-dynamodb /runtime/batchDynamo.runtime.validation.json \
--output-dummy-client-env /runtime/dummy-client.validation.env \
--certificate-base64 validation-certValidate the Compose wiring after seeder changes:
cd src/oneid
docker compose config >/tmp/oneid-docker-compose.rendered.yamlThe local seeder creates or refreshes these SSM parameters:
cert.pemkey.pemidp_internal_cert.pemidp_internal_key.pem
The local seeder ensures these DynamoDB tables exist:
ClientRegistrationsSessionsIDPMetadataInternalIDPUsersInternalIDPSessions
The seeder generates certificates dynamically on each run. If you delete or recreate the local SSM parameters after services are already running, restart the services that load those credentials at startup.
In practice, after reseeding certificates, restart at least:
oneid-ecs-coreoneid-ecs-internal-idp
Example:
cd src/oneid
docker compose restart oneid-ecs-core oneid-ecs-internal-idphttp://localhost:8080: main local entry point throughoneid-gatewayhttp://localhost:8081:oneid-lambda-client-registrationhttp://localhost:8084: dummy clienthttp://localhost:4566: MiniStack endpoint for local AWS-compatible services
In the full stack:
- open
http://localhost:8084/client/loginfor the dummy client directly
Local Docker Compose intentionally sets SKIP_DEPCHECK=true for the services that build Java artifacts inside containers:
oneid-ecs-coreoneid-ecs-internal-idponeid-lambda-client-registration
This keeps local container builds independent from GitHub Packages credentials.
When you build those images manually:
- use
SKIP_DEPCHECK=truefor a fast local-only build - provide the
maven_settingsBuildKit secret when you want depcheck enabled
Examples:
Fast local build:
cd src/oneid
docker build -f oneid-ecs-core/Dockerfile --build-arg SKIP_DEPCHECK=true -t local/oneid-ecs-core .Depcheck-enabled build:
cd src/oneid
DOCKER_BUILDKIT=1 docker build \
--secret id=maven_settings,src=settings.xml \
-f oneid-ecs-core/Dockerfile \
-t local/oneid-ecs-core .Follow the main local services:
cd src/oneid
docker compose logs -f oneid-services-seeder oneid-ecs-core oneid-ecs-internal-idp oneid-gatewayCheck container status:
cd src/oneid
docker compose psRe-run only the seeder after cleaning local data:
cd src/oneid
docker compose up oneid-services-seederIf you use the AWS CLI against MiniStack, export any dummy credentials first:
export AWS_ACCESS_KEY_ID=test-key
export AWS_SECRET_ACCESS_KEY=test-secret
export AWS_REGION=eu-south-1List local DynamoDB tables:
aws dynamodb list-tables --endpoint-url http://localhost:4566 --region eu-south-1List local SSM parameters:
aws ssm describe-parameters --endpoint-url http://localhost:4566 --region eu-south-1Read a local SSM parameter:
aws ssm get-parameter --name cert.pem --endpoint-url http://localhost:4566 --region eu-south-1List local KMS aliases:
aws kms list-aliases --endpoint-url http://localhost:4566 --region eu-south-1With the full stack running:
- Open
http://localhost:8084/client/login. - Start the SPID/CIE login flow from the dummy client.
- Follow the redirect to the local IDP pages served through the gateway.
- Use the demo credentials configured for the local dummy client and internal IDP setup.
The exact demo values come from the runtime env rendered by the seeder and the seeded DynamoDB data.
One Identity supports an Event Mode to handle high-traffic periods by increasing ECS autoscaling limits and forcing a higher number of tasks.
Activation and deactivation must be performed via Pull Request:
- Open a PR: In the target environment (e.g.,
src/infra/prod/eu-south-1), set theevent_modevariable totrue. - Adjust Scale: If the default
event_autoscalingvalues are not sufficient for the specific event, update them in the same PR. - Merge and Apply: Once the PR is merged, the infrastructure is updated.
- Cleanup: After the event, open a new PR to set
event_modeback tofalseto return to normal operating limits.
| Environment | Normal (min-max/desired) | Event (min-max/desired) |
|---|---|---|
| PROD | 3-12 / 3 | 40-1000 / 40 |
| UAT | 1-3 / 1 | 10-50 / 10 |
| DEV | 1-2 / 1 | 3-12 / 3 |
Note: The
event_modeflag updates the autoscaling min/max capacity via the ECS module and forces thedesired_countusing an AWS CLI workaround within anull_resource.
For a comprehensive Code of Conduct please refer to the PagoPA's one.
This project is licensed under the terms of the Mozilla Public License Version 2.0.