Commit Graph

344 Commits

Author SHA1 Message Date
Ralf Haferkamp 4bdb3bf70f proxy(sign_url_auth): Allow to verify server signed URLs
With the ocdav service being able to provided signed download URLs we
need the proxy to be able to verify the signatures.
This should also be a first step towards phasing out the weird ocs based
client side signed urls.

Related Tickets: #1104
2025-07-17 12:01:59 +02:00
Ralf Haferkamp 601bb4c955 cleanup(proxy): Remove misleading comment
The signedurl middleware is already adding the user to the context.
2025-07-17 12:01:59 +02:00
Anja Barz d52329708d Update config.go (#1183)
Fix typo
2025-07-11 11:50:43 +02:00
06kellyjac 2a3a20693a build: Modify mockery config to work with v3
Maintaining the positioning of the files from v2 to reduce cognitive
load.
Indentation of yaml files now matches `.editorconfig`.
All mock files regenerated.
Added empty `{}` following convention from `mockery init` etc.
Removed directory specification where it would already match.
2025-06-19 16:25:39 +01:00
Ralf Haferkamp 8dd8943854 fix(proxy): Prevent panic when autoprovsioning user
After autoprovisioning a user, we need to get a reva token via
`auth-machine`. If that fails the code would panic because the logger
tried to access the `user` object returned from the GetUserByClaims
call. Which is `nil`in case failure.

Fixes #936
2025-06-12 11:54:23 +02:00
Ralf Haferkamp 96684df32d Adjust to new tablewriter release 2025-05-19 19:26:38 +02:00
André Duffeck cbac5f1555 Switch to a different msgpack lib
The current one has a problem handling time.Time{} structs
2025-05-16 10:24:43 +02:00
Ralf Haferkamp 3dc9c0cb9a Switch to opencloud-eu fork of libre-graph-api-go 2025-05-15 14:11:35 +02:00
Ralf Haferkamp dcf78f7f3d proxy(router): Allow to set some outgoing headers
This introduces the "additional_headers", "remote_user_header" and
"skip_x_access_token" config keys to allow configuring routes to
external services that require addtional headers to be set.

"remote_user_header": defines the name of a Header that will carry the
userid of the authenticated user on the outgoing request.

"additional_headers": defines a list of header names and values that will
be added to outgoing requests on matching routes.

"skip_x_access_token": when set to true the reva access token will not
be added to the outgoing request.

Needed for #206
2025-04-30 10:17:58 +02:00
Ralf Haferkamp eb1ee57db9 fix: reset 'method' loop
The method var needs to be reset to "" when handling a route that is not
method specific.
2025-04-30 10:17:58 +02:00
Ralf Haferkamp 102e92fd73 appauth: Add token and user (with roles) to context
When successfully authenticating a user via apptoken, resolve the user's
roles and add the user and the token returned by the auth service to the
request context. Rely on the account_resolve middleware to add the reva
token to the outgoing request as the other auth middlewares do.
2025-04-30 10:17:58 +02:00
Ralf Haferkamp 95f28baa52 Use constant instead of repeating the "x-access-token" string over and over 2025-04-30 10:17:58 +02:00
Jörn Friedrich Dreyer 3c38a3e3ed fix mockery warnings
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-04-29 11:01:17 +02:00
Ralf Haferkamp cda94ce584 Start auth-app service by default
Co-Authored-By: André Duffeck <a.duffeck@opencloud.eu>
2025-03-20 15:09:47 +01:00
Michael Barz 22fb783724 test: extract go bin 2025-03-13 14:04:14 +01:00
Ralf Haferkamp 2678d0bb89 Bump mockery to 2.53.0
Should fix build on go1.24. Also fix ci-go-generate step in multiarch
Dockerfile.

Closes: #289
2025-03-03 16:02:59 +01:00
Ralf Haferkamp 8e1f68f315 Reset 'introductionVersion" struct tag to 1.0.0 2025-02-24 11:40:33 +01:00
Jörn Friedrich Dreyer 4afc70c549 'default' routing policy
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-02-12 14:25:06 +01:00
Ralf Haferkamp 0716b40fa0 Adjust LDAP Schema for new name 2025-01-29 11:58:57 +01:00
Ralf Haferkamp 59c06b374f Merge pull request #140 from opencloud-eu/renameDemoUsers
Rename demo users
2025-01-28 18:44:57 +01:00
Klaas Freitag 669ad7c769 Rename demo users
See https://github.com/opencloud-eu/internal/issues/42
2025-01-28 18:03:12 +01:00
Jörn Friedrich Dreyer a5eaf40a9c update docs
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-28 17:27:50 +01:00
André Duffeck f106e848bf Some more naming fixes 2025-01-21 15:49:40 +01:00
André Duffeck e8d35e1280 Use the opencloud reva from now on 2025-01-21 11:16:38 +01:00
Ralf Haferkamp e07f0154bb Rebrand pkg 2025-01-20 10:59:08 +01:00
Florian Schade 8824393ec7 Merge pull request #57 from opencloud-eu/proxy
proxy
2025-01-17 11:30:52 +01:00
Jörn Friedrich Dreyer 747b2879d7 proxy
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-16 17:31:51 +01:00
Jörn Friedrich Dreyer 243ffe81c7 nats cluster name
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-16 16:14:22 +01:00
Ralf Haferkamp 213e9663a9 Rename go-micro services 2025-01-16 09:45:46 +01:00
André Duffeck 8c8cdd9310 Adapt protobuf naming 2025-01-15 11:04:32 +01:00
Jörn Friedrich Dreyer d6997b01cf Merge pull request #20 from opencloud-eu/metrics-logs-and-supervisor
metrics, log and supervisor
2025-01-14 17:27:14 +01:00
Jörn Friedrich Dreyer 04099bc9a7 proxy tests
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-14 17:15:39 +01:00
Jörn Friedrich Dreyer 318ca21645 metrics, log and supervisor
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-14 16:09:54 +01:00
Jörn Friedrich Dreyer 56f57149ad the OpenCloud services
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-14 12:50:23 +01:00
Jörn Friedrich Dreyer 5aa5ab843a ociscfg -> occfg
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-14 12:44:00 +01:00
Jörn Friedrich Dreyer b07b5a1149 use plain pkg module
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:42:19 +01:00
Jörn Friedrich Dreyer 259cbc2e56 Merge pull request #8 from opencloud-eu/renaming-mockery
adjust mockery and protogen configs for new name
2025-01-13 16:31:35 +01:00
Jörn Friedrich Dreyer a46fd132bd use OC_ env prefix
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:11:11 +01:00
Ralf Haferkamp 01cde87af0 Adjust mockery configs for new name 2025-01-13 15:05:38 +01:00
Jörn Friedrich Dreyer 8e028f17e9 change module name
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 09:58:18 +01:00
André Duffeck ccdd08b152 Pass the initialized logger to ReverseProxy for error logging 2024-12-11 10:24:00 +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
Roman Perekhod 3a060331f7 fixed an idp guest role default assignment 2024-11-07 17:57:01 +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 42f18ca500 docs(ocis): pin NEXT version
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-10-23 14:35:20 +02:00
Jörn Friedrich Dreyer 7fd8284daf mark header to not show up as a potential password leak G101
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-22 10:57:01 +02:00
Roman Perekhod c16a2ea2cf checks added 2024-10-17 19:03:14 +02:00
Florian Schade 66ff86bd35 enhancement: simplify ready and health check handler usage 2024-10-16 20:26:00 +02: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 535df48b54 add http checks to proxy & settings
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-15 13:54:47 +02:00