Commit Graph

56 Commits

Author SHA1 Message Date
kobergj
d120880a0f update expiration email templates
Co-authored-by: Michael Barz <michael.barz@zeitgestalten.eu>
2023-01-12 15:31:49 +01:00
jkoberg
9bb83c8753 unit tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 13:21:37 +01:00
jkoberg
63b592a04d membership expired notification
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 13:21:11 +01:00
jkoberg
cfe7f39027 share expired notification
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 13:20:57 +01:00
David Christofas
445e594eff add notification for space unshares 2022-12-21 11:20:42 +01:00
David Christofas
68ead43000 extract code to methods 2022-12-20 14:42:14 +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
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
Andre Duffeck
1b764d2142 Handle more events (#5071)
* Handle SpaceShared events

* Adapt to changed ID in the SpaceShared event

* Handle the SpaceUnshared events

* Handle the SpaceUpdated event

* update reva to latest edge

* fix typo

* Disable cyclomatic complexity check for StartAuditLogger

Co-authored-by: Michael Barz <mbarz@owncloud.com>
2022-11-23 14:00:29 +01:00
Willy Kloucek
61be11a651 improve description 2022-11-08 13:41:57 +01:00
Willy Kloucek
4db9d060b7 add NOTIFICATIONS_WEB_UI_URL 2022-11-07 15:46:29 +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
jkoberg
2443d7d687 use private link syntax for spaceinvite link
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-11-03 15:18:03 +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
fbb3382a42 Revert backwards incompatible reva config changes
The commit of unifying the Reva Client config introduced some backwards
incompatible changes to the config structures and yaml config tags. For
the "thumbnails", "webdav" and "notifications" service. This reverts the
changes on the service and introduces TLS options in a backwards
compatible manner.
2022-10-25 11:50:08 +02: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
Christian Richter
b4caf6397c refactor templating, add subject templating
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-10-13 14:29:11 +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
Ralf Haferkamp
c6664cfe61 Fix share/space link in notification mail
Use OCIS_URL as the link base. This change also makes sure that the
top-level OcisURL config value gets a default assigned, even when
OCIS_URL is unset.

Fixes: #4688
2022-09-29 16:26:21 +02:00
Ralf Haferkamp
de1588843a Fix notifications for group grantees
For looking up group members we need to pass an authenticated reva context via
the notification interface. We use the share owner's context that we generated
when stating the share target.

Fixes: #4703
2022-09-29 16:26:21 +02:00
Ralf Haferkamp
f71f7c7521 Fix grantee lookup for Share/Space Created event for groups
'ShareCreated' and 'SpaceCreate' events for group shares have an empty
GranteeUserID attribute. We need to lookup the GranteeGroup to get the Grantee
Name for the notification mail

Partial Fix: #4703
2022-09-29 16:26:21 +02:00
Willy Kloucek
e4dc458b3e remove extra <> 2022-09-26 08:25:01 +02:00
Willy Kloucek
89dd329280 fix notifications config 2022-09-23 15:44:33 +02:00
mmattel
7315dac100 Update Notification Service eMail Template env var text string 2022-09-22 14:26:32 +02:00
Christian Richter
e96ab9f9c8 incorporate requested changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 13:13:30 +02:00
Christian Richter
7a8e1b8106 backport url.JoinPath for go1.18
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:39:50 +02:00
Christian Richter
94024125fb enhance templating
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
0422af2a11 handle spaceshared event
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
c2ef67f661 fix SpacesShared
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
8e0b07b200 add share url to email text
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
6ea8623b55 add email subject
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
daaa08aa09 bugfixes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
70690a318d add space notification
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
22369b33f5 make email templates configurable
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
817ac00393 embedd templates
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-09-22 09:38:11 +02:00
Christian Richter
acdfbabd47 add email templating
Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Jörn Dreyer <jfd@butonic.de>
2022-09-22 09:38:11 +02:00
jkoberg
0ee2b7b33c add README to notifications service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-09-15 09:54:56 +02:00
Phil Davis
d8dddc8891 Fix typo of 'defines' 2022-08-26 10:34:23 +05:45
Willy Kloucek
faa7d3b647 add config options for mail encryption and authentication 2022-08-23 14:39:32 +02:00
Willy Kloucek
9f2be9f4f9 remove Log prefix from configlog functions 2022-08-22 08:08:18 +02:00
Willy Kloucek
e58eaabdeb move config parse error logging into function to ensure new lines and don't parse config for help 2022-08-18 15:27:28 +02:00
Willy Kloucek
60689c9c1a improve unsupervised description 2022-08-18 10:59:35 +02:00
Willy Kloucek
6154466bbc rename extensions to services (leftover occurences) 2022-08-17 15:36:52 +02:00
Willy Kloucek
7365d6cb13 short error return syntax 2022-07-25 16:38:02 +02:00
Willy Kloucek
26d50b5623 switch to different mail lib to add insecure flag 2022-07-25 16:22:27 +02:00
jkoberg
e56632681b update description for event structs
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-07-21 10:27:43 +02:00
Ralf Haferkamp
946f3e8feb Remove unused BindEnv code
We dropped this in favour of envdecode a while ago.
2022-07-14 16:34:25 +02:00