Commit Graph

203 Commits

Author SHA1 Message Date
Ralf Haferkamp
80a2c72491 graph: Initial LDAP support for /education/users
This implements GetEducationUser, GetEducationUsers, DeleteEducationUser and
CreateEducationUser methods for the LDAP backend. It's still very basic and
no fancy filtering or expanding is there yet.
2022-12-22 17:03:37 +01:00
Ralf Haferkamp
b42bf80d0e graph: Rename noop backend to ErrEducationBackend 2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
c3c851286f fix comment
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
3637149eeb fix gateway client mock
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
cd23d010a4 correct naming of education backend methods
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
8967556b9d correct EducationSchool naming
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
5a1d3ebe82 config and logging fixes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
8babace4b6 add comments for linter
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
57fd00d238 handle /education/user
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Ralf Haferkamp
962ae09bf1 LDAP support for GetSchools 2022-12-21 15:38:14 +01:00
Ralf Haferkamp
644d96e7ad LDAP support for GetSchool 2022-12-21 15:38:14 +01:00
Ralf Haferkamp
bc9f81cc23 LDAP Support for Delete School 2022-12-21 15:38:14 +01:00
Ralf Haferkamp
ad1355d032 Implement LDAP backend for CreateSchool 2022-12-21 15:38:14 +01:00
Ralf Haferkamp
b302af88f6 Add basic config setting for LDAP education backend
require LDAP support for Education resources to be explicitly enabled.
Default to a NOOP implementation if disabled.
2022-12-21 15:38:14 +01:00
Ralf Haferkamp
795bc70546 Add a more explict filter to DN based lookups
To make sure to read the right type of object
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
e1123576f3 disable school events
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
Jörn Friedrich Dreyer
9844f5f8ce initial schools API
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-21 15:38:14 +01:00
David Christofas
39917330f6 fix goconst bugs 2022-12-21 14:46:01 +01:00
jkoberg
b29ffeb3a9 use stream pkg instead server pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-20 09:53:11 +01:00
Florian Schade
1db03dd512 [full-ci] experimental tags backport (#5227)
* add tags to search service resource
add tags getTags, AssignTags and UnassignTags endpoint to graph
use and prefer search event spaceOwner over executant
add tags to search report response
update libre graph api
update reva

Co-authored-by: David Christofas <dchristofas@owncloud.com>
2022-12-19 15:44:02 +01:00
Jörn Friedrich Dreyer
d359a7c2cf [full-ci] standalone graph service with LDAP (#5199)
* standalone graph service with LDAP

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

* no panic on PATCH and DELETE

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

* fix apitoken yaml key

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

* update user, fix response codes

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

* fix group creation return code

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

* remove unknown user property

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

* fix create return code checks in graph feature context

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

* updating uses 200 OK when returning a body

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

* revert user statusCreated change for now

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

* revert return code changes

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-12 12:46:10 +01:00
Jörn Friedrich Dreyer
b2b4f9893c align revactx package import (#5206)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:45:30 +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
Martin
ae940758d6 Merge pull request #5167 from owncloud/graph-readme
add a README to the graph package
2022-12-05 11:44:58 +01:00
David Christofas
dc53b39f23 add a README to the graph package 2022-12-05 11:11:25 +01:00
André Duffeck
d1958a0802 Increase test coverage 2022-12-01 08:50:53 +01:00
André Duffeck
e87eff95e6 Make method which is only used internally private 2022-12-01 08:25:19 +01:00
André Duffeck
bc9a05aef4 Add GetRootDriveChildren to the service interface 2022-12-01 08:25:19 +01:00
Andre Duffeck
0dc6eaf466 Graph test coverage (#5136)
* Add unit tests for users.go

* Do not choke on broken spaces

* Generate mocks for the RoleService

* Increase test coverage

* Increase test coverage
2022-11-29 10:22:40 +01:00
Andre Duffeck
e07c7bc808 Graph test coverage drives (#5141)
* Add GetSingleDrive to the service interface

* Increase test coverage for the drives endpoint

* Remove dead code

* Add missing methods to the graph service interface

* Use the existing permission client of the graph service

* Increase test coverage
2022-11-29 10:21:25 +01:00
Martin
072049fc10 Merge pull request #5106 from rhafer/issue/5073
Update/align a few TLS variable description
2022-11-23 15:05:31 +01:00
Andre Duffeck
7c2961e18a Graph test coverage (#5098)
* First iteration of a groups test

* Do not render a result in case of an error

* Generate mocks for identity.Backend

* Export listResponse (-> ListResponse)

* Add unit tests for GetGroups

* Finish GetGroups unit tests

* Increase test coverage

* Increase test coverage

* Increase test coverage

* Add missing mocks

* Fix return codes

* Fix error messages
2022-11-23 14:01:29 +01:00
Ralf Haferkamp
ee54a4c30c Update/align a few TLS variable description
Fixes: 5073
2022-11-23 13:07:29 +01:00
Michael Barz
d1ff976aad improve the code style 2022-11-17 16:27:13 +01:00
Michael Barz
94c212e331 use interface from graph pkg 2022-11-16 16:19:53 +01:00
Michael Barz
fd562b36b5 refactor permissions service to make creating drives testable 2022-11-16 15:19:22 +01:00
Michael Barz
d9fa7455b6 add more unit tests for the drives operations 2022-11-16 15:19:22 +01:00
Willy Kloucek
d74b879d4f update tooling (#5038)
* update tooling

* update nodejs version
2022-11-11 15:01:45 +01:00
Jörn Friedrich Dreyer
0f7dba53fb use min tls 1.2 (#4969)
* use min tls 1.2

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

* add changelog

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-11-03 16:08:56 +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
kobergj
a5bccc2807 Validate Space Names (#4955)
* validate space names

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* Update services/graph/pkg/service/v0/drives.go

Co-authored-by: Michael Barz <michael.barz@zeitgestalten.eu>

Signed-off-by: jkoberg <jkoberg@owncloud.com>
Co-authored-by: Michael Barz <michael.barz@zeitgestalten.eu>
2022-11-03 11:39:02 +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
Ralf Haferkamp
3d57f5cc21 Introduce TLS Settings for all reva grpc services and clients 2022-10-25 11:50:08 +02:00
Ralf Haferkamp
e373e48383 Get rid of duplicated Reva config struct
Consolidate all services to use the Reva config struct for the shared package.
This works because all services (except 'notifications', 'thumbnails' and
'webdav') where using the same config keys and environment variables for
setting the reva gateway.
2022-10-25 11:50:08 +02:00
Michael Barz
ec764ea5b1 improve the description of the help texts 2022-10-21 12:50:03 +02:00
David Christofas
45b92fc56f add config option to enable or disable TLS for nats 2022-10-21 12:40:21 +02:00
Michael Barz
f84fbdd6ff corrections from code review 2022-10-17 17:22:33 +02:00
Michael Barz
0b7297d1b4 harden drives api and improve logging 2022-10-16 00:38:44 +02:00
David Christofas
4623b6c8e7 Nats tls (#4781)
* use tls for nats connections

* add config options for nats client tls config

* add nats tls config to CI

* add function to create a certpool

* add option to provide a rootCA to validate the server's TLS certificate

* add option to provide a rootCA to validate the server's TLS certificate

* add option to provide a rootCA to validate the server's TLS certificate

* add option to provide a rootCA to validate the server's TLS certificate

* configure nats clients in reva to use tls
2022-10-12 14:56:47 +02:00
Michael Barz
cfd3e9fab7 fix master branch 2022-10-10 17:26:01 +02:00