Ralf Haferkamp
4465c9385d
graph/education: Fix issues reported by sonarcloud
2023-09-27 15:39:00 +02:00
Ralf Haferkamp
a34d467285
graph/education: slightly improve error handling and logging
...
- Use var for common errors
- Add the addition error message to the Error() output of errorcode.Error
- in PatchEducationSchool() use errorcode.RenderError() to turn the errorcode
in to the right HTTP Status (instead of return 500 always)
2023-09-27 15:39:00 +02:00
Ralf Haferkamp
4f59de9c52
graph/education: Check school number for duplicates before adding a school
2023-09-27 15:39:00 +02:00
Ralf Haferkamp
e2849bf19d
graph/education: Add getSchoolByNumber helper
...
Sometimes we explicit need to lookup by number and not numberOrID
2023-09-27 15:39:00 +02:00
Ralf Haferkamp
ce808eaa17
graph/education: Remove unreachable code
...
An LDAP Modify operation never returns LDAPResultEntryAlreadyExists errors.
That error can only happen for LDAPAdd or LDAPModifyDN.
2023-09-27 15:39:00 +02:00
Ralf Haferkamp
16debe6fa5
graph/education: Use helper for creating attribute list
2023-09-27 15:39:00 +02:00
Ralf Haferkamp
164edd16c0
graph/education: Don't leak LDAP errors into the graph error message
2023-09-27 15:39:00 +02:00
Jörn Friedrich Dreyer
c083f598b7
fix group id claim ( #7352 )
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2023-09-26 15:13:15 +02:00
jkoberg
1f1aa50c54
hard exit when services fail
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-09-21 13:53:18 +02:00
Ralf Haferkamp
8f284e7c2b
Add OCIS_LDAP_BIND_PASSWORD envvar and deprecate LDAP_BIND_PASSWORD
...
For some reason LDAP_BIND_PASSWORD was forgotten when all the other global LDAP_
variables got renamed.
Also marks LDAP_BIND_PASSWORD and LDAP_USER_SCHEMA_ID_IS_OCTETSTRING for removal with 5.0.0
Partial: #7176
2023-09-20 19:00:11 +02:00
Jörn Friedrich Dreyer
8cbf261568
give graph driveItems some love ( #7250 )
...
* give graph driveItems some love
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
* extract parseIDParam()
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
* add GetDriveItem(Children) tests
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
---------
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2023-09-08 15:40:06 +02:00
Ralf Haferkamp
a01f5d94c2
graph: debug logging for requireadmin middleware
2023-09-07 20:54:14 +02:00
Ralf Haferkamp
ace1d70ba8
Fix wrong log-level for debug output
2023-09-06 08:32:34 +02:00
jkoberg
bd716156fc
let ocis init set the serviceaccounts
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-08-31 12:11:44 +02:00
jkoberg
0cd5ad6415
use service accounts for graph
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-08-31 12:11:43 +02:00
Daniel Swärd
49fc22d532
Add missing tracing references to multiple services. ( #7110 )
2023-08-23 15:17:17 +02:00
Christian Richter
d7139d4127
remove deprecated variables
...
Signed-off-by: Christian Richter <crichter@owncloud.com >
2023-08-22 17:25:24 +02:00
Ralf Haferkamp
c0181f8144
graph: honor the OCIS_LDAP_GROUP_SCHEMA_MEMBER setting
...
Fixes : #7032
2023-08-17 11:06:34 +02:00
jkoberg
49cdcad129
unify eventstream creation
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-08-16 10:14:12 +02:00
Daniël Franke
952ebe7d7d
Pass context to event publishing.
...
To allow tracing propagation via events, we need to pass the context
to the `Publish` function of reva events. This adds the context
everywhere where events are published. If there was no context to pass,
we started a new one with `context.Background()`.
2023-08-11 12:01:19 +02:00
Daniel Swärd
fc3dce05f4
Add missing tracing initialization for graph service ( #6988 )
...
* Convert webdav to service trace provider
* graph: Add missing tracing initialization to graph service
2023-08-08 13:14:45 +02:00
Daniel Swärd
6a5e21eff4
Replacing implicit grpc client initialization with explicit package local variables.
2023-07-31 12:57:59 +02:00
Daniël Franke
919404bafe
Move graph service to service tracer.
...
This changes the graph service away from using global tracers,
which makes debugging tracing issues easier going forward.
2023-07-12 12:56:33 +02:00
Ralf Haferkamp
51bc49d5b5
graph: Add config knob to set a minimal grace period for schoolTermination
...
When setting a terminationDate on a School, it's possible to configure a grace
period now so that only terminationDate that are at least a certain time in the
future can be set.
We also now forbid to set a terminationDate in the past.
2023-07-12 08:48:19 +02:00
Ralf Haferkamp
0bc36f1cf5
graph: Turn PatchEducationSchool test into test table
2023-07-12 08:48:19 +02:00
Ralf Haferkamp
5304184bd6
graph: Add 'terminationDate' property to educationSchool
...
Schools can now have a terminationDate set. Schools can only be deleted if the
terminationDate is in the past. Schools without a terminationDate cannot be deleted.
2023-07-12 08:48:19 +02:00
Ralf Haferkamp
b74eeed359
ldap: Implement missing methods for 3.4.5 go-ldap in ldap reconnect wrapper
2023-07-11 16:05:32 +02:00
mmattel
6ad53971ef
[docs-only] Increase readability for log level values in the description
2023-07-07 10:33:42 +02:00
mmattel
d7b447b791
[docs-only] Increase readability for tracing values in the description
2023-07-07 09:50:39 +02:00
Ralf Haferkamp
c9a9fddef1
Consitently switch to stretchr/testify
...
We were using stretchr/testify and test-go/testify inconsitently and
sometimes mixed in the same tests. This can cause very strange issue,
e.g when using things like mock.MatchedBy().
This moves all our code to stretchr/testify, which seems to be far
more active and maintained then test-go/testify.
2023-06-29 13:44:49 +02:00
jkoberg
ef68dce389
add more details for DELETE endpoints
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-06-22 14:06:21 +02:00
jkoberg
3fe5e2b011
add ids to graph access logs
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-06-22 11:04:00 +02:00
jkoberg
eb9d2bc373
dont connect ldap on startup
...
Signed-off-by: jkoberg <jkoberg@owncloud.com >
2023-06-21 11:53:52 +02:00
Christian Richter
9198dd9a67
Fix tests
...
Co-authored-by: Julian Koberg <jkoberg@owncloud.com >
Signed-off-by: Christian Richter <crichter@owncloud.com >
2023-06-16 11:56:03 +02:00
Christian Richter
dd862cdf06
Add event for role changes
...
Co-authored-by: Julian Koberg <jkoberg@owncloud.com >
Signed-off-by: Christian Richter <crichter@owncloud.com >
2023-06-16 10:52:37 +02:00
Christian Richter
c4f9f18a39
Show changes between old an new values in audit log
...
Co-authored-by: Julian Koberg <jkoberg@owncloud.com >
Signed-off-by: Christian Richter <crichter@owncloud.com >
2023-06-16 10:52:37 +02:00
Roman Perekhod
4f9a82ee99
Merge pull request #6469 from 2403905/issue-6414
...
Handle the bad request status for the CreateStorageSpace function
2023-06-14 16:47:11 +03:00
Michael Barz
0484a4dac5
add remote item metadata
...
Signed-off-by: Michael Barz <mbarz@owncloud.com >
2023-06-14 11:20:47 +02:00
Roman Perekhod
e73e760827
changlog added
2023-06-12 09:19:54 +02:00
Roman Perekhod
df5641f406
cleared up the errors rendering
2023-06-12 09:19:54 +02:00
Roman Perekhod
6b3c1327d0
fixed the ability to create a group with an empty name #5050
2023-06-12 09:19:54 +02:00
mmattel
758192bd6d
[docs-only] Fix some envvar descriptions
2023-06-09 13:03:17 +02:00
Florian Schade
4f26424db6
[full-ci] enhancement: use reva client pool selectors ( #6452 )
...
* enhancement: use reva client pool selectors
register mock service to registry and pass tests
* enhancement: bump reva
* Fix a couple of linter issues
---------
Co-authored-by: Ralf Haferkamp <rhaferkamp@owncloud.com >
2023-06-08 12:41:04 +02:00
Roman Perekhod
c0f06cc679
Handle the bad request status for the CreateStorageSpace function
2023-06-07 13:34:17 +02:00
Roman Perekhod
96f658c281
Merge pull request #6440 from 2403905/issue-6436
...
Fix the username validation when an admin update the user
2023-06-07 12:23:47 +03:00
Martin
5d7424030f
Update services/graph/pkg/config/application.go
2023-06-06 17:22:37 +02:00
Martin
6b0af103ca
[docs-only] GRAPH_APPLICATION_ID envvar fix
2023-06-06 17:20:50 +02:00
Roman Perekhod
1ac49dfd64
Fix the username validation when an admin update the user
2023-06-06 17:15:38 +02:00
Michael Barz
4b512fa884
update reva to latest edge
2023-06-05 17:02:04 +02:00
kobergj
f2e6556549
Merge pull request #6428 from kobergj/RefactorOcisPKG
...
[tests-only][full-ci] Cleanup ocis runtime
2023-06-05 14:40:29 +02:00