Commit Graph
43 Commits
Author SHA1 Message Date
Roman PerekhodandClaude Opus 5.5 693a460d5e fix: [OCSRE-1629] let the more specific scope win for NATS credentials
Each config has two fields for the NATS credentials: CredsFile
(OCIS_NATS_CREDS_FILE;<SERVICE>_..._CREDS_FILE) and Creds
(OCIS_NATS_CREDS;<SERVICE>_..._CREDS). envdecode sets each field on
its own, and the content always won. Example: OCIS_NATS_CREDS set
globally and GRAPH_CACHE_CREDS_FILE set for the service. The graph
cache then used the global content and ignored the service file.

The registry already used a different rule: the registry variables
take precedence over the global variables.

Use the registry rule everywhere. After envdecode decodes a struct,
it resolves each CredsFile/Creds pair: when the file comes from a
more specific environment variable than the content, the content is
cleared. In the same scope the content still wins. A value from the
config file has the lowest scope, because environment variables
override the config file.

Update the descriptions of the Creds fields, the nats README, and the
changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:42:58 +02:00
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
Michal Klos fcbfecf376 feat: [stable-8.0][OCISDEV-1115] harden nats communication (#12790)
feat: [OCISDEV-1115] harden nats communication (#12777)

* feat: [OCISDEV-1115] harden nats communication

* feat: bump reva for tls-enabled stores
2026-08-14 12:13:42 +02:00
Juan Pablo Villafáñez 641fa42f8d chore: add otlp as supported tracing type
This is just for documentation purposes. There is no code change.
2025-07-14 15:29:16 +02:00
Julian Koberg b979844791 feat(ocis): adjust reva imports
Signed-off-by: Julian Koberg <jkoberg@MBP-Julian-Koberg.local>
2025-03-05 11:14:44 +01:00
Jörn Friedrich Dreyer 91dc7699d8 postprocessing event workers
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-22 11:26:50 +02:00
Jörn Friedrich Dreyer d6958f3a3e introduce event processing workers
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-22 10:13:16 +02:00
jkoberg c80254c4f1 feat(ocis): remove ocm store
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-10-15 17:24:51 +02:00
mmattel c3d065b668 [docs-only] Fix typo and rerun make docs-generate 2024-06-14 10:48:07 +02:00
Thomas Müller a8cbc612cc chore: remove unused return value from BindSourcesToStructs (#9033) 2024-04-30 18:18:31 +02:00
jkoberg 7d990390c3 fix(postprocessing): repair restart logic
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-04-08 11:20:01 +02:00
Phil Davis 945908978c chore: set introductionVersion 5.0 in services/postprocessing 2024-03-06 17:50:21 +05:45
Phil Davis 9d2be66a85 chore: add introductionVersion pre5.0 to environment variable docs 2024-03-06 17:50:20 +05:45
jkoberg de4f9d78f4 allow authentication for stores
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-19 10:44:05 +01:00
jkoberg 3e55223f2d allow authentication for events
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-19 10:44:05 +01:00
Andre DuffeckandMartin 1858912408 Apply suggestions from code review
Co-authored-by: Martin <github@diemattels.at>
2023-12-12 14:08:21 +01:00
André Duffeck c43b9d9bc6 Allow for retrying postprocessing steps with an exponential backoff 2023-12-12 14:08:21 +01:00
mmattel 90c3cd5f1f small fixes 2023-11-09 12:33:15 +01:00
mmattel 5e74b50efb [docs-only] Fix envvars with a array slice ([]string) 2023-11-09 12:22:59 +01:00
mmattel b13b880921 [docs-only] Fix envvars with a duration. 2023-11-08 18:32:39 +01:00
Daniël Franke 97034f4aaa Add tracing to postprocessing service (#7094)
This adds tracing to the postprocessing service.
2023-08-23 15:52:26 +02:00
Christian Richter d7139d4127 remove deprecated variables
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-08-22 17:25:24 +02:00
mmattel 6ad53971ef [docs-only] Increase readability for log level values in the description 2023-07-07 10:33:42 +02:00
mmattel d7b447b791 [docs-only] Increase readability for tracing values in the description 2023-07-07 09:50:39 +02:00
jkoberg 9740706df5 add default store to postprocessing
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-06-21 16:57:19 +02:00
jkoberg 70391a0bf2 unify CACERT envvars
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-05-25 13:32:37 +02:00
jkoberg a324ad48a0 add a store to postprocessing
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-05-12 11:04:41 +02:00
Christian Richter 624483a051 add debug to postprocessing
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-05-02 17:00:15 +02:00
mmattel 8ed34926ef [docs-only] Correct the removal version according semver to 4.0.0 2023-04-19 10:16:06 +02:00
Daniel Swärd afbfd2d6b2 Deprecating and renaming many environment variables
Fixes #5767
Fixes #5905
Fixes #5532
2023-04-05 11:05:48 +02:00
Roman Perekhod fcfb2ab9fa Introduced global OCIS_EVENTS_ENDPOINT and OCIS_EVENTS_CLUSTER #5901 2023-04-04 15:43:03 +02:00
Florian SchadeandMartin f38a9f4385 Introduce Policies-Service (#5716)
* add policies service
add policies proxy middleware
add policies event service
add policies grpc service
prepare ci and git environments (ci, make, readme, doc)

* add webfinger to the drone conf

* fix docs
remove not used virus scan postprocessing step

* relocate example rego file
implicitly enable and disable proxy and postprocessing policy checking by setting the query.
update configuration descriptions

* move policies
update readme

* use converter func to convert pp environment to actual environment
expose and test custom rego functions
add engine unit tests
add opa unit tests
update policies readme

Co-authored-by: Martin <github@diemattels.at>

* relocate sample policies to the deployments folder
change and document policies service port

* update index.md and small fix

* add health command
add version command
add debug server

---------

Co-authored-by: Martin <github@diemattels.at>
2023-03-14 16:08:22 +01:00
jkoberg ab4d8c3958 move config validation to parser package
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-26 14:44:37 +01:00
jkoberg d468a23315 deprecate POSTPROCESSING_VIRUSSCAN
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-26 11:50:16 +01:00
kobergjandMartin 9c0dd22e1f update wording
Co-authored-by: Martin <github@diemattels.at>
2023-01-26 10:26:33 +01:00
jkoberg 22f20b2b2e better configuration for pp service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-25 12:32:09 +01:00
jkoberg f88cf46c75 add readme for postprocessing
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-27 16:02:01 +01:00
mmattel 0aa3eba8c3 readding accidentially deleted entry 2022-12-27 10:58:52 +01:00
mmattel 3081b83b0c improvememts 2022-12-27 10:40:26 +01:00
mmattel dc170bccfe Fix the description of the postprocessing service 2022-12-27 10:40:26 +01:00
jkoberg 502e2ec8f4 fix postprocessing service
Signed-off-by: jkoberg <jkoberg@owncloud.com>

tmp

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-21 13:47:33 +01:00
jkoberg 1b032c7617 cosmetical touches
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-08 11:06:36 +01:00
jkoberg a004095a6c add postprocessing service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-08 11:00:42 +01:00