refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The test LDAP server uses [GLAuth](https://glauth.github.io/), a lightweight LDAP server backed by a TOML config file. It provides test users and groups that map to ScadaLink's role-based authorization model.
|
||||
The test LDAP server uses [GLAuth](https://glauth.github.io/), a lightweight LDAP server backed by a TOML config file. It provides test users and groups that map to ScadaBridge's role-based authorization model.
|
||||
|
||||
## Image & Ports
|
||||
|
||||
@@ -12,20 +12,20 @@ The test LDAP server uses [GLAuth](https://glauth.github.io/), a lightweight LDA
|
||||
## Base DN
|
||||
|
||||
```
|
||||
dc=scadalink,dc=local
|
||||
dc=scadabridge,dc=local
|
||||
```
|
||||
|
||||
## Test Users
|
||||
|
||||
All users have the password `password`.
|
||||
|
||||
| Username | Email | Primary Group | Additional Groups | ScadaLink Role |
|
||||
| Username | Email | Primary Group | Additional Groups | ScadaBridge Role |
|
||||
|----------|-------|---------------|-------------------|----------------|
|
||||
| `admin` | admin@scadalink.local | SCADA-Admins | — | Full administrator |
|
||||
| `designer` | designer@scadalink.local | SCADA-Designers | — | Template designer |
|
||||
| `deployer` | deployer@scadalink.local | SCADA-Deploy-All | — | Deploy to all sites |
|
||||
| `site-deployer` | site-deployer@scadalink.local | SCADA-Deploy-SiteA | — | Deploy to SiteA only |
|
||||
| `multi-role` | multi-role@scadalink.local | SCADA-Admins | SCADA-Designers, SCADA-Deploy-All | Multiple roles |
|
||||
| `admin` | admin@scadabridge.local | SCADA-Admins | — | Full administrator |
|
||||
| `designer` | designer@scadabridge.local | SCADA-Designers | — | Template designer |
|
||||
| `deployer` | deployer@scadabridge.local | SCADA-Deploy-All | — | Deploy to all sites |
|
||||
| `site-deployer` | site-deployer@scadabridge.local | SCADA-Deploy-SiteA | — | Deploy to SiteA only |
|
||||
| `multi-role` | multi-role@scadabridge.local | SCADA-Admins | SCADA-Designers, SCADA-Deploy-All | Multiple roles |
|
||||
|
||||
## Groups
|
||||
|
||||
@@ -41,36 +41,36 @@ All users have the password `password`.
|
||||
Users bind with their full DN, which includes the primary group as an OU:
|
||||
|
||||
```
|
||||
cn=<username>,ou=<PrimaryGroupName>,ou=users,dc=scadalink,dc=local
|
||||
cn=<username>,ou=<PrimaryGroupName>,ou=users,dc=scadabridge,dc=local
|
||||
```
|
||||
|
||||
For example: `cn=admin,ou=SCADA-Admins,ou=users,dc=scadalink,dc=local`
|
||||
For example: `cn=admin,ou=SCADA-Admins,ou=users,dc=scadabridge,dc=local`
|
||||
|
||||
The full DNs for all test users:
|
||||
|
||||
| Username | Full DN |
|
||||
|----------|---------|
|
||||
| `admin` | `cn=admin,ou=SCADA-Admins,ou=users,dc=scadalink,dc=local` |
|
||||
| `designer` | `cn=designer,ou=SCADA-Designers,ou=users,dc=scadalink,dc=local` |
|
||||
| `deployer` | `cn=deployer,ou=SCADA-Deploy-All,ou=users,dc=scadalink,dc=local` |
|
||||
| `site-deployer` | `cn=site-deployer,ou=SCADA-Deploy-SiteA,ou=users,dc=scadalink,dc=local` |
|
||||
| `multi-role` | `cn=multi-role,ou=SCADA-Admins,ou=users,dc=scadalink,dc=local` |
|
||||
| `admin` | `cn=admin,ou=SCADA-Admins,ou=users,dc=scadabridge,dc=local` |
|
||||
| `designer` | `cn=designer,ou=SCADA-Designers,ou=users,dc=scadabridge,dc=local` |
|
||||
| `deployer` | `cn=deployer,ou=SCADA-Deploy-All,ou=users,dc=scadabridge,dc=local` |
|
||||
| `site-deployer` | `cn=site-deployer,ou=SCADA-Deploy-SiteA,ou=users,dc=scadabridge,dc=local` |
|
||||
| `multi-role` | `cn=multi-role,ou=SCADA-Admins,ou=users,dc=scadabridge,dc=local` |
|
||||
|
||||
## Verification
|
||||
|
||||
1. Check the container is running:
|
||||
|
||||
```bash
|
||||
docker ps --filter name=scadalink-ldap
|
||||
docker ps --filter name=scadabridge-ldap
|
||||
```
|
||||
|
||||
2. Test a user bind with `ldapsearch`:
|
||||
|
||||
```bash
|
||||
ldapsearch -H ldap://localhost:3893 \
|
||||
-D "cn=admin,ou=SCADA-Admins,ou=users,dc=scadalink,dc=local" \
|
||||
-D "cn=admin,ou=SCADA-Admins,ou=users,dc=scadabridge,dc=local" \
|
||||
-w password \
|
||||
-b "dc=scadalink,dc=local" \
|
||||
-b "dc=scadabridge,dc=local" \
|
||||
"(objectClass=*)"
|
||||
```
|
||||
|
||||
@@ -78,9 +78,9 @@ ldapsearch -H ldap://localhost:3893 \
|
||||
|
||||
```bash
|
||||
ldapsearch -H ldap://localhost:3893 \
|
||||
-D "cn=admin,ou=SCADA-Admins,ou=users,dc=scadalink,dc=local" \
|
||||
-D "cn=admin,ou=SCADA-Admins,ou=users,dc=scadabridge,dc=local" \
|
||||
-w password \
|
||||
-b "dc=scadalink,dc=local" \
|
||||
-b "dc=scadabridge,dc=local" \
|
||||
"(cn=multi-role)"
|
||||
```
|
||||
|
||||
@@ -114,14 +114,14 @@ python infra/tools/ldap_tool.py search --filter "(cn=multi-role)"
|
||||
|
||||
Use `--host` and `--port` to override defaults (localhost:3893). Run with `--help` for full usage.
|
||||
|
||||
## Relevance to ScadaLink Components
|
||||
## Relevance to ScadaBridge Components
|
||||
|
||||
- **Security & Auth** — test LDAP bind authentication, group-to-role mapping, and multi-group resolution.
|
||||
- **Central UI** — test login flows with different role combinations.
|
||||
|
||||
## Notes
|
||||
|
||||
- GLAuth uses plain LDAP on port 3893. ScadaLink's Security & Auth component requires LDAPS/StartTLS in production. For dev testing, configure the LDAP client to allow plaintext connections.
|
||||
- GLAuth uses plain LDAP on port 3893. ScadaBridge's Security & Auth component requires LDAPS/StartTLS in production. For dev testing, configure the LDAP client to allow plaintext connections.
|
||||
- To add users or groups, edit `infra/glauth/config.toml` locally and restart the container: `docker compose restart ldap`. Note that the file is named `config.toml` on the host but is mounted into the container as `/app/config/config.cfg` (the path GLAuth expects).
|
||||
- The `admin` user is configured with `[[users.capabilities]]` (`action = "search"`, `object = "*"`) in the GLAuth config. This grants the admin account permission to perform LDAP search operations, which is required for user/group lookups.
|
||||
- Anonymous bind is not allowed. All LDAP operations (including searches) require an authenticated bind. Use the `admin` account for search operations.
|
||||
|
||||
Reference in New Issue
Block a user