Commit Graph

49 Commits

Author SHA1 Message Date
David Christofas
924c2ca346 add missing comments 2023-03-06 19:01:16 +01:00
David Christofas
63fa35fa50 reduce duplication in configuration code 2023-03-06 16:52:44 +01:00
David Christofas
b8470d567d add new permission 'publiclink.create' and assign it to the 'Admin', 'SpaceAdmin' and 'User' roles 2023-03-01 11:53:39 +01:00
Michael Barz
7f6e52c39b load bundles from JSON 2023-02-21 21:25:33 +01:00
Willy Kloucek
5a500ea17e don't init bundles to nil 2023-02-20 12:50:24 +01:00
Willy Kloucek
a2422e8b9d fix settings service bunldes config merge problems 2023-02-20 08:10:22 +01:00
Michael Barz
794f6cd07c add constraints to permissions listing (#5594) 2023-02-17 13:45:47 +01:00
Michael Barz
eb2347e1db Merge pull request #5589 from owncloud/settings-roles
make the default settings bundles part of the config
2023-02-16 16:05:29 +01:00
Michael Barz
29501b2cfe make the default settings bundles part of the config 2023-02-16 13:24:31 +01:00
Jörn Friedrich Dreyer
92923f6801 Add http endpoint to list permissions (#5571)
* Add http endpoint to list permissions

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* extract handler registration

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use generated protobuf

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update permissions mock in graph service

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add unit test

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* return correct userid

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* assert error message type in tests

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-02-15 14:24:19 +01:00
David Christofas
7c17ddb0b0 add a permission check to the logo upload 2023-02-13 13:48:39 +01:00
mmattel
bc6241a3dd Improve the description of the OCIS_ADMIN_USER_ID envvar 2023-02-09 12:50:01 +01:00
Benedikt Kulmann
8c033e1936 change: remove the settings ui
ownCloud Web recently transitioned to Vue3. The settings ui is still
written in Vue2. Since it's pretty much unused we won't take the efforts
of upgrading it to Vue3.
2023-02-03 10:27:05 +01:00
kobergj
b7a5e1c29e use correct permission (#5458)
Signed-off-by: jkoberg <jkoberg@owncloud.com>

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-26 11:16:43 +01:00
jkoberg
b2067575a9 bump reva
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-25 15:39:41 +01:00
jkoberg
1a69388e14 add new permissions
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-25 15:25:54 +01:00
Jörn Friedrich Dreyer
32cc9beb0b walk and log chi routes, ocs cleanup (#5428)
* walk and log chi routes, ocs cleanup

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make linter happy

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-01-23 12:30:34 +01:00
Jörn Friedrich Dreyer
078698fdf4 graph: add appRoleAssignments and minimal application resource (#5318)
* bump libregraph-go lib

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add appRoleAssignment stubs

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add get application stub

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fetch appRoles for application from settings service

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial list appRoleAssignments implementation

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial create appRoleAssignment implementation, extract assignmentToAppRoleAssignment, configurable app id and displayname

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial delete appRoleAssignment implementation, changed error handling and logging

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial expand appRoleAssignment on users

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* test user expand appRoleAssignment

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* test appRoleAssignment

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix education test by actually using the mocked roleManager

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* test getapplication

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* list assignments

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use common not exists error handling

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* default to just 'ownCloud Infinite Scale' as application name

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix store_test

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* roll application uuid on init

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix tests

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* extract method

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Apply suggestions from code review

Co-authored-by: Michael Barz <mbarz@owncloud.com>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-01-12 16:09:34 +01:00
David Christofas
efe1fc52e0 fix nilerr bugs 2022-12-21 14:45:50 +01:00
Jörn Friedrich Dreyer
53d15d329e remove deprecated use of ioutil (#5205)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:44:53 +01:00
Ralf Haferkamp
07a78287a7 Allow initial self-assignemnt of UserRole
When using an external user management we need to allow users to self-assign
the default role. This adds an explicit check for that to the settings service.
This also means we no longer need to fiddle with the account id in the proxy
upon first login.

Fixes: #5045
2022-11-16 16:23:32 +01:00
Jörn Friedrich Dreyer
7443a9a225 Make permission and role ids unique (#5051)
* make permission ids unique

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* deduplicate roleids after listing permissions

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-11-15 16:51:49 +01:00
Ralf Haferkamp
4971330477 Remove no longer needed bootstrap code (#5057)
This we moved the settings service to the metadata storage with its
own gateway and permissions service, we no longer need the hardcoded
initial replies in order to bootstrap the role assignments.

This fixes a panic in the settings service when the first request to
the service is a read request on anything else but an existing role or
assignment.
2022-11-15 16:51:10 +01:00
David Christofas
3125459415 [full-ci]fallback to stored roles (#4890)
* fallback to stored roles

If there are no roles in the current context load the user's roles from the storage.

* some code clean up
2022-11-03 13:25:21 +01:00
Ralf Haferkamp
b24d126b30 Introduce TLS Settings for go-micro based http services
TLS for the services can be configure by setting the "OCIS_HTTP_TLS_ENABLED",
"OCIS_HTTP_TLS_CERTIFICATE" and "OCIS_HTTP_TLS_KEY" environment variables.
Currently the ocis proxy is this only service that directly accesses backend
services. It determines whether to use TLS or not by looking a the new registry
metadata "use_tls". As specific CA Cert for certificate verification
can be set with the "PROXY_HTTPS_CACERT" environment variable.
2022-11-03 11:58:53 +01:00
Ralf Haferkamp
ee974afebf [full-ci] Introduce TLS Settings for go-micro based grpc services and clients (#4901)
* Introduce TLS Settings for go-micro based grpc services and clients

TLS for the services can be configure by setting the OCIS_MICRO_GRPC_TLS_ENABLED"
"OCIS_MICRO_GRPC_TLS_CERTIFICATE" and "OCIS_MICRO_GRPC_TLS_KEY"
enviroment variables.

TLS for the clients can configured by setting the "OCIS_MICRO_GRPC_CLIENT_TLS_MODE"
and "OCIS_MICRO_GRPC_CLIENT_TLS_CACERT" variables.

By default TLS is disabled.

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

* Unify TLS configuration for all grpc services

All grpc service (whether they're based on reva) or go-micro use the
same set of config vars now.

TLS for the services can be configure by setting the OCIS_GRPC_TLS_ENABLED,
OCIS_GRPC_TLS_CERTIFICATE and OCIS_GRPC_TLS_KEY enviroment variables.

TLS for the clients can configured by setting the OCIS_GRPC_CLIENT_TLS_MODE
and OCIS_MICRO_GRPC_CLIENT_TLS_CACERT variables.

There are no individual per service config vars currently. If really
needed, per service tls configurations can be specified via config file.

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

Co-authored-by: Martin <github@diemattels.at>
2022-11-03 10:17:08 +01:00
David Christofas
73e50ae84b prohibit users form setting and listing other user's values 2022-10-25 14:13:47 +02:00
Willy Kloucek
ca5affd9f3 fix comment 2022-10-19 10:25:54 +02:00
Willy Kloucek
ad0924d874 move the language-read-write permission's id and name into a const 2022-10-19 09:00:33 +02:00
mmattel
6edb44fa83 Improving the description for several environemt variables 2022-10-13 12:07:46 +02:00
David Christofas
1b0ec2c9d5 update module path of ttlcache (#4738)
The GitHub repository of ttlcache has been moved from ReneKroon to jellydator.
2022-10-04 17:33:53 +02:00
Jörn Friedrich Dreyer
e9e9947f88 bring back CORS env vars (#4723)
* bring back CORS env vars

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update CORS descriptions

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* align writing of 'A comma-separated ...'

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix some desc quotes

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Apply suggestions from code review

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

* Apply more suggestions from code review

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

* Apply final suggestions from code review

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Martin <github@diemattels.at>
2022-10-04 16:56:05 +02:00
Ralf Haferkamp
87eaf72020 Forbid to edit/remove own role assignements
And admin user is no longer allowed to edit/remove its own assignments.
This to prevent admins from locking themselves out.

Fixes: #3713
2022-09-23 09:13:46 +02:00
Ralf Haferkamp
e5543d4465 Add new "delete-all-spaces" permission
This is assigned to the Admin role by default and allows to cleanup
orphaned spaces (e.g. where the owner as been deleted)

Fixes: #4196
2022-09-07 18:21:26 +02:00
Christian Richter
6a9d4efef6 add delete home space permission to admin role
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-08-30 11:09:05 +02:00
Willy Kloucek
9f2be9f4f9 remove Log prefix from configlog functions 2022-08-22 08:08:18 +02:00
Willy Kloucek
e58eaabdeb move config parse error logging into function to ensure new lines and don't parse config for help 2022-08-18 15:27:28 +02:00
Willy Kloucek
60689c9c1a improve unsupervised description 2022-08-18 10:59:35 +02:00
Willy Kloucek
6154466bbc rename extensions to services (leftover occurences) 2022-08-17 15:36:52 +02:00
Willy Kloucek
bee33638ef remove Body from endpoint, see 3381a9f3db 2022-07-25 12:16:37 +02:00
Ralf Haferkamp
b4a90b132b Demote demo user "moss" from admin to space-admin
Fixes: #3625
2022-07-22 16:47:04 +02:00
Ralf Haferkamp
946f3e8feb Remove unused BindEnv code
We dropped this in favour of envdecode a while ago.
2022-07-14 16:34:25 +02:00
mmattel
246377b35b Env variable text fixes 2022-07-07 19:53:27 +05:45
Ralf Haferkamp
4a09d8a948 Remove redundant setting of cli.HelpFlag
The help flag is configured automatically by default already. We don't
need to redo that for every single service.

This also addresses one of the finding of "go race" (#4088)
2022-07-05 14:59:06 +02:00
Willy Kloucek
4d60867cd6 improve *_HTTP_ROOT descriptions 2022-06-29 09:44:12 +02:00
Martin
a85e168b2c Update services/settings/pkg/config/config.go 2022-06-29 08:16:58 +02:00
Willy Kloucek
8f3b0c50cd Merge branch 'master' into config-doc-descriptions 2022-06-28 13:03:19 +02:00
Christian Richter
f8f1320501 refactor extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00
Christian Richter
78064e6bab rename folder extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00