Multi tenant approach - cleanup done

This commit is contained in:
2026-07-26 16:13:47 +05:30
parent a4daf7e204
commit d6dc33d9b1
30 changed files with 1312 additions and 184 deletions

View File

@@ -29,18 +29,24 @@ It is valid for one year; the access token obtained with it is short-lived.
For local development, the repository setup script automates prerequisite
checks, the full Maven verification, directory creation, all three cloud key
pairs, the installation key pair, `config/clients.yml`, and the encrypted
machine assertion:
pairs, the installation key pair, database-backed tenant/install registration,
an initial license, and the encrypted machine assertion:
```bash
./scripts/setup-local-communication.sh
```
The script interactively asks for the customer identifier, installation
identifier, cloud URL, and whether to run the full verification. Customer and
installation identifiers cannot contain spaces; the customer identifier is
used for its directory and signing-key filenames. New customers are appended
to `config/clients.yml` without replacing existing customers.
The script interactively asks for the customer name and slug, installation
identifier, cloud URL, database connection, license package/type/duration, and
whether to run the full verification. Customer and installation identifiers
cannot contain spaces. The slug is the stable tenant key and is used for its
directory and signing-key filenames.
The client account, installation public key, allowed scopes, and license are
upserted into PostgreSQL (`identity.client_account`,
`identity.client_installation`, and `identity.client_license`). The cloud
service resolves this registration dynamically through Redis with PostgreSQL
fallback, so adding another customer does not require a cloud restart.
It preserves existing private keys and assertions. Set
`CYGNUS_SETUP_FORCE_ASSERTION=true` only when the assertion needs to be
@@ -65,6 +71,6 @@ mvn -pl cygnus-cloud-client exec:java \
client-signing-private.pem cloud-assertion-public.pem machine-assertion.jwt"
```
Copy only `client-signing-public.pem` into that customer's cloud-side client
configuration. Keep the private key and generated assertion on the on-premises
server with owner-only filesystem permissions.
The setup script stores `client-signing-public.pem` in the installation record
used by the cloud. Keep the private key and generated assertion only on the
on-premises server with owner-only filesystem permissions.