1
0
mirror of https://github.com/owncloud/ocis.git synced 2026-10-23 23:29:02 +03:00
Commit Graph

435 Commits

Author SHA1 Message Date
Michal Klos
7b83f36060 fix(proxy): [OCISDEV-1517] add missing /vault/graph routes for activities and invitations (#13109) 2026-10-13 13:15:20 +00:00
Matteo
9015eec558 fix(vault): [OCISDEV-1503] fix signed URL downloads in vault mode (#13097)
Save the MFA status after the user is resolved so signed-URL downloads
inherit it, and check its age on read. Build the signing-key URL with
the URL API so it works with the vault base URL.
2026-10-12 10:28:49 +02:00
Roman Perekhod
2e377bde67 fix: [OCISDEV-1476] fix AuthApp requests failing with a custom PROXY_… (#13078) (#13107)
* fix: [OCISDEV-1476] fix AuthApp requests failing with a custom PROXY_USER_OIDC_CLAIM

* fix: [OCISDEV-1476] map ErrAccountNotFound to 401 in verifyUser

AccountResolver.verifyUser only mapped ErrAccountDisabled to 401 before
falling through to a generic 500. The identity backend excludes disabled
accounts from by-username lookups and returns ErrAccountNotFound instead,
so a disabled user authenticating via AppAuth or basic auth got a 500
instead of a 401, caught by the acceptance test suite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-09 13:37:34 +00:00
Paul Faure
1347e3607d fix(proxy): don't log an error when create-home finds no user (#13102)
Requests on unprotected routes can carry a reva token without a resolved
user: reva's internal downloads to the data gateway (/data) are sent with
the caller's token. create_home logged "no user in context" at error level
for each of them, so every download added an error line. Log at debug with
the path instead; the request is passed on unchanged, as before.

Fixes #13101


Claude-Session: https://claude.ai/code/session_01WpoeSoKYEdgQcWjEzTVKpT

Signed-off-by: Paul Faure <paul@faure.ca>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:50:55 +02:00
kobergj
76a9cb8042 docs: replace envvar introductionVersion 8.3.0 with 9.0.0 (#13106)
The next oCIS release is 9.0.0, so all envvars that were annotated with
the previously planned 8.3.0 introduction version need to be updated.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-09 10:20:09 +02:00
Roman Perekhod
9143307b70 fix: [ocisdev-1433] fix public share, add The grpc clients keepalive and more (#13020) (#13068)
* fix: the public share configuration and fixed graceful shutdown

* fix: [OCISDEV-1433] remove GRPC_MAX_CONNECTION_AGE

The setting closed healthy grpc connections on a timer so that clients would redo
their DNS lookup. It never helped against the failure it was reached for - a
connection whose peer stopped answering - because the age limit is enforced by
the server, the grace period was left at infinity so a request already in flight
was never ended, and any value without a unit suffix silently disabled it again.

Detecting a peer that stops answering is now the job of the grpc clients, which
ping the peer while a request is in flight. The servers here got the matching
enforcement policy so they accept those pings; the client side arrives with the
next reva bump.

* fix: Added the new variable OCDAV_DISABLE_PROPFIND_PUBLIC_LINK_RESOLUTION that disable the resolution of public link shares when answering PROPFIND requests.

* chore: bump reva

* fix: The keepalive added to grpc clinet

* chore: bump reva

* build(deps): bump go 1.26.8, grpc-go dependency

---------

(cherry picked from commit e86eb4d210)

For the 9.0 branch, the reva dependency was pointed at reva's main-branch
merge of PR #748 (commit 373f9509a, pseudo-version
v2.0.0-20261005091647-373f9509a363) instead of the 8.2-targeted
e0beaa380005, since the 8.2 merge predates the VaultMode/UploadSessionFilter.Orphaned
APIs already present on the 9.0 reva lineage.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

# Conflicts:
#	changelog/unreleased/security-bump-grpc.md
#	go.mod
#	go.sum
#	vendor/google.golang.org/grpc/server.go
#	vendor/google.golang.org/grpc/stream.go
#	vendor/google.golang.org/grpc/version.go
#	vendor/modules.txt
2026-10-06 17:21:46 +02:00
Michal Klos
dc33f20fee feat: [OCISDEV-1411] don't logout users on a transient IdP userinfo failure (#12999)
* test: [OCISDEV-1411] regression test for userinfo-timeout 401

* fix: [OCISDEV-1411] don't logout users on a transient IdP userinfo failure

* fix: [OCISDEV-1411] don't logout users on a transient IdP userinfo failure

* feat: review

* feat: review

* feat: review
2026-09-29 09:37:48 +02:00
Roman Perekhod
a19f8dac48 fix: [OCISDEV-1404] harden public link brute force protection (#12944)
The proxy public share authenticator set the brute force protection skip
marker on every authentication, including requests where the proxy is the
only authenticator. Failed password attempts on those requests were never
counted, so the rate limit for password protected public links was not
enforced.

The skip marker is now only set for requests that are re-authenticated
downstream, so failed attempts are reliably counted and the throttle is
applied consistently.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-15 11:23:23 +02:00
Roman Perekhod
d857d272d3 docs: [OCISDEV-1115] clarify nats store tls insecure options (#12941)
Document that the *_TLS_INSECURE options for the nats-js-kv store, cache and
service registry disable authentication of the NATS server and are for testing
only, so operators securing a multi-node deployment are not misled into
weakening the connection they just enabled TLS on.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-14 10:05:49 +00:00
Lukas Hirt
e21e19470b feat(app-store): update app store repository to use ownCloud Marketplace (#12793)
Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-08-13 21:46:59 +02:00
Michal Klos
d9bae04aee feat: [OCISDEV-1115] harden nats communication (#12777)
* feat: [OCISDEV-1115] harden nats communication

* feat: bump reva for tls-enabled stores
2026-08-13 09:56:24 +00:00
Juan Pablo Villafañez
597104629a fix: use specific gookit config instance instance of using global (#12769)
* fix: use specific gookit config instance instance of using global

Using the global instance was causing a panic when the service was
restarted. That panic won't happen now.

* chore: add changelog entry
2026-08-11 17:48:46 +02:00
Ward Pieters
4390b44b02 fix(oidc): respect (no) proxy env vars in OIDC HTTP client (#12703)
fix(oidc): respect HTTP(S)_PROXY and NO_PROXY env vars in OIDC HTTP client
2026-08-05 14:55:13 +02:00
Roman Perekhod
1a32e4d8c5 chore: [OCISDEV-1021] Add audience restriction for OIDC access tokens (#12634)
* chore: Add audience restriction for OIDC access tokens

* fix: add new envvar to added table

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix: add updated env_vars.yaml file

* chore: var name to plural. update config

---------

Signed-off-by: Martin Mattel <github@diemattels.at>
Co-authored-by: Martin Mattel <github@diemattels.at>
2026-07-30 15:22:36 +03:00
Martin
bfda167e31 docs: remove orphaned ocisstoreservice value (#12564) 2026-07-13 15:33:50 +00:00
Michal Klos
1d41c091a9 fix: [OCISDEV-886] harden group join (#12490)
* fix: harden group join

* fix: e2e keycloak

* feat: jp review
2026-07-09 10:21:56 +02:00
Juan Pablo Villafañez
60eee82d0d fix: auth-app will create the user home if needed (#12457)
* fix: auth-app will create the user home if needed

* fix: adjust tests

* chore: add changelog entry

* fix: test coverage
2026-07-07 17:24:13 +02:00
Roman Perekhod
6855942f49 Fix/ocisdev 884 (#12442)
* fix(proxy,graph): do not disable personal space on inconclusive permission check

When a user's role is (re-)assigned, both the proxy (on OIDC login) and the
graph appRoleAssignment handler check the Drives.Create permission to decide
whether to restore or disable the user's personal space. An indeterminate
permission result (transport error or a non-OK status other than
PERMISSION_DENIED) was treated as a denial, which disabled (trashed) the
personal space on a transient settings/gateway fault — with no automatic
re-enable. See OCISDEV-884.

Both call sites now fail closed: on an indeterminate result they leave the
personal space untouched, revert the just-persisted role assignment so the
user is not left in a half-applied state, and surface the error (the proxy
retries on the next login, the graph handler returns 500). Relies on the
matching reva utils.CheckPermission change that surfaces non-authoritative
statuses as an error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* rebased

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 13:22:08 +00:00
David Walter
4db7b89a44 fix(proxy): use events endpoint (not cluster id) for the readyz NATS check (#12421)
* fix(proxy): use events endpoint (not cluster id) for the readyz NATS check

The proxy readiness handler passed Events.Cluster (the cluster ID) to
NewNatsCheck, which forwards it to nats.Connect as an address. NATS then tried
to resolve the cluster ID as a host name and always failed, so /readyz reported
the proxy as not ready regardless of NATS reachability. Every other service
passes Events.Endpoint; the proxy now does too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>

* test: drop now-passing proxy readiness expected-failure

The proxy /readyz fix makes serviceAvailabilityCheck.feature:115 ("check default
services readiness (graph, idp, proxy)") pass, so remove it from the expected
failures. The auth-bearer health/readiness entries (:124, :135) remain, as they
are a separate part of #10661 not addressed here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>

---------

Signed-off-by: David Walter <david.walter@kiteworks.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 11:42:53 +02:00
David Walter
de180087fe fix(proxy): keep group memberships when the OIDC groups claim is absent (#12420)
SyncGroupMemberships reconciles a user's groups against the groups claim and
removes them from any group not present in it. When a token carried no groups
claim at all (e.g. issued for an OIDC client without a groups mapper, such as a
dedicated desktop-client registration), the parsed group set was empty and the
user was removed from ALL of their groups.

Skip the sync when the groups claim is absent or null; a present-but-empty claim
is still treated as a legitimate "no groups" and reconciled. This mirrors the
guard the role-assignment path already has for a missing roles claim.

Signed-off-by: David Walter <david.walter@kiteworks.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 11:42:02 +02:00
David Walter
bfd0c8a4ea fix(proxy): re-verify access token when cached userinfo has expired (#12414)
getClaims rejected a request with jwt.ErrTokenExpired whenever the cached
userinfo entry's expiry had passed, instead of re-verifying the access token.
The cached "exp" is not always the real token expiry: for opaque access tokens
extractExpiration falls back to the configured cache TTL. A still-valid token
could therefore be rejected merely because its cache entry aged out, producing
spurious logouts (most visible under frequent PROPFIND requests).

getClaims now treats an expired cache entry as a cache miss and falls through to
VerifyAccessToken/UserInfo re-verification. A genuinely expired or invalid token
is still rejected by that re-verification, so authentication is not weakened.

The test's mock now returns a fresh claims map per call, mirroring the real
client, so the suite is race-clean (getClaims caches asynchronously).

Signed-off-by: David Walter <david.walter@kiteworks.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 11:25:50 +02:00
David Walter
9296546be3 fix(proxy): guard against empty signing key store in presigned URL auth (#12418)
signatureIsValid indexed signingKey[0] without checking the slice length. When
the signing-key store returns an empty result without an error — which the
"noop" store does, and OCIS_CACHE_STORE=noop also switches the presigned-URL
signing-key store to noop — every signed-URL download panicked with
"index out of range [0] with length 0" (recovered per request as a 502), so all
signed-URL downloads failed.

Guard the index access and return a real authentication error. The previous
empty-value branch also returned a nil error, which would have accepted an empty
signing key; it now returns an error so the request is rejected.

Signed-off-by: David Walter <david.walter@kiteworks.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 11:23:54 +02:00
Juan Pablo Villafañez
4945eb6833 Autoprop (#12386)
* feat: metadata autopropagation

* feat: autoprop support for MFA / vault mode

* fix: replace some http clients with reva ones

* chore: required lib update

* fix: adjust unit tests and generate new mocks

* fix: apply autopropagation to all regular graph routes

* chore: updated reva dependency

* fix: return the right decorator for the thumbnails

* fix: remove autopropagation headers in the proxy
2026-06-19 10:43:41 +02:00
Martin
21128d705f fix: update docs relevant envvar placeholders for 8.1.0 (#12424) 2026-06-15 08:46:06 +02:00
Roman Perekhod
f110944ef2 fix: [OCISDEV-879] fix the config mask (#12397) 2026-06-12 10:21:59 +02:00
kobergj
69d0650994 fix(proxy): [OCISDEV-845] skip space reconciliation on signed URL requests (#12286)
The space management middleware removed users from all project spaces
when processing signed URL requests because no OIDC claims are present
in that auth context. Return early when claims are nil to prevent the
oscillating add/remove cycle.

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-22 09:45:07 +02:00
Roman Perekhod
d7a7cd9033 feat: [OCISDEV-720] fix public link (#12332) 2026-05-21 17:55:15 +02:00
Matteo
7d566c1ea2 feat: expose MFA session duration as configurable capability (#12335) 2026-05-21 15:32:26 +02:00
Roman Perekhod
39e3d33820 [full-ci] feat: ocisdev-533 graph (#12108)
* feat: Implemet the vault-storage

feat: Separate the storage-users and graph to handle

feat: move the space create cache

configurate the vault srorage Postprocessing

hide the assignment of the MountID to VaultStorageProviderID behind a flag to avoid the ID mismatch

configurate the proxy to create the vault home space

update the filter

Make the graph able to handle vault prefix. no extra service needed

apply the vault filter to sharedbyme and sharedwithme

added vault-storage docker

use squashed reva

fix the finishUpload event

restict webdav copy/move from the vault

feat: provide the mfa to webdav and grpc

feat: refactoring: provide the mfa to webdav and grpc

mfa collaboration

fix GetRootDriveChildren and more

fix: send the MFA header in HTTP clients from the collaboration service

provide the default storage user vault configuration

update create_home middleware

Update deployments/examples/ocis_full/vault-storage.yml

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

Update services/gateway/pkg/config/config.go

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

Update services/graph/pkg/config/config.go

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

Update services/graph/pkg/config/config.go

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

Update services/storage-users/pkg/config/config.go

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

Update services/proxy/pkg/config/config.go

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

Update services/storage-users/pkg/config/config.go

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

Update deployments/examples/ocis_full/vault-storage.yml

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

bump reva

deduplicate the requireMFA middeware on vault routes. fix AppendPlainToOpaque.

added the changlog and comments

* feat: add the vault mode search

* Update changelog/unreleased/enhancement-vault-storage.md

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

* update the readme. the reva vault storage provider configuration disabled by default

* feat: [OCISDEV-531] add vault capabilities to the OCS capabilities endpoint

* the port range allocated. the configuration updated.

---------

Co-authored-by: Martin <github@diemattels.at>
2026-05-15 16:53:05 +02:00
Michal Klos
234e665699 feat: [OCISDEV-670] add masterID for EK users (#12101)
* feat: add masterID for EK users

* Update deployments/examples/ocis_multi/README.md

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

* Update deployments/examples/ocis_multi/README.md

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

* review comments

---------

Co-authored-by: Martin <github@diemattels.at>
2026-05-06 16:15:32 +02:00
Roman Perekhod
57a09b14f1 feat: move the space create cache 2026-04-23 20:13:35 +02:00
Roman Perekhod
9ca2c016be Revert "fix(proxy): [OCISDEV-460] deduplicate CreateHome calls in middleware" 2026-03-18 10:58:53 +01:00
Paul Faure
5063c80536 fix(proxy): address review — introductionVersion and env var description
- Change introductionVersion from "8.0.0" to "Daledda" (codename)
- Clarify that the cache is a process-lifetime cache tracking which
  users have a personal space, not one of the general proxy caches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 13:44:33 -04:00
Paul Faure
224c0e6244 refactor(proxy): extract helpers to reduce ServeHTTP cognitive complexity
Extract homeKnown() and createHome() from ServeHTTP to bring
cognitive complexity under the SonarCloud limit of 15.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 11:20:18 -04:00
Paul Faure
e227983a9f feat(proxy): add PROXY_CREATEHOME_CACHE_DISABLED env var
Allow operators to disable the in-memory CreateHome cache via
PROXY_CREATEHOME_CACHE_DISABLED as a fallback if the cache causes
unexpected behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 10:50:36 -04:00
Paul Faure
a087a99da0 fix: address SonarCloud linter issues in CreateHome middleware
- Use canonical header casing "X-Access-Token" (canonicalheader)
- Return true instead of nil on success to avoid nilnil (nilnil)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 00:50:05 -04:00
Paul Faure
31ce8a68a7 fix(proxy): deduplicate CreateHome calls with singleflight and sync.Map
The CreateHome middleware fired a gRPC CreateHome request on every
authenticated HTTP request. On first login the browser sends ~11
parallel requests, each triggering a redundant call. Use singleflight
to collapse concurrent calls for the same user and sync.Map to cache
successful results so subsequent requests skip the gRPC call entirely.

Fixes: #12068

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 23:34:10 -04:00
Paul Faure
ece1043ca2 fix(proxy): add data: to font-src CSP to allow bundled KaTeX fonts
The bundled Web UI CSS (from owncloud/web) inlines the KaTeX_Size3 font
as a base64 data:font/woff2 URI. The default CSP sets font-src to 'self'
only, which blocks these data URIs and produces a console error on every
page load:

  Loading the font 'data:font/woff2;base64,...' violates the following
  Content Security Policy directive: "font-src 'self'".

Add 'data:' to font-src, matching the existing pattern where img-src
already permits data: URIs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:08:52 +01:00
Michal Klos
983dc5f7b5 fix: X-XSS-Protection header (#12092) 2026-03-10 09:15:35 +01:00
Martin Mattel
31c89b5eaa [docs-only] Some doc related updates 2026-02-16 16:04:42 +01:00
Roman Perekhod
da5e63dfe3 feat: bump go to 1.25
feat: bump mockery to v2.53.5

feat: bump govulncheck

feat: bump bingo to v0.10.0

force go-1.25.7

update thumbnail images for test

bump reva to latest
2026-02-10 16:27:52 +01:00
Juan Pablo Villafáñez
d3f328320a feat: propagate GRPC metadata across go-micro services
The server handlers for go-micro reuse the data from reva so the
propagation also works with reva services.
Both reva and go-micro services will propagate the data correctly.
2026-01-23 12:05:18 +01:00
Juan Pablo Villafáñez
2b344bffe6 feat: implement brute force protection for public shares 2026-01-23 12:05:18 +01:00
Julian Koberg
563bbf28c0 fix: fix group creation in multi-instance ocis
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-01-22 18:00:04 +01:00
Julian Koberg
2ca6372668 feat: move multi-instance-config to deployment example
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-01-16 12:01:59 +01:00
Julian Koberg
ddc6cb0651 feat: cross instance sharing
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-01-16 12:01:33 +01:00
Martin Mattel
68c58c62d9 [docs-only] Change curie to semver in envvars plus script update 2026-01-13 10:11:17 +01:00
Michal Klos
1d0559866e fix: Strict-Transport-Security via proxy 2026-01-05 15:15:48 +01:00
Julian Koberg
ace084dc10 feat: clean up multi-instance-ocis
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2025-12-15 10:46:51 +01:00
Julian Koberg
b5a765124b feat: multi-instance-ocis
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2025-12-15 10:46:51 +01:00