Commit Graph

59 Commits

Author SHA1 Message Date
Christian Richter
e56b23541a remove obsolete cli flags
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-10-11 16:31:10 +02:00
Ralf Haferkamp
2a53dd89f4 debugServer: Set a base context for the http server
to allow propagating context cancellation
2023-10-10 12:25:30 +02:00
Daniel Swärd
6a5e21eff4 Replacing implicit grpc client initialization with explicit package local variables. 2023-07-31 12:57:59 +02:00
Daniel Swärd
44d9c50f1e Merge pull request #6907 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_thumbnails_service
Separate out grpc client to package local for thumbnails service.
2023-07-28 09:39:36 +02:00
Daniel Swärd
d21b03b14c Separate out grpc client to package local for thumbnails service. 2023-07-27 12:22:28 +02:00
Daniël Franke
c76b2e75ef Add another NewNoopTracerProvider 2023-07-26 12:17:30 +02:00
Daniël Franke
162b04f873 Add dummy provider if none is set 2023-07-26 12:17:26 +02:00
Daniël Franke
d2d0461375 Convert IDP service to service trace provider.
This converts the IDP service to use the service trace provider.
2023-07-20 13:36:08 +02:00
Daniël Franke
96557a95ae Add tracing to settings service.
This adds tracing to the settings service. It uses the otelchi package
and passes the tracing provider to the grpc and http servers.
2023-06-27 12:31:19 +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
Jörn Friedrich Dreyer
632b206675 trace proxie middlewares (#6313)
* trace proxie middlewares

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

* Update ocis-pkg/service/grpc/client.go

Co-authored-by: Christian Richter <1058116+dragonchaser@users.noreply.github.com>

* default tls is off

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

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Christian Richter <1058116+dragonchaser@users.noreply.github.com>
2023-05-27 10:18:24 +02:00
Phil Davis
f19830e919 Reword 'allows to' sentences 2023-05-18 09:46:25 +05:45
Daniel Swärd
c17add76c4 graph: Move token middleware and return proper JSON response on error.
Fixes #5661
2023-03-06 10:24:44 +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
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
cbe41fb85f Add method for creating in-memory certificates 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
Ralf Haferkamp
01650a5023 Use lazy initialization for the default grpc client
This avoids using a public global variable. It allows us to initialize
the default client a bit later (outside of init()). That way we can e.g.
properly initialize the in-memory registry.
2022-09-26 16:25:56 +02:00
Ralf Haferkamp
fffd49fc4e Introduce "noop" go-micro broker
This introduces a no op broker for go-micro. It is set as the default
broker for all ocis http services. To avoid starting the default http
broker, which opens an unused random http port.

Fixes: https://github.com/owncloud/ocis/issues/3829
2022-09-14 12:22:23 +02:00
Michael Barz
189987bcbd Bump major version to v2 2022-05-04 14:49:59 +02:00
Willy Kloucek
977c4fd9e9 ensure commands for all services 2022-05-03 15:12:34 +02:00
Willy Kloucek
ef6d32a12a remove extensions/storage leftovers 2022-05-03 15:12:34 +02:00
Willy Kloucek
3108565b9a switch micro plugin source for the grpc server plugin 2022-04-19 16:22:12 +02:00
Willy Kloucek
e5b7496c29 switch source for go micro plugins 2022-04-19 09:44:47 +02:00
Willy Kloucek
1c1f8dab24 make default client respect the registry settings 2022-01-26 15:36:23 +01:00
A.Unger
c335c4dc29 config dump endpoint for proxy 2021-11-09 14:14:31 +01:00
A.Unger
2a14bb362a fix smells 2021-11-02 14:48:40 +01:00
A.Unger
711acbb354 inherit logging config from ocis.yaml, let extensions overwrite their logging. Considering using a package level global logging... 2021-10-31 00:08:46 +02:00
Willy Kloucek
d6040ce76c fix ipv6 error with go-micro update 2021-10-28 12:29:50 +02:00
David Christofas
9ecc065879 update CORS middleware and make it configurable 2021-10-22 13:27:31 +02:00
Willy Kloucek
6d5a3733ff upgrade to go micro v4.1.0 2021-10-14 15:56:19 +02:00
Willy Kloucek
7b30571aff switch from micro/cli/v2 to urfave/cli/v2, like https://github.com/asim/go-micro/pull/2224 2021-09-27 12:02:55 +02:00
Ralf Haferkamp
3a42fdc578 Move to go-chi/chi v5 2021-08-24 17:48:37 +02:00
David Christofas
3bc60510ce use go-chi middlewares
go-chi already delivers the middlewares we need so we don't need to import other libraries for that.
2021-08-12 17:14:41 +02:00
A.Unger
97271d51bc add circuit breakers 2021-02-23 11:56:03 +01:00
Jörn Friedrich Dreyer
8a8aa2dc52 use micre v3 registry interface
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-22 15:08:50 +00:00
Jörn Friedrich Dreyer
d4585933ac reuse the default client
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 13:07:04 +00:00
Jörn Friedrich Dreyer
d9f4a4c524 always pass in a client
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 10:58:56 +00:00
Jörn Friedrich Dreyer
11ed5e49d8 same order of options in grpc and http service
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 10:00:16 +00:00
Jörn Friedrich Dreyer
13f6defb7a use upstream prometheus logger
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 09:10:00 +00:00
Jörn Friedrich Dreyer
34a9fb2dc8 remove unneeded getTranstport
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 08:03:22 +00:00
Jörn Friedrich Dreyer
588ac4a2a6 get rid of http server option.Hander
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 08:01:53 +00:00
A.Unger
b89deea796 remove redundant transport 2021-02-18 08:01:53 +00:00
A.Unger
448bdde79c use http replace 2021-02-18 08:01:53 +00:00
A.Unger
072d0704df wip 2021-02-18 08:01:53 +00:00
A.Unger
005f47d436 update accounts, settings, storage-metadata and ocis-pkg to use asim go-micro v3 2021-02-18 08:00:02 +00:00
Jörn Friedrich Dreyer
83851ca2bb return micro.Service()
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 08:00:02 +00:00
A.Unger
88f670b45c initial commit 2021-02-18 08:00:02 +00:00
Ingmar Aasoja
f9954bb022 Remove duplicated code and use existant getRegistry() instead 2021-01-29 11:54:44 +02:00
Ingmar Aasoja
5c235be89b Use MICRO_REGISTRY_ADDRESS env var for etcd address 2021-01-28 16:12:08 +02:00