Commit Graph

3300 Commits

Author SHA1 Message Date
Jens Langhammer 192dbe05c4 events: triggers -> rules 2021-01-16 14:15:23 +01:00
Jens Langhammer 0b41cb84f0 web: update styling of notification drawer to match rest 2021-01-15 12:16:35 +01:00
Jens Langhammer d637bd0bf9 events: improve infinite loop detection 2021-01-15 11:27:18 +01:00
Jens Langhammer a2bddc6d91 policies: fix engine tests checking wrong key 2021-01-15 11:27:07 +01:00
Jens Langhammer 2e42da11ea policies/event_matcher: simplify validity checking 2021-01-15 11:26:55 +01:00
Jens Langhammer f297d1256d events: fix linting 2021-01-15 11:19:56 +01:00
dependabot[bot] 5e1e5afb24
build(deps): bump boto3 from 1.16.54 to 1.16.55 (#472) 2021-01-15 09:26:35 +01:00
Jens Langhammer da59e7c4a7 events: fix infinite loop in unittests 2021-01-15 00:32:59 +01:00
Jens Langhammer 8684d106d5 events: fix default transport for successive migrations 2021-01-14 23:50:18 +01:00
Jens Langhammer 2579e168c3 web: start implementing notifications 2021-01-14 22:14:35 +01:00
Jens Langhammer 7f5caf901d expressions: set exception as message field 2021-01-14 21:58:10 +01:00
Jens Langhammer 1c686e19b5 policies: set message instead of error for Event 2021-01-14 20:17:21 +01:00
Jens Langhammer 3cc92f6c97 events: ensure created field is timestamp 2021-01-14 20:16:54 +01:00
Jens Langhammer 8f5b33a3a2 web: show more context on policy_exception 2021-01-14 18:13:52 +01:00
Jens Langhammer 4447345345 policies: fix display of stacktrace in events 2021-01-14 18:07:41 +01:00
Jens Langhammer 42c6401ba7 events: add event context to slack webhook 2021-01-14 17:40:19 +01:00
Jens Langhammer eef111bcfd events: disable policy cache for trigger 2021-01-14 17:39:59 +01:00
Jens Langhammer 6192b2787f events: notifications: send entire event in API 2021-01-14 17:22:02 +01:00
Jens Langhammer c7d28f8ca9 events: attach default transport to default triggers 2021-01-14 17:22:02 +01:00
Jens Langhammer 1342266368 events: include full group in event notification 2021-01-14 17:22:02 +01:00
Jens Langhammer 7ff679b1a3 policies: fix error when error occurs during policy process with no target 2021-01-14 17:22:02 +01:00
Jens Langhammer 8beddcddb0 events: set severity for default triggers 2021-01-14 17:22:02 +01:00
Jens Langhammer 9fe8554f28 events: make notification read/update only 2021-01-14 17:22:02 +01:00
dependabot[bot] 812fe72e60
build(deps): bump @sentry/tracing from 5.29.2 to 5.30.0 in /web (#470)
Bumps [@sentry/tracing](https://github.com/getsentry/sentry-javascript) from 5.29.2 to 5.30.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.29.2...5.30.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-14 10:00:29 +01:00
dependabot[bot] d0e4533cdd
build(deps): bump boto3 from 1.16.53 to 1.16.54 (#468)
Bumps [boto3](https://github.com/boto/boto3) from 1.16.53 to 1.16.54.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.16.53...1.16.54)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-14 09:22:22 +01:00
dependabot[bot] b1b5d94ddc
build(deps): bump @fortawesome/fontawesome-free in /web (#471)
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.15.1 to 5.15.2.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.15.1...5.15.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-14 09:22:04 +01:00
dependabot[bot] 59722e0bbe
build(deps): bump @sentry/browser from 5.29.2 to 5.30.0 in /web (#469)
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.29.2 to 5.30.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.29.2...5.30.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-14 09:21:46 +01:00
Jens Langhammer 9c5bb3998c docs: fix minor grammar issues 2021-01-13 10:28:02 +01:00
dependabot[bot] c180c4b1a2
build(deps): bump boto3 from 1.16.52 to 1.16.53 (#467)
Bumps [boto3](https://github.com/boto/boto3) from 1.16.52 to 1.16.53.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.16.52...1.16.53)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-13 09:29:14 +01:00
Jens Langhammer 308896719d docs: add docs for events and notifications 2021-01-13 00:26:33 +01:00
Jens Langhammer 95c1473dd2 events: assign default triggers to default admin group, create default transport 2021-01-12 23:28:17 +01:00
Jens Langhammer b14c5039ed events: set default admin group to receive default triggers 2021-01-12 23:06:42 +01:00
Jens Langhammer b6948334f2 policies/event_matcher: fix verbose_name 2021-01-12 23:06:24 +01:00
Jens Langhammer 29e08e7477 stages/otp_*: fix app's verbose_name 2021-01-12 22:59:46 +01:00
Jens Langhammer 36bc1dc020 events: record source when user is using source to authenticate 2021-01-12 22:48:55 +01:00
Jens Langhammer 61d1407804 sources/*: Set PLAN_CONTEXT_SOURCE when logging in with a source 2021-01-12 22:37:33 +01:00
Jens Langhammer 47ddf0d7f2 web: add UI for notification triggers 2021-01-12 22:26:57 +01:00
Jens Langhammer cb36a3c8c7 web: add event transports UI 2021-01-12 22:12:16 +01:00
Jens Langhammer cac94792fa admin: add event transport forms 2021-01-12 22:03:33 +01:00
Jens Langhammer 6f56c37d2f web: make action button better handle errors and show messages 2021-01-12 21:52:21 +01:00
Jens Langhammer 8369fa16ae events: add mode_verbose to transport, return string on send error 2021-01-12 21:51:55 +01:00
Jens Langhammer f30bdbecd6 events: catch errors during send and re-raise as custom type 2021-01-12 21:48:16 +01:00
Jens L c727c845df
policies: add and/or mode (#463)
* policies: add mode to PolicyEngine for AND and OR modes

* events: use PolicyEngine in OR mode
2021-01-12 18:22:25 +01:00
dependabot[bot] b2b737e59e
build(deps-dev): bump @typescript-eslint/parser in /web (#465)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.13.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-12 10:16:47 +01:00
dependabot[bot] e2b930afe3
build(deps): bump boto3 from 1.16.51 to 1.16.52 (#464)
Bumps [boto3](https://github.com/boto/boto3) from 1.16.51 to 1.16.52.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/boto/boto3/compare/1.16.51...1.16.52)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-12 09:45:24 +01:00
dependabot[bot] 36c0b924bc
build(deps-dev): bump @typescript-eslint/eslint-plugin in /web (#466)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.13.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-12 09:45:14 +01:00
Jens L 1ccf6dcf6f
events: Notifications (#418)
* events: initial alerting implementation

* policies: move error handling to process, ensure policy UUID is saved

* policies: add tests for error handling in PolicyProcess

* events: improve loop detection

* events: add API for action and trigger

* policies: ensure http_request is not used in context

* events: adjust unittests for user handling

* policies/event_matcher: add policy type

* events: add API tests

* events: add middleware tests

* core: make application's provider not required

* outposts: allow blank kubeconfig

* outposts: validate kubeconfig before saving

* api: fix formatting

* stages/invitation: remove invitation_created signal as model_created functions the same

* stages/invitation: ensure created_by is set when creating from API

* events: rebase migrations on master

* events: fix missing Alerts from API

* policies: fix unittests

* events: add tests for alerts

* events: rename from alerting to notifications

* events: add ability to specify severity of notification created

* policies/event_matcher: Add app field to match on event app

* policies/event_matcher: fix EventMatcher not being included in API

* core: use objects.none() when get_queryset is used

* events: use m2m for multiple transports, create notification object in task

* events: add default triggers

* events: fix migrations return value

* events: fix notification_transport not being in the correct queue

* stages/email: allow sending of email without backend

* events: implement sending via webhook + slack/discord + email
2021-01-11 18:43:59 +01:00
Jens Langhammer f8a426f0e8 ci: fix docker tag name for dependabot PRs 2021-01-11 16:18:44 +01:00
dependabot[bot] f8756d0fc9
build(deps): bump @types/codemirror from 0.0.105 to 0.0.106 in /web (#462)
Bumps [@types/codemirror](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/codemirror) from 0.0.105 to 0.0.106.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/codemirror)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-11 08:23:19 +01:00
dependabot[bot] fd6d99f4f9
build(deps): bump @types/codemirror from 0.0.104 to 0.0.105 in /web (#461)
Bumps [@types/codemirror](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/codemirror) from 0.0.104 to 0.0.105.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/codemirror)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-08 09:52:17 +01:00