Commit Graph
9 Commits
Author SHA1 Message Date
Roman PerekhodandClaude Opus 5.5 a6c51801b8 feat: [OCSRE-1629] add NATS JWT authentication with a .creds file
A NATS server in operator (JWT) mode authenticates a client with a
user JWT and an NKey seed. oCIS could connect to NATS only with a
username and a password.

All NATS connections now accept JWT credentials: events, caches,
persistent stores, the service registry, and the health checks.

- OCIS_NATS_CREDS_FILE: the path of a .creds file
  (nats.UserCredentials). The file is read again on each reconnect.
- OCIS_NATS_CREDS: the content of a .creds file
  (nats.UserCredentialBytes). It takes precedence over the file.
- Each events, cache and store struct has the fields CredsFile and
  Creds with a per-service override, for example
  PROXY_EVENTS_CREDS_FILE.
- The registry reads MICRO_REGISTRY_AUTH_CREDS_FILE and
  MICRO_REGISTRY_AUTH_CREDS. If they are empty, it uses the
  OCIS_NATS_* variables.
- store.Credentials is passed next to each store.Authentication call.
  The revaconfig maps pass the new reva keys.
- The new checks.NewNatsCheckWithConfig uses the authentication and
  TLS settings of the service. The NATS health checks connected
  without credentials and without TLS before.

This change needs the reva commit with pkg/natsauth and the natsjs
plugin with the NatsOptions option. go.mod and vendor/ follow when
these changes are pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:15:55 +02:00
Roman Perekhod b82ad12fee nats checks fixed 2024-10-18 17:30:39 +02:00
Florian Schade 0437722353 Bugfix: Fix health and ready endpoint checker configurations 2024-10-17 14:34:04 +02:00
Florian Schade 66ff86bd35 enhancement: simplify ready and health check handler usage 2024-10-16 20:26:00 +02:00
Christian Richter c11b18c833 refactor web & activitylog checks
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-15 13:41:31 +02:00
Christian Richter 941e688ae6 split health and readiness for activitylog and antivirus
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-14 08:39:42 +02:00
Christian Richter 84e024e8f1 remove nats dependency from activitylog & antivirus
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-14 08:39:42 +02:00
Christian Richter 7d1a78cf9c refactor checks for activitylog and antivirus
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-14 08:39:42 +02:00
Christian Richter 26bf6ab796 add debug server to activitylog & check web availability
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-14 08:39:42 +02:00