Skip to content

feat: [main][OCSRE-1629] add NATS JWT authentication with a .creds file - #799

Merged
2403905 merged 2 commits into
mainfrom
OCSRE-1629-nats-creds-main
Nov 9, 2026
Merged

2403905 merged 2 commits into
mainfrom
OCSRE-1629-nats-creds-main

Conversation

@2403905

@2403905 2403905 commented Nov 9, 2026

Copy link
Copy Markdown

Backport of #782 to main.

The ocis part is owncloud/ocis#13220.

Changes for the backport:

  • pkg/natsauth/natsauth_test.go: the test builds the creds file without jwt.FormatUserConfig. The jwt/v2 version v2.8.2 refuses a seed that does not match the JWT.
  • internal/grpc/services/gateway/gateway.go: this branch has no create_personal_space_cache_config. The gateway checks only the provider cache.
  • pkg/storage/fs/posix: this branch does not have the posix driver. The changes for it are dropped.
  • go.mod: the NATS versions of this branch stay. The two replace lines for the plugins stay as in the branch.

Tests: go test passes for pkg/natsauth, pkg/store, pkg/events/stream, pkg/auth/manager/publicshares, pkg/storage/utils/decomposedfs/options, and internal/grpc/services/gateway.

🤖 Generated with Claude Code

Backport of #782 to main.

Changes for the backport:

- pkg/natsauth/natsauth_test.go: build the creds file without
  jwt.FormatUserConfig. The jwt/v2 version v2.8.2 refuses a seed that
  does not match the JWT.
- internal/grpc/services/gateway/gateway.go: main has no
  create_personal_space_cache_config, so the gateway checks only the
  provider cache.
- pkg/storage/fs/posix: main does not have this driver. Drop the
  changes for it.
- go.mod: keep the NATS versions of main.

(cherry picked from commit bb724be)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@2403905
2403905 requested a review from a team as a code owner November 9, 2026 10:14
The events/natsjs plugin of go-micro has no NatsOptions option. Use the
kobergj/plugins replace lines of stable-8.0, as in #782.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@kw-security

kw-security commented Nov 9, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@2403905
2403905 merged commit 35b75d9 into main Nov 9, 2026
@2403905
2403905 deleted the OCSRE-1629-nats-creds-main branch November 9, 2026 10:54
2403905 added a commit to owncloud/ocis that referenced this pull request Nov 9, 2026
owncloud/reva#799 is merged. Use the merged main commit instead of the
commit of the pull request branch. The vendored code does not change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2403905 added a commit to owncloud/ocis that referenced this pull request Nov 10, 2026
…file (#13382)

* feat: [master][OCSRE-1629] add NATS JWT authentication with a .creds file

Backport of #13220 to master.

The base of this commit is the backport to stable-9.0
(#13381). Changes for master:

- go.mod: use the reva backport owncloud/reva#799. The reva main
  branch needs newer versions of some modules, for example nats.go
  v1.55.0 and go 1.26.10. Use the plugins replace lines of the
  original change.
- vendor/: regenerate with go mod vendor.

(cherry picked from commit 99b5ec2)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* build: [OCSRE-1629] pin the merged reva commit

owncloud/reva#799 is merged. Use the merged main commit instead of the
commit of the pull request branch. The vendored code does not change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* ci: [OCSRE-1629] fix the zizmor findings in the NATS JWT jobs

- Set persist-credentials: false for the checkout steps.
- Use the action versions of master for setup-php and setup-node.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* ci: [OCSRE-1629] do not expect the cache-createhome bucket

The gateway does not use a NATS create-home cache anymore.
The proxy keeps this state in memory. Remove the bucket from
the list of buckets that verify.sh expects.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants