Commit Graph

1922 Commits

Author SHA1 Message Date
Ralf Haferkamp
7e6b690ccf proxy: update README with notes about role assignment (#5878) 2023-03-20 21:03:41 +01:00
Jörn Friedrich Dreyer
474c4b848d upgrade to go1.20 and auto set go mem limit (#5732)
* upgrade to go1.19 and set go mem limit

* create ocis-pkg memlimit package

* use std automemlimit import

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

* import automemlimit in every ocis service, drop ocis-pkg/memlimit package

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

* bump go to 1.20

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

* drop unused config options and env vars

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

* update all version numbers, add doc

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

* fix lint

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

* update bingo and mockery

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

* bump golangci-lint

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

* fix selector test

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

* Update changelog/unreleased/enhancement-memlimit.md

Co-authored-by: kobergj <juliankoberg@googlemail.com>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Willy Kloucek <wkloucek@owncloud.com>
Co-authored-by: kobergj <juliankoberg@googlemail.com>
2023-03-20 17:22:02 +01:00
jkoberg
8d3fac48fd do not inform user about her own action
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-20 15:29:24 +01:00
Ralf Haferkamp
98b4a6a23a Address some linter warnings
Response bodies need to be closed
2023-03-20 15:12:09 +01:00
Jörn Friedrich Dreyer
7f8e54b1c2 fix link 2023-03-20 15:12:09 +01:00
Ralf Haferkamp
1287bbc10d proxy: Cache the role Mapping for some time
Avoid torturing the settings service with "ListRoles" request for
every incoming request to the proxy.
The role Mapping is refreshed if cached data is older than 5 minutes.
2023-03-20 15:12:09 +01:00
Ralf Haferkamp
96ed144745 proxy: Add some missing doc strings 2023-03-20 15:12:09 +01:00
Ralf Haferkamp
a448c75c75 Extract role assignments from claims
Add a UserRoleAssigner implementation that extract role names from the
users' claims and creates role assignments in the settings service based
on a configured mapping of claim values to ocis role names.

Closes: #5669
2023-03-20 15:12:09 +01:00
Ralf Haferkamp
d57d52b33d proxy: Add an interface for user role assignment
This moves the lookup and the creation of the users' role assignemt out
of the user backend into its own interface. This makes the user backend
a bit simpler and allows to provide different implemenation for the user
role assignment more easily.
2023-03-20 15:12:09 +01:00
Ralf Haferkamp
490a835a3a proxy: Move CS3 User backend options to "functional" options
This will make it easier to add/remove options to the backend in the
future.
2023-03-20 15:12:09 +01:00
Ralf Haferkamp
88e8bb1b72 account_resolver: Handle user roles separately from user lookup
This removes the "withRoles" flag from the GetUserByClaims lookup and move the
functionality into a separate method. This should make the code a bit more readable
in preparation for maintaining the RoleAssignments from OIDC claims.
2023-03-20 15:12:09 +01:00
Ralf Haferkamp
f5cfa7e126 proxy: Move to mockery for generating mocks
To align with what we're using everywhere else.
2023-03-20 15:12:09 +01:00
ownClouders
144394993b [tx] updated from transifex 2023-03-19 00:05:05 +00:00
ownClouders
c5ec78363f [tx] updated from transifex 2023-03-18 00:12:12 +00:00
kobergj
3395968953 chore: bump web to v7.0.0-rc22 (#5869)
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-17 18:50:08 +01:00
kobergj
9750dfaff9 use master version of gotext package (#5868)
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-17 16:03:28 +01:00
jkoberg
a503ace11f don't check quota permission in graph
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-17 12:51:28 +01:00
jkoberg
cdddd16c0a add permission to change space quota
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-17 12:51:26 +01:00
Daniel Swärd
c765e904df Refactor user update methods to be a bit nicer. 2023-03-17 11:03:38 +01:00
Daniel Swärd
525638588d graph: Fix so that accountEnabled updates work for educationUser. 2023-03-17 10:16:39 +01:00
ownClouders
5533a7382e [tx] updated from transifex 2023-03-17 00:43:05 +00:00
Benedikt Kulmann
d409effa57 [full-ci] chore: bump web to v7.0.0-rc.21 (#5849)
* chore: bump web to v7.0.0-rc.21

* Update .drone.env

* Update .drone.env

fixing move copyMove.feature test

---------

Co-authored-by: Viktor Scharf <scharf.vi@gmail.com>
2023-03-16 19:04:07 +01:00
mmattel
23ee8615c6 [docs-only] Adds missing services and fixes content for owncloud.dev 2023-03-16 15:03:29 +01:00
Michael Barz
b31126de90 Merge pull request #5848 from owncloud/update-reva
[full-ci] add read_write_delete key to public link pw enforcement capabilites
2023-03-16 00:20:29 +01:00
ownClouders
25a6693bdf [tx] updated from transifex 2023-03-15 23:03:14 +00:00
Michael Barz
8332244383 add read_write_delete key to public link pw enforcement capabilites 2023-03-15 23:11:03 +01:00
Ralf Haferkamp
8b704085ce Allow ADMIN_USER_ID being empty (#5842)
For certain setups we don't need the ADMIN_USER_ID to be set. It is
mainly needed for bootstrapping the internal idm and the initial role
assignment.  If roles are assigned by other means (e.g. OIDC claims
in the future) we don't need it.

This makes the ADMIN_USER_ID optional, also if ADMIN_USER_ID is unset
we don't need to configure a password for the admin user. We will still
generated the admin_id and password when running 'ocis init', but it is
ok to run manual setups without those settings.
2023-03-15 16:15:18 +01:00
Ralf Haferkamp
81c0f21f78 graph: Allow to disable the default role assignment on user creation
Introduces a switch ('GRAPH_ASSIGN_DEFAULT_USER_ROLE') to allow to disable the assignment of the default role "User" to newly created users.
This will be used for setups where the role-assignments are populated either manually or during first login (e.g. from OIDC claims)
2023-03-15 15:42:57 +01:00
Ralf Haferkamp
b4b0f7abe7 graph: Skip default role assignment for education/users
For the education/users endpoints the role assignment does not
need to happen when creating a new user.
2023-03-15 15:42:57 +01:00
Daniel Swärd
6327edf574 graph: Change so that educationUsers can be created without email. 2023-03-15 14:43:22 +01:00
Michael Barz
a24456fb6a Merge pull request #5835 from owncloud/fix-l10n
[tests-only] raise percent setting and remove empty .po files
2023-03-15 13:12:59 +01:00
Daniel Swärd
6f7bd454b2 Fix so that userType is not returned if not available. 2023-03-15 12:05:29 +01:00
Daniel Swärd
b12b2d2bac Updating env variable description for userType attribute. 2023-03-15 12:05:29 +01:00
Daniel Swärd
23ba180e8a graph: Use userType property to distinguish between Member and Guest accounts
Fixes 5603

- Calling POST /graph/v1.0/users with userType not set will create a user as "Member"
- Calling POST /graph/v1.0/users with userType set as "Member" or "Guest" will create a user as "Member" or "Guest"
- Calling POST /graph/v1.0/users with userType set as anything but "Member" or "Guest" returns error
- Calling POST /graph/v1.0/education/users with userType not set will create a user as "Member"
- Calling POST /graph/v1.0/education/users with userType set as "Member" will create a user as "Member" and primary role as parameter specifies
- Calling POST /graph/v1.0/education/users with userType set as "Guest" will create a user as "Guest" and primary role as parameter specifies
- Calling POST /graph/v1.0/education/users with userType not set as anything but "Member" or "Guest" returns error
- Calling PATCH on /users or /education/users will update attribute in the same way as for POST
2023-03-15 12:05:29 +01:00
Michael Barz
afddd4273c raise percent setting and remove empty .po files 2023-03-15 12:03:41 +01:00
ownClouders
71f132ba35 [tx] updated from transifex 2023-03-15 09:24:06 +00:00
ownClouders
7b133b26cc [tx] updated from transifex 2023-03-15 09:05:16 +00:00
Michael Barz
e094796ec7 fix transifex resource name 2023-03-15 10:00:02 +01:00
Michael Barz
f45b3e07e7 fix l10n 2023-03-15 09:47:10 +01:00
Martin
872f72b3c7 Merge pull request #5827 from owncloud/fix_envvar_description
[docs-only] Syncing one frontend envvar description from backport
2023-03-14 17:23:14 +01:00
David Christofas
5ddf7334c8 Merge pull request #5826 from rhafer/issue/3432
Avoid repeated default role assignment
2023-03-14 16:56:19 +01:00
mmattel
dd372203d3 [docs-only] Syncing one frontend envvar description from backport 2023-03-14 16:33:24 +01:00
Ralf Haferkamp
46acc8f1ee Fix default assigments for demo and admin users
When using metadata backend the default role assignments for the demo users
where create independed of whether the demo users are were actually requested
to be created. This also fixes the name of the env var for enabling the demo
users. This was missed when moving from the accounts service to graph/idm for
user management.
2023-03-14 16:08:37 +01:00
Ralf Haferkamp
dbe40bd7c7 Avoid repeated default role assignments
When using the metadata storage (the current default) the default role
assignments were recreated at every start of the settings service. Leading to
duplicated role assignments

Fixes: #3432
2023-03-14 16:08:37 +01:00
Florian Schade
f38a9f4385 Introduce Policies-Service (#5716)
* add policies service
add policies proxy middleware
add policies event service
add policies grpc service
prepare ci and git environments (ci, make, readme, doc)

* add webfinger to the drone conf

* fix docs
remove not used virus scan postprocessing step

* relocate example rego file
implicitly enable and disable proxy and postprocessing policy checking by setting the query.
update configuration descriptions

* move policies
update readme

* use converter func to convert pp environment to actual environment
expose and test custom rego functions
add engine unit tests
add opa unit tests
update policies readme

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

* relocate sample policies to the deployments folder
change and document policies service port

* update index.md and small fix

* add health command
add version command
add debug server

---------

Co-authored-by: Martin <github@diemattels.at>
2023-03-14 16:08:22 +01:00
kobergj
d06d2012be Merge pull request #5753 from kobergj/TranslateNotifications
Translate Notifications
2023-03-14 16:02:37 +01:00
Daniel Swärd
6b11f0bfe4 graph: Fix problem with unescaped semicolon and such causing problems. 2023-03-14 15:21:58 +01:00
Michael Barz
230977e406 add empty locale folder, add reader pkg to bingo
add empty locale for de_DE

add reader pkg to bingo, add empty german translation
2023-03-14 00:08:29 +01:00
jkoberg
c236e03861 remove .pot file
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-13 16:14:14 +01:00
mmattel
a0df1157d6 update the tranlations part in readme 2023-03-13 16:13:15 +01:00