diff --git a/.claude/skills/authorization/SKILL.md b/.claude/skills/authorization/SKILL.md index 56dc9b9..e7fa9a7 100644 --- a/.claude/skills/authorization/SKILL.md +++ b/.claude/skills/authorization/SKILL.md @@ -5,14 +5,17 @@ description: >- create, list or remove CI Server users or authorization groups, choose authorization actions (ITEM_READ, ITEM_MODIFY_VALUE, …), set process areas, logoff timeout or initial display for a user, change how users log in (dssana.sup login method: Automatic, Manual CI Server, - Manual OS, No, SSO, Deny), or hide Engineering Module features with a scheme. - Sources IM 36K10C10-01EN §2; Active Directory and single sign-on follow in phase 13 (IM 36K10J40). + Manual OS, No, SSO, Deny; no-login profile CI_NO_LOGIN), hide Engineering Module features + with a scheme, or connect CI Server to Active Directory (AD, domain users, security group or + OU mapping, directory group, profile priority, AD_INT_ON) and single sign-on for CI View + (SSO, SPNEGO, Kerberos, keytab, setspn, ktpass, kinit, krb5.ini). Sources IM 36K10C10-01EN §2, + IM 36K10J40-01EN. --- # Authorization (R1.03) Background: `knowledge/manuals/IM36K10C10-01EN.md` §2 (login methods, actions, user tabs, -schemes). Login settings are in `dssana.sup` on CI Core (skill `portal-setup` for reading +schemes), `IM36K10J40-01EN.md` (Active Directory, SSO). Login settings are in `dssana.sup` on CI Core (skill `portal-setup` for reading and changing setup files). Rules: @@ -24,6 +27,7 @@ Rules: | Task | File | Status | |---|---|---| | Create, check and remove authorization groups and users (quick load) | `tasks/users-groups.md` | verified | -| Login methods per client and user interface (`dssana.sup`, tab *Login control*) | C10 summary §2 | from docs (installed values read) | +| Login methods per client and user interface (`dssana.sup`, tab *Login control*); *No* login = full authorization when the profile user is missing | `tasks/login-methods.md` | verified (read; changes from docs) | | Schemes (hide Engineering Module features) | C10 summary §2 | from docs | -| Active Directory, single sign-on, password rules | phase 13 | not covered | +| Active Directory integration and single sign-on (SPNEGO) | `tasks/active-directory.md` | from docs (no domain) | +| Password rules (`dssana.sup` *Password rules*: length, digits, punctuation, mixed case) | L50 summary §3 | from docs | diff --git a/.claude/skills/authorization/tasks/active-directory.md b/.claude/skills/authorization/tasks/active-directory.md new file mode 100644 index 0000000..3ef3ba4 --- /dev/null +++ b/.claude/skills/authorization/tasks/active-directory.md @@ -0,0 +1,67 @@ +--- +task: Active Directory integration and single sign-on (SPNEGO) for CI Server +version: R1.03 +source: IM 36K10J40-01EN §1–§3, App. 1; dssana.sup AD/SSO keywords and auth\WEB-INF templates checked on the test system 2026-10-01 +status: from docs (no domain on the test system) +--- + +# Active Directory and single sign-on + +Needs a Windows domain, domain-joined CI Server machines and admin rights on the machines and +the domain controller. Not practiced; give the procedure and prepare the setup-file changes, +the user (and the domain administrator) applies them. Details: `knowledge/manuals/IM36K10J40-01EN.md`. + +## 1. Decide the mapping mode + +| | `Security_group` (recommended) | `Organizational_unit` (default in the file) | +|---|---|---| +| CI Server side | Each user profile gets a *Directory group* (Engineering Module user form, tab *Directory Services*; `USER_DF.DIRECTORY_GROUP`) and a *Profile priority* (`MERGE_PRIORITY`) | User profile names = OU names | +| AD side | One security group per profile, same name as the directory group; users in the groups | One OU per profile containing the users; all users also in the group named in `AD_SEC_GRP` (default: group named like the CI Server node) | + +Profiles: reuse CI Server users as roles (e.g. `ADMIN`, `ENG`, `OPER`, `
` operators); +they need no password for AD logins. A user in several groups gets the highest priority profile. + +## 2. Enable AD integration (CI Core / CI Portal) + +Prepared `dssana.sup` lines (tab *Active Directory*): + +``` +AD_INT_ON +AD_MAP_MODE = Security_group +AD_CHECK_THRESHOLD = 30 +``` + +Optional (installed keywords, not in the manual): `AD_SERVER = "[:port]"`, +`AD_SERVER_BACKUP`, `AD_SECURE` (LDAPS, port 636), `AD_ACCESS_USER`/`AD_ACCESS_PASSWORD` (blank = +the account that runs CI Server). For OU mode set `AD_MAP_MODE = Organizational_unit` and +`AD_SEC_GRP = ""`. + +Then: join the machine to the domain; run the CI Service as a domain account that is a local +administrator (*Services › CI Server Service › Log On*); restart CI Server. Users log in as +`\` or `@`; the Edit/Engineering Module login methods are then +ignored. If web access must not be open to every domain user, disable CI Portal (port 0 in +`jwuiisg.sup`, *Client communication*) — the manual's own warning. + +## 3. Single sign-on for remote CI View (SPNEGO) + +Checklist (order matters): +1. DNS forward and reverse records for CI Portal and CI View; CI Portal reached by host name; + CI Portal with a valid SSL certificate (skill `portal-setup`). +2. DC: service user (e.g. `sso`), `setspn -S http/ sso`, `ktpass … -out + .keytab -princ http/@ …` (realm upper case), delegation trust. +3. Keytab to `%TLS_ALLUSERS_PATH%\wap\webapps\auth\WEB-INF`; `kinit http/@` succeeds on CI Portal (`tls\jre\bin`) and CI View (Remote Connect JRE). +4. `dssana.sup` tab *Single Sign On*: `SSO_INT_ON`, `WEBHMI_SERVER_FQDN = ""`, + `DOMAIN_NAME = ""`, `KRB5_FILE = "\krb5.ini"` (set the realm mapping in that + file), `KEYTAB_FILE = ".keytab"`, `SSO_TOKEN_DURATION` (s); restart USER Service. +5. Browsers on CI View: Firefox `network.negotiate-auth.trusted-uris` and `…delegation-uris` + = `https://`; Edge/IE: add the site to *Local intranet*, integrated Windows + authentication on. +6. Test: temporarily enable the `test` servlet in `web.xml`, open + `https://:8443/auth/test`, expect *Authorization scheme : SPNEGO*; restore + `web.xml`. +7. Start applications from the *Remote Connect* folder on CI View; the login methods `SSO` in + *Login control* (installed default for most UIs) then log the user in without a prompt. + +Common failures (manual): "realm not found" → fix `krb5.ini`; access by IP address or from the +CI Portal machine itself → no SPNEGO; DNS reverse lookup missing → ticket errors. diff --git a/.claude/skills/authorization/tasks/login-methods.md b/.claude/skills/authorization/tasks/login-methods.md new file mode 100644 index 0000000..91ec06c --- /dev/null +++ b/.claude/skills/authorization/tasks/login-methods.md @@ -0,0 +1,47 @@ +--- +task: Read and change login methods per client and user interface (dssana.sup Login control) +version: R1.03 +source: IM 36K10C10-01EN §2.2; IM 36K10J40-01EN §1.1, §2.10.3; dssana.sup help and installed values checked on the test system 2026-10-01 +status: verified (reading and the No-login behaviour; changing the file from docs — admin) +--- + +# Login methods (`dssana.sup`, tab *Login control*) + +## 1. Read the current methods + +`findstr /b LOGIN_METHOD %TLS_ROOT_PATH%\tls\sup\dssana.sup` (or the Setup File Editor). + +``` +LOGIN_METHOD = , "", , , "" +``` + +- ``: host name or IP (wildcards allowed), `""` (this machine) or `""` + (any other); lines are evaluated top-down, ``/`` always last. +- ``: the full name from the *User Interfaces* tab (`USER_INTERFACE = …`), e.g. + `"Engineering Module"`, `"Edit Module"`, `"Operator Interface"`, `"Quickload Utility"`. +- ``: `Automatic` (Windows name = CI Server user, no password), `Manual CI Server`, + `Manual OS`, `No`, `SSO`, `Deny`. + +Installed (R1.03.00): local and remote Engineering Module, Edit Module, Operator Interface, Item +Search, Mobile Operator, Excel Add-in → `SSO` (falls back to *Manual CI Server* while SSO is not +set up); local Quickload / Display and Symbol Utility → `No`; remote Playback Viewer, Quickload, +Display/Symbol utilities → `Deny`; OPC UA server, ODBC, `dnetapi` → `Manual CI Server`; +anonymous OPC UA (local) → `No` with profile `CI_NO_LOGIN_OPCUAS`. + +## 2. *No* login — check the profile + +With `No` the user interface runs with the no-login profile (5th field). **If no CI Server user +with that name exists, the session gets full authorization** (`dssana.sup` help; verified +indirectly: `Quickload Utility` uses `No` with an empty profile and every `dssqld` change is +recorded in the audit trail as user `FULL AUTHORIZATION`). The installed lines name +`CI_NO_LOGIN`, which does not exist by default (only `CI_NO_LOGIN_OPCUAS` does). + +Before setting `No` for an operator UI: create user `CI_NO_LOGIN` with a restricted +authorization group (`users-groups.md`) and a password, then change the method. + +## 3. Change a method + +Admin rights; hand to the user (skill `portal-setup`, `change-setup-file.md`). Add a specific +line above the ``/`` lines (e.g. one HMI PC by host name), save, restart USER +Service (or CI Server) for it to take effect. With **AD integration on** (`AD_INT_ON = YES`) the +methods of the Edit and Engineering Modules are ignored: see `active-directory.md`. diff --git a/.claude/skills/high-availability/SKILL.md b/.claude/skills/high-availability/SKILL.md new file mode 100644 index 0000000..b38f40b --- /dev/null +++ b/.claude/skills/high-availability/SKILL.md @@ -0,0 +1,35 @@ +--- +name: high-availability +description: >- + CI Server R1.03 high availability with HAC (redundant servers). Use when the user asks about + redundant / dual / triple / quad servers, primary and secondary server, active and standby, + switchover (automatic or manual), the HAC HMI (hacw_hmi), watchdog, recovery (restart a + process or tool, hacrec, -wdg_off), mirror / synchronization of the standby, journaling and + key file repair (isfjrn, *.jrn), history merge after an island situation (hachmfcmd), hac.sup, + CI_PRIM, hacw_standby / hacw_stop scripts, HAC status items (SYSTEM.HAC1), hacitmval, HAC + firewall ports (UDP 16000-16006), hardware watchdog or custom health checks, or applying a + patch to a redundant system. Source IM 36K10J20-01EN. +--- + +# High availability — HAC (R1.03) + +Background: `knowledge/manuals/IM36K10J20-01EN.md` (concepts, processes, set-up steps, +installed `hac.sup` and the differences from the manual). + +Rules: +- Run `system-check` first; follow the user's chosen way of working. +- HAC needs its own licence and at least two servers with two separate networks between them. + Nothing here was practiced on a real redundant pair: say so when giving procedures. +- `hac.sup`, the `tls\com` scripts and system variables need admin rights and a restart; hand + them to the user (skill `portal-setup`, `change-setup-file.md`). +- Never switch over, reboot or change a server's mode on a running plant without the user's + explicit approval, and only when the mirror is consistent (see `redundant-setup.md` §3). +- Do not start `hacrec` with `-wdg_off` on a server without reviewing its process list first: + stand-alone Recovery acts (default action for most processes is `TOOL` = restart services). + +| Task | File | Status | +|---|---|---| +| Check HAC on a system: licence, processes, `hac.sup`, scripts, HMI properties, logs | `tasks/hac-checks.md` | verified (read-only, single server) | +| Set up and operate a redundant server pair: steps, `hac.sup` tabs, manual switchover, patching | `tasks/redundant-setup.md` | from docs | +| Recovery, logger and journaling on a stand-alone node | `tasks/standalone-recovery.md` | from docs | +| Dual-redundant Platform for Computer | — | not covered (separate product) | diff --git a/.claude/skills/high-availability/tasks/hac-checks.md b/.claude/skills/high-availability/tasks/hac-checks.md new file mode 100644 index 0000000..8776bf4 --- /dev/null +++ b/.claude/skills/high-availability/tasks/hac-checks.md @@ -0,0 +1,50 @@ +--- +task: Check HAC on a system (licence, processes, hac.sup, scripts, HMI properties, logs) +version: R1.03 +source: IM 36K10J20-01EN §1.3–§1.5, §2, §4.1.4, §6.1; checked read-only on the test system 2026-10-01 +status: verified (read-only, single unlicensed server) +--- + +# HAC checks + +All read-only. + +## 1. Is HAC in use? + +| Check | Command / file | HAC in use when … | +|---|---|---| +| Licence | `dir %TLS_ROOT_PATH%\tls\sup\hacini.sup` | the file exists (licence files are `ini.sup`) | +| Start script | `type %TLS_ROOT_PATH%\tls\com\ci_start.cmd` | it is a copy of `hacw_standby` (title *CI Server_in stand-by mode*, starts `haclog`, `lockmgr`, `isfjrn`) | +| Server number | `echo %CI_PRIM%` | 0 primary, 1 secondary, 2, 3 | +| Processes | `tasklist /FI "IMAGENAME eq hac*"` | `hacwdg`, `hacrec`, `haclog`, `hacmir`, `hacwagt`, `hacwitm` run | + +Test system (R1.03.00): no `hacini.sup`, normal `ci_start.cmd`, `CI_PRIM` unset, no `hac*` +process — HAC not used. + +## 2. Configuration + +- `tls\sup\hac.sup`: read with the Setup File Editor or + `findstr /v /b "!" %TLS_ROOT_PATH%\tls\sup\hac.sup` (active lines only). Check `MODE`, + `HAC_HOSTS` (real host names, not `SERVER_A`…), `PRIMARY`/`SECONDARY` addresses, `IP_DEVICE` + (a real router/switch with priority 1; **no `localhost`** in production), `START_MANUAL` + (`NO` once commissioned), `RECOVERY_ON`, `JOURNAL_ON`, `HMF_DAYS`. + The installed file is a template (`SERVER_A`, `192.168.1.1`, `localhost`, `START_MANUAL = + YES`): if these are still present the pair was never configured. +- `hac.sup` must be identical on all servers (it is excluded from the mirror on purpose). +- HAC HMI: `%TLS_WAP_PATH%\cfg\jhacProperties\application.properties` — `primary=`, + `secondary=` (addresses of every network), `port1`/`port2` (16000), `logport` (16001). +- Firewall: UDP 16000–16006, TCP 34489 (history merge), ICMP between the servers. + +## 3. State and logs (running pair) + +- HAC HMI: `hacw_hmi` (not in the start menu). Per server: responsive, operational status + (Standby / Activating / Active / Deactivating), mode (Automatic / Manual), CI Server / custom / + IP health, mirror mode and status (consistent = black text), recovery table, IP devices, log. +- Status items if configured: `
.OPER_MODE` (87 manual, 88 automatic), `.OPER_STAT` + (95 active, 99 standby), `.CI_STAT`/`.IP_STAT` (90 healthy, 89 fault), `.DATA1_MODE`/ + `.DATA1_STAT` (mirror) — read with `itmval -g`. +- Logs: `%TLS_LST_PATH%\hac_log_.txt` (cyclic; `hac_log_0.txt` names the current + page), `hacmir.log`/`hacmir_old.log` (mirror), `%TLS_LOG_PATH%\hacw_standby.log`, + `hacw_activate.log`, and `umhlog.log` (`HAC*`, `ISFJRN` messages; ISFJRN names the journal + report `_jrn.lst` after an unclean shutdown). +- Watchdog start problems: `hacwdg -d` in a console shows initialization errors. diff --git a/.claude/skills/high-availability/tasks/redundant-setup.md b/.claude/skills/high-availability/tasks/redundant-setup.md new file mode 100644 index 0000000..648093e --- /dev/null +++ b/.claude/skills/high-availability/tasks/redundant-setup.md @@ -0,0 +1,90 @@ +--- +task: Set up and operate a redundant HAC server pair (steps, hac.sup tabs, switchover, patching) +version: R1.03 +source: IM 36K10J20-01EN §1.2–§1.5, §2.4–§2.6, §3, §4.3–§4.11, §6.4, §7; hac.sup and scripts checked on the test system 2026-10-01 +status: from docs (needs two licensed servers; not practiced) +--- + +# Redundant server pair (HAC) + +Everything here needs admin rights on both servers and a planned outage. Prepare the files; +the user applies them. + +## 1. Preparation + +- Identical servers: same OS, CI Server version and patches, install path, TLS variables, node + number and licence (including HAC). +- ≥ 2 separate network interfaces/segments between the servers (≤ 4), separate from field + networks if possible. One link only = single point of failure and the risk that both servers + go active. +- Time sync on each server from an NTP/GPS source with jumps ≤ 1 s (not DUR time sync between + the pair: same node number). +- At least one real IP device per server for the network check (router/switch, priority 1). +- CI Service start type *Automatic* (HAC reboots servers). +- `TLS_BACKUP_PATH` on a partition at least as large as `TLS_HIS_PATH` (the standby zips its + runtime environment before each synchronization; without the variable the scripts use + `TLS_LST_PATH`). + +## 2. Steps (on every server unless noted) + +1. System variable `CI_PRIM` = 0 (primary), 1 (secondary), 2, 3. +2. Start CI Server once; create the optional status items per server (section, e.g. + `SYSTEM.HAC1`, items `OPER_MODE`, `OPER_STAT`, `CI_STAT`, `IP_STAT`, `DATA1_MODE`, + `DATA1_STAT`, …, all Integer); stop CI Server. +3. `tls\com`: rename `ci_start.cmd`/`ci_stop.cmd` to e.g. `ci_start_old.cmd`/`ci_stop_old.cmd`, + copy `hacw_standby.cmd` → `ci_start.cmd`, `hacw_stop.cmd` → `ci_stop.cmd`. +4. `hac.sup` on the primary (Setup File Editor), then copy to the others: + +| Tab | Set | +|---|---| +| General | `MODE` (DUAL/TRIPLE/QUAD), `HAC_HOSTS` (host names in priority order), `HAC_UNIT` (status item sections), `HEARTBEAT` | +| Network | `PRIMARY`, `SECONDARY` … = the IP address of each network, same order on all servers | +| Watchdog | `IP_DEVICE = ,