diff --git a/README.md b/README.md index 5e2c9b5..75880ab 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Plugin containing gradle task and setting used by common, library, and service r Library containing all internal messages for services. GitHub [Hlæja Common Messages](https://github.com/swordsteel/hlaeja-common-messages) +#### Common JWT + +Library containing JWT for services. GitHub [Hlæja JWT](https://github.com/swordsteel/hlaeja-jwt) + ### Services #### Device Data @@ -56,4 +60,8 @@ Store configurations for electronic devices. GitHub [Hlæja Device Configuration #### Registry API -Store configurations for electronic devices. GitHub [Hlæja Registry API](https://github.com/swordsteel/hlaeja-registry-api) +API for register devices when flashed. GitHub [Hlæja Registry API](https://github.com/swordsteel/hlaeja-registry-api) + +#### Account Registry + +Store Information of accounts. GitHub [Hlæja Account Registry](https://github.com/swordsteel/hlaeja-account-registry) diff --git a/doc/dependency.md b/doc/dependency.md index 4beba4c..5d5400f 100644 --- a/doc/dependency.md +++ b/doc/dependency.md @@ -33,7 +33,7 @@ graph TD HDA --> HDC HDA --> HDD HRA --> HDR - HRA -.-> HAR + HRA --> HAR HM -.-> HDC HM -.-> HDR HM -.-> HAR @@ -52,48 +52,65 @@ graph RL PCo[Plugin Common] PCoD[Plugin Common Detekt] PCoK[Plugin Common Ktlint] + PCe[Plugin Certificate] PS[Plugin Service] PSC[Plugin Service Container] PSIT[Plugin Service Integration Test] PSPR[Plugin Service Process Resource] - PCe[Plugin Certificate] end - PCo --> PL PLM --> PL PLP --> PL - CP --> PCo + PCo ---> PL PCoD --> PCo + CP ---> PCo PCoK --> PCo - PCo --> PS + PCo ---> PS PSC --> PS PSIT --> PS PSPR --> PS + CML[Common Messages Library] PL --> CML + + JWT[JWT Library] + PL --> JWT + DRS[Device Registry Service] - CML --> DRS PS --> DRS PCe --> DRS + CML --> DRS + JWT --> DRS + DDS[Device Data Service] - CML --> DDS PS --> DDS + CML --> DDS + DCS[Device Configuration Service] - CML --> DCS PS --> DCS + CML --> DCS + DAS[Device API Service] CML --> DAS + JWT --> DAS PS --> DAS PCe --> DAS + RAS[Registry API Service] CML --> RAS + JWT --> RAS PS --> RAS PCe --> RAS + AS[Account Service] - CML -.-> AS - PS -.-> AS - PCe -.-> AS + CML --> AS + JWT --> AS + PS --> AS + PCe --> AS + MUS[Management UI Service] CML -.-> MUS + JWT -.-> MUS PS -.-> MUS PCe -.-> MUS + ``` diff --git a/doc/docker_hlaeja.md b/doc/docker_hlaeja.md index 3314e45..f348cdc 100644 --- a/doc/docker_hlaeja.md +++ b/doc/docker_hlaeja.md @@ -67,9 +67,34 @@ SPRING_PROFILES_ACTIVE: docker ### Volume +Mount a local public key into the container. Read [rsa_key.md](./rsa_key.md) for how to generate. + Mount a local keystore into the container. Read [keystore.md](./keystore.md) for how to generate. ```text volumes: + - ./cert/account_public_key.pem:/app/resources/cert/public_key.pem - ./cert/registry_api_keystore.p12:/app/resources/cert/keystore.p12 ``` + + +## Account Registry + +### Environment + + +```text +SPRING_R2DBC_URL: r2dbc:postgresql://localhost:5432/account_registry +SPRING_R2DBC_USERBAME: services +SPRING_R2DBC_PASSWORD: password +JWT_PRIVATE_KEY: cert/private_key.pem +``` + +### Volume + +Mount a local private key into the container. Read [`rsa_key.md`](./rsa_key.md) for how to generate. + +```text +volumes: + - ./cert/account_private_key.pem:/app/resources/cert/private_key.pem +``` diff --git a/hlaeja-compose.yml b/hlaeja-compose.yml index a2ae8a1..cdec3d3 100644 --- a/hlaeja-compose.yml +++ b/hlaeja-compose.yml @@ -8,7 +8,7 @@ networks: services: device-registry: - image: hlaeja-device-registry:0.3.0 + image: hlaeja-device-registry:0.4.0 container_name: DeviceRegistry restart: unless-stopped environment: @@ -45,7 +45,7 @@ services: - 9030:8080 device-api: - image: hlaeja-device-api:0.3.0 + image: hlaeja-device-api:0.4.0 container_name: DeviceApi restart: unless-stopped environment: @@ -61,7 +61,7 @@ services: - ./cert/device_api_keystore.p12:/app/resources/cert/keystore.p12 registry-api: - image: hlaeja-registry-api:0.1.0 + image: hlaeja-registry-api:0.2.0 container_name: RegistryApi restart: unless-stopped environment: @@ -71,6 +71,21 @@ services: - develop ports: - 9040:8443 - # mount a local `registry_api_keystore.p12` into the container. + # mount a local `account_public_key.pem` and `registry_api_keystore.p12` into the container. volumes: - ./cert/registry_api_keystore.p12:/app/resources/cert/keystore.p12 + - ./cert/account_public_key.pem:/app/resources/cert/public_key.pem + + account-registry: + image: hlaeja-account-registry:0.1.0 + container_name: AccountRegistry + restart: unless-stopped + environment: + SPRING_PROFILES_ACTIVE: docker + networks: + - develop + ports: + - 9050:8080 + # mount a local `account_private_key.pem` into the container. + volumes: + - ./cert/account_private_key.pem:/app/resources/cert/private_key.pem