Skip to main content
  1. Data-holder-testings/
  2. Self-hosted configuration/

Wych Register Auth for AU Data Holder Testing

3 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 Changelog for the latest version.

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

Docker #

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).

Config #

Key Description
KC_DB_URL The register auth’s database JDBC URL in the form jdbc:postgresql://{{host}}}:{{port}}}/{{db_name}}}
KC_DB_USERNAME The register auth’s database users name
KC_DB_PASSWORD The register auth’s database users password
KC_HOSTNAME This value defaults to au.register.auth.local.wych.co.nz which is a DNS record pointing at localhost.
In non-local environments, such as build and test servers, this should be set to the url of the host used to access this service.

Docker compose #

Here is a sample docker compose - this sets up the required DB and configures the Register Auth service.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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]
    depends_on:
      - db
    restart: on-failure
    ports:
      - "8080:80"
    environment:
      KC_DB_URL: jdbc:postgresql://db:5432/wych
      KC_DB_USERNAME: a-database-user
      KC_DB_PASSWORD: a-database-password
    command: start-dev --db=postgres --features=token-exchange
    networks:
      - test-network

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

Changelog #

tag changelog digest
3.15.0 Fixing path issue 40c2a2
3.14.0 Removing deprecated env vars 90569c
3.13.0 Native multi-platform builds 1e87f2
3.11.0 Dockerfile updates fe5386
3.10.0 Defaulting configuration 7535bd
3.9.0 Simplifying configuration 649711
3.8.0 Increasing code quality 5ba41e
3.7.0 Correcting test container variables 4545e6
3.6.0 Dependency updates and patching a5e89e
3.5.0 Increasing automated test coverage 6e8100
3.4.0 Releasing build complexity work a6ed11
3.3.11 Maintenance release, patching dependencies 239c00
3.3.10 Maintenance release, patching dependencies dc9fe6
3.3.9 Maintenance release, patching dependencies cb818a
3.3.8 Maintenance release, patching dependencies ba12e1
3.3.7 Maintenance release, patching dependencies 66e63c
3.3.6 Maintenance release, patching dependencies 004eab
3.3.5 Security patching and updates ddb4c2
3.3.4 Updated web navigation 5f4324
3.3.3 Enabled delete registered app capabilities 42b1c7
3.3.2 Fixed missing sha1 requirement 1d9a90
3.3.1 Enabling access to query clients 620ff7
3.3.0 Simplifying deployment steps 62336b
3.2.0 Preparing for external release de51ce