1
0
mirror of https://github.com/owncloud/ocis.git synced 2026-10-25 11:39:24 +03:00
Commit Graph

115 Commits

Author SHA1 Message Date
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
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
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
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
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
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
9ca2c016be Revert "fix(proxy): [OCISDEV-460] deduplicate CreateHome calls in middleware" 2026-03-18 10:58:53 +01: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
Michal Klos
1d0559866e fix: Strict-Transport-Security via proxy 2026-01-05 15:15:48 +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
Julian Koberg
5052c65526 feat: use middleware for mfa checks
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2025-09-17 12:42:28 +02:00
Juan Pablo Villafáñez
ed95f21269 feat: add a way to check for specific OIDC claims
For now, only some hardcoded paths will check the claims (if there is a
checker configured). If the check fails for those paths, the
authentication will fail and it will return a 401 error
2025-09-17 12:42:28 +02:00
Michal Klos
70dd34eb84 fix: [ocisdev-266] code scan #27 2025-09-04 15:14:19 +02:00
Juan Pablo Villafáñez
8b8c7f02bf fix: replace hardcoded services names for variables 2025-08-05 10:00:24 +02:00
Juan Pablo Villafáñez
01a9713b52 feat: use otelhttp for tracing, fix tracing in proxy
otelchi and other custom solutions have been replaced with otelhttp to
trace HTTP requests; new middleware is provided to be used across the
platform.

The proxy service will use a custom HTTP client to forward the headers
needed for telemetry automatically (also based on otelhttp)
2025-07-31 11:06:33 +02:00
Roman Perekhod
4fc4822696 collect the errors from group runner 2025-06-13 16:14:41 +02:00
Roman Perekhod
d31ca63af1 set default timeouts and clean up 2025-05-28 12:21:50 +02:00
Roman Perekhod
e1325ca40f to separate controll ower the http and grpc driven services 2025-05-28 12:21:50 +02:00
Juan Pablo Villafáñez
399a24e9b6 feat: use runners to startup the services 2025-05-28 12:21:49 +02:00
Julian Koberg
02072c37c4 feat(proxy): claim managed spaces
Signed-off-by: Julian Koberg <jkoberg@MBP-Julian-Koberg.local>
2025-04-30 17:20:23 +02:00
Juan Pablo Villafáñez
f4644a6225 chore: change constant name to camelcase 2025-04-01 14:49:08 +02:00
Juan Pablo Villafáñez
62f5228ca4 feat: use names for connections to the nats event bus 2025-04-01 14:49:07 +02:00
Roman Perekhod
bb9d09b627 Allow the app-auth announce www-authenticate: basic header. 2025-03-12 09:18:38 +01: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
Juan Pablo Villafáñez
69864b8ab9 feat: improve logs when a context is canceled in the proxy 2024-11-19 11:25:40 +01:00
Jörn Friedrich Dreyer
dde999d5c2 align shutdown logging
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-28 14:47:11 +01:00
jkoberg
c80254c4f1 feat(ocis): remove ocm store
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-10-15 17:24:51 +02:00
Christian Richter
0094d30378 code cleanup & refactoring
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-14 08:39:42 +02:00
Ralf Haferkamp
cb8934081f proxy(oidc): Emit a UserSignedIn event on new session
Every time the OIDC middleware sees a new access token (i.e when it needs
to update the userinfo cache) we consider that as a new login. In this case
the middleware add a new flag to the context, which is then used by the
accountresolver middleware to publish a UserSignedIn event.
The event needs to be sent by the accountresolver middleware, because only
at that point we know the user id of the user that just logged in.

(It would probably makes sense to merge the auth and account middleware into a
single component to avoid passing flags around via context)
2024-09-17 16:02:47 +02:00
Christian Richter
84fed8997e make sonarcloud happy
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-08-22 10:27:32 +02:00
Christian Richter
3cdc638201 remove code for store service
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-08-22 09:28:02 +02:00
Jörn Friedrich Dreyer
4c6551501e use less selectors
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-08-06 12:55:42 +02:00
Jörn Friedrich Dreyer
7999e2969b do not force exit to let all services shutdown gracefully
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-24 14:02:52 +02:00
Jörn Friedrich Dreyer
9d1515e8fc rely on context from app
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-24 14:02:11 +02:00
jkoberg
83e6ba7d09 fix(proxy): fix pipeline
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-07-23 08:58:08 +02:00
jkoberg
11103a4220 feat(auth-app): make service optional plus docu
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-07-23 08:58:07 +02:00
jkoberg
3b3d30159d fix(proxy): fix build after rebase
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-07-23 08:58:07 +02:00
Thomas Müller
4fa7ea0b20 feat: add cli command to generate app token for user 2024-07-23 08:58:07 +02:00
Thomas Müller
43403edfb8 feat: reva app auth 2024-07-23 08:58:07 +02:00
Roman Perekhod
eac5eaea8f Add the backchannel logout event 2024-06-25 12:13:24 +02:00
Roman Perekhod
c7281599d4 replacement for TokenInfo endpoint 2024-05-28 09:29:08 +02:00
Ralf Haferkamp
741dce501b enhancement(autoprovision): Allow to configure which claims to use for auto-provisioning user accounts
When auto-provisioning user accounts we used a fixed mapping for claims
for the userinfo response to user attributes. This change introduces
configuration options to defined which claims should be user for the
username, display name and email address of the auto-provisioned
accounts.

This also removes the automatic fallback to use the 'mail' claim as the
username when the 'preferred_username' claim does not exist.

Fixes: #8635
2024-04-30 17:09:19 +02:00
Thomas Müller
bdbba929d0 feat: add CSP and other security related headers in the oCIS proxy service (#8777)
* feat: add CSP and other security related headers in the oCIS proxy service

* fix: consolidate security related headers - drop middleware.Secure

* fix: use github.com/DeepDiver1975/secure

* fix: acceptance tests

* feat: support env var replacements in csp.yaml
2024-04-26 09:10:35 +02:00
Jörn Friedrich Dreyer
f8f864e566 always initialize http handler
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-04-24 10:39:12 +02:00
Christian Richter
29549fade7 kill oidc well known middleware and move it to static route
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-03-18 16:56:10 +01:00
Christian Richter
1323a554bc move static routes to seperate package
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-03-18 16:56:10 +01:00
Jörn Friedrich Dreyer
26136f8f81 drop store service in favor of a micro store implementation (#8419)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-26 16:08:03 +01:00