Skip to main content
  1. Data-holder-testings/
  2. Non-Production configuration/

Wych Register Auth for AU Data Holder Testing

2 mins

This Wych register for AU Data Holder Testing (Register) represents the ACCC’s AU register service, this version has been designed to support Data Holder testing and so while on an API level it is similar to the ACCC’s service it is fundamentally different in a number of key ways.

graph BT; DH[Data Holder] --> REG[CDR Register] REG --> REGA[CDR Register Auth] DR[Data Holder Tester] --> REG DR --> DH DR --> REGA

The register can be shared by multiple Data Holder instance and multple Data Holder Tester instances. The main consideration here is that the Data Holders must be able to talk to the Register Auth service and vise-versa and the Register Auth must be co-located with the Tester instances as they share a configuration data store.

graph BT; DH1[Data Holder] --> REG[CDR Register Auth] DH2[Data Holder] --> REG DH3[Data Holder] --> REG DR1[Data Holder Tester] --> REG DR2[Data Holder Tester] --> REG DR3[Data Holder Tester] --> REG DR1 --> DH1 DR2 --> DH2 DR3 --> DH3

Requirements #

The register requires a PostgreSQL 14+ relational database. Registry can utilise the same PostgreSQL service as the other non-production service but requires a separate schema. The schema can be set in the search path to faciliate easy of connection.

The PostgreSQL jdbc syntax is:

jdbc:postgresql://[host]:[port]/[db-name]?currentSchema=[db-schema]

This can be organised as a database per app or a schema per database.

jdbc:postgresql://localhost:5432/au-register?currentSchema=public
jdbc:postgresql://localhost:5432/testing?currentSchema=au-register

Repository #

The register can be pulled from the following repository. Check versions for the latest version.

docker pull wychaustralia.azurecr.io/au-register-auth:[version]

Config #

For the register to start you will need to set the following properties. If you are setting these as environment variables then use the UPPERCASE and replace . (dot) with _ (underscore).

  • WYCH_DATASOURCE_JDBC_URL (wych.datasource.jdbc.url)
  • WYCH_DATASOURCE_USERNAME (wych.datasource.username)
  • WYCH_DATASOURCE_PASSWORD (wych.datasource.password)

Docker compose #

Here is a sample docker compose - this sets up the required DB and configures the Register service. The majority of the configuration relates to providing

version: "3.7"
name: au-register
services:
  db:
    image: postgres
    init: true
    environment:
      PGDATA: /var/lib/postgresql/data/pgdata
      POSTGRES_USER: a-database-user
      POSTGRES_PASSWORD: a-database-password
    volumes:
      - au-register-data-volume:/var/lib/postgresql/data/pgdata
    networks:
      au-register-db:
        aliases:
          - au-register-db
  
  au-register-auth:
    image: wychaustralia.azurecr.io/au-register-kc:[version]
    restart: on-failure
    networks:
      - wych-service
      - au-register-auth-db
    environment:
      WYCH_DATASOURCE_JDBC_URL: jdbc:postgresql://db:5432/wych
      WYCH_DATASOURCE_USERNAME: a-database-user
      WYCH_DATASOURCE_PASSWORD: a-database-password
    command: start-dev --db=postgres --features=token-exchange

networks:
  wych-service:
    name: wych-service
  au-register-auth-db:
      
volumes:
  au-register-auth-data-volume:
      
volumes:
  au-register-data-volume:

Changelog #

changelog