Commit Graph

47 Commits

Author SHA1 Message Date
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
Benedikt Kulmann
aaf9029a3e Rename "Cache" middleware to "NoCache" 2020-11-16 22:13:26 +01:00
A.Unger
c3ab3e7985 fix linter 2020-11-11 16:12:41 +01:00
A.Unger
951a441f65 cleanup old comments 2020-11-11 15:52:13 +01:00
A.Unger
d0e28b6345 rely on MICRO_REGISTRY to swap registries 2020-11-11 15:28:22 +01:00
A.Unger
4c1f14fc47 use etcd as registry on rpc client 2020-11-11 14:08:58 +01:00
A.Unger
76c633e650 wip 2020-11-11 11:50:53 +01:00
A.Unger
157e460945 normalize log messages to use lowercase 2020-11-04 16:00:09 +01:00
A.Unger
fcca9faa81 accounts running 2020-09-18 14:51:07 +02:00
A.Unger
c284b4d07b Add 'ocis-pkg/' from commit '72d605ba3857d0b972ddd72e226d8a5360fb480d'
git-subtree-dir: ocis-pkg
git-subtree-mainline: 4c12bed11b
git-subtree-split: 72d605ba38
2020-09-18 12:34:50 +02:00