From a4d5815e1b8321a2d93099e1bc86e59eea2f69db Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 13:19:38 +0100 Subject: [PATCH 01/12] policies: sort groups in groupmembership policy and binding closes #595 # Conflicts: # authentik/policies/group_membership/forms.py --- authentik/policies/forms.py | 4 ++++ authentik/policies/group_membership/forms.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/authentik/policies/forms.py b/authentik/policies/forms.py index b737ec817..f4c4eeddb 100644 --- a/authentik/policies/forms.py +++ b/authentik/policies/forms.py @@ -2,6 +2,7 @@ from django import forms +from authentik.core.models import Group from authentik.lib.widgets import GroupedModelChoiceField from authentik.policies.models import Policy, PolicyBinding, PolicyBindingModel @@ -19,6 +20,9 @@ class PolicyBindingForm(forms.ModelForm): policy = GroupedModelChoiceField( queryset=Policy.objects.all().select_subclasses(), ) + group = forms.ModelChoiceField( + queryset=Group.objects.all().order_by("name"), required=False + ) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/authentik/policies/group_membership/forms.py b/authentik/policies/group_membership/forms.py index 250f74ca6..9a6c89471 100644 --- a/authentik/policies/group_membership/forms.py +++ b/authentik/policies/group_membership/forms.py @@ -2,6 +2,7 @@ from django import forms +from authentik.core.models import Group from authentik.policies.forms import GENERAL_FIELDS from authentik.policies.group_membership.models import GroupMembershipPolicy @@ -9,6 +10,8 @@ from authentik.policies.group_membership.models import GroupMembershipPolicy class GroupMembershipPolicyForm(forms.ModelForm): """GroupMembershipPolicy Form""" + group = forms.ModelChoiceField(queryset=Group.objects.all().order_by("name")) + class Meta: model = GroupMembershipPolicy From 17ab89565265e6442dfc1f33d93bdae5ae5a562f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 13:23:16 +0100 Subject: [PATCH 02/12] flows: fix glob pattern for doc flows --- authentik/flows/tests/test_transfer_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/flows/tests/test_transfer_docs.py b/authentik/flows/tests/test_transfer_docs.py index debd3a1d9..8fc4ecdb7 100644 --- a/authentik/flows/tests/test_transfer_docs.py +++ b/authentik/flows/tests/test_transfer_docs.py @@ -24,6 +24,6 @@ def pbflow_tester(file_name: str) -> Callable: return tester -for flow_file in glob("website/static/flows/*.pbflow"): +for flow_file in glob("website/static/flows/*.akflow"): method_name = Path(flow_file).stem.replace("-", "_").replace(".", "_") setattr(TestTransferDocs, f"test_flow_{method_name}", pbflow_tester(flow_file)) From de22a367b182fbe19b3b8c7321a8a37aca3e4b89 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 15:22:43 +0100 Subject: [PATCH 03/12] events: fix error when event can't be loaded into rule task --- authentik/events/tasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/authentik/events/tasks.py b/authentik/events/tasks.py index 8f6309da7..aa9793bf5 100644 --- a/authentik/events/tasks.py +++ b/authentik/events/tasks.py @@ -30,7 +30,11 @@ def event_notification_handler(event_uuid: str): @CELERY_APP.task() def event_trigger_handler(event_uuid: str, trigger_name: str): """Check if policies attached to NotificationRule match event""" - event: Event = Event.objects.get(event_uuid=event_uuid) + events = Event.objects.filter(event_uuid=event_uuid) + if not events.exists(): + LOGGER.warning("event doesn't exist yet or anymore", event_uuid=event_uuid) + return + event: Event = events.first() trigger: NotificationRule = NotificationRule.objects.get(name=trigger_name) if "policy_uuid" in event.context: From b862bf4284d29400711ce9741e88f83b17b6aee7 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 16:02:07 +0100 Subject: [PATCH 04/12] providers/oauth2: fix error when no login event could be found --- authentik/providers/oauth2/models.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/authentik/providers/oauth2/models.py b/authentik/providers/oauth2/models.py index e1fb623bc..a06f76462 100644 --- a/authentik/providers/oauth2/models.py +++ b/authentik/providers/oauth2/models.py @@ -4,6 +4,7 @@ import binascii import json import time from dataclasses import asdict, dataclass, field +from datetime import datetime from hashlib import sha256 from typing import Any, Dict, List, Optional, Type from urllib.parse import urlparse @@ -480,10 +481,14 @@ class RefreshToken(ExpiringModel, BaseGrantModel): now + timedelta_from_string(self.provider.token_validity).seconds ) # We use the timestamp of the user's last successful login (EventAction.LOGIN) for auth_time - auth_event = Event.objects.filter( + auth_events = Event.objects.filter( action=EventAction.LOGIN, user=get_user(user) - ).latest("created") - auth_time = int(dateformat.format(auth_event.created, "U")) + ).order_by("-created") + # Fallback in case we can't find any login events + auth_time = datetime.now() + if auth_events.exists(): + auth_time = auth_events.first().created + auth_time = int(dateformat.format(auth_time, "U")) token = IDToken( iss=self.provider.get_issuer(request), From 3437d8b4b0a1aab3c62c5a9d4df4ba9bc127f974 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 16:26:06 +0100 Subject: [PATCH 05/12] flows: handle error when app cannot be found during import --- authentik/flows/transfer/importer.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/authentik/flows/transfer/importer.py b/authentik/flows/transfer/importer.py index 76e5bc2fe..c66e4dd23 100644 --- a/authentik/flows/transfer/importer.py +++ b/authentik/flows/transfer/importer.py @@ -152,7 +152,13 @@ class FlowImporter: entries = deepcopy(self.__import.entries) for entry in entries: model_app_label, model_name = entry.model.split(".") - model: SerializerModel = apps.get_model(model_app_label, model_name) + try: + model: SerializerModel = apps.get_model(model_app_label, model_name) + except LookupError: + self.logger.error( + "app or model does not exist", app=model_app_label, model=model_name + ) + return False # Validate each single entry try: serializer = self._validate_single(entry) From d2a35eb8de56e4379b7a538f4961bf58b6e3043c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 16:27:42 +0100 Subject: [PATCH 06/12] admin: fix missing success_url for clean views --- authentik/admin/views/overview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/authentik/admin/views/overview.py b/authentik/admin/views/overview.py index cc6d42f9c..021154f9a 100644 --- a/authentik/admin/views/overview.py +++ b/authentik/admin/views/overview.py @@ -18,7 +18,7 @@ class PolicyCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView): """View to clear Policy cache""" form_class = PolicyCacheClearForm - + success_url = "/" template_name = "generic/form_non_model.html" success_message = _("Successfully cleared Policy cache") @@ -36,7 +36,7 @@ class FlowCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView): """View to clear Flow cache""" form_class = FlowCacheClearForm - + success_url = "/" template_name = "generic/form_non_model.html" success_message = _("Successfully cleared Flow cache") From a2e69bd250966dec452f169903e1e641f1edd12b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 16:29:36 +0100 Subject: [PATCH 07/12] sources/ldap: fix API error when source has not synced yet --- authentik/sources/ldap/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/sources/ldap/api.py b/authentik/sources/ldap/api.py index abe9e8c82..60551bc85 100644 --- a/authentik/sources/ldap/api.py +++ b/authentik/sources/ldap/api.py @@ -1,5 +1,6 @@ """Source API Views""" from datetime import datetime +from time import time from django.core.cache import cache from django.db.models.base import Model @@ -68,7 +69,7 @@ class LDAPSourceViewSet(ModelViewSet): def sync_status(self, request: Request, slug: str) -> Response: """Get source's sync status""" source = self.get_object() - last_sync = cache.get(source.state_cache_prefix("last_sync"), None) + last_sync = cache.get(source.state_cache_prefix("last_sync"), time()) return Response( LDAPSourceSyncStatusSerializer( {"last_sync": datetime.fromtimestamp(last_sync)} From fe290aa21436705d702a40f3b1d75dccaccc4394 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 16:49:59 +0100 Subject: [PATCH 08/12] sources/ldap: fix password setter on users which are not LDAP --- authentik/sources/ldap/password.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/sources/ldap/password.py b/authentik/sources/ldap/password.py index fc26a0431..65c042b68 100644 --- a/authentik/sources/ldap/password.py +++ b/authentik/sources/ldap/password.py @@ -77,7 +77,8 @@ class LDAPPasswordChanger: """Change user's password""" user_dn = user.attributes.get(LDAP_DISTINGUISHED_NAME, None) if not user_dn: - raise AttributeError(f"User has no {LDAP_DISTINGUISHED_NAME} set.") + LOGGER.info(f"User has no {LDAP_DISTINGUISHED_NAME} set.") + return self._source.connection.extend.microsoft.modify_password(user_dn, password) def _ad_check_password_existing(self, password: str, user_dn: str) -> bool: From b10c3db13d57e294e5cf0d283a237ed80df8c726 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 17:18:42 +0100 Subject: [PATCH 09/12] web: add sentry CaptureConsole # Conflicts: # web/package.json --- web/package-lock.json | 39 +++++++++++++++++++++++++++++++++++++++ web/package.json | 3 ++- web/src/api/Config.ts | 6 +++++- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 1b8b849bf..849f9cf17 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -245,6 +245,24 @@ } } }, + "@sentry/integrations": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-6.2.0.tgz", + "integrity": "sha512-gvAhP61qs2fog2xCTDs94ZT8cZbWEjFZmOWfT1VXlZDIVopIporj5Qe6IgrLTiCWL61Yko5h5nFnPZ4mpjf+0w==", + "requires": { + "@sentry/types": "6.2.0", + "@sentry/utils": "6.2.0", + "localforage": "^1.8.1", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "@sentry/minimal": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.1.0.tgz", @@ -1756,6 +1774,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -2010,6 +2033,14 @@ "type-check": "~0.4.0" } }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "requires": { + "immediate": "~3.0.5" + } + }, "lit-analyzer": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/lit-analyzer/-/lit-analyzer-1.2.1.tgz", @@ -2191,6 +2222,14 @@ "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.3.0.tgz", "integrity": "sha512-0Q1bwmaFH9O14vycPHw8C/IeHMk/uSDldVLIefu/kfbTBGIc44KGH6A8p1bDfxUfHdc8q6Ct7kQklWoHgr4t1Q==" }, + "localforage": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.9.0.tgz", + "integrity": "sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g==", + "requires": { + "lie": "3.1.1" + } + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", diff --git a/web/package.json b/web/package.json index 795e7404f..32e2d06e0 100644 --- a/web/package.json +++ b/web/package.json @@ -14,7 +14,8 @@ "@patternfly/patternfly": "^4.80.3", "@sentry/browser": "^6.1.0", "@sentry/tracing": "^6.1.0", - "@types/chart.js": "^2.9.30", + "@sentry/integrations": "^6.2.0", + "@types/chart.js": "^2.9.31", "@types/codemirror": "0.0.108", "chart.js": "^2.9.4", "codemirror": "^5.59.2", diff --git a/web/src/api/Config.ts b/web/src/api/Config.ts index 7e28086a5..c5066ed7e 100644 --- a/web/src/api/Config.ts +++ b/web/src/api/Config.ts @@ -3,6 +3,7 @@ import * as Sentry from "@sentry/browser"; import { Integrations } from "@sentry/tracing"; import { VERSION } from "../constants"; import { SentryIgnoredError } from "../common/errors"; +import { CaptureConsole as CaptureConsoleIntegration } from "@sentry/integrations"; export class Config { branding_logo: string; @@ -22,7 +23,10 @@ export class Config { Sentry.init({ dsn: "https://a579bb09306d4f8b8d8847c052d3a1d3@sentry.beryju.org/8", release: `authentik@${VERSION}`, - integrations: [new Integrations.BrowserTracing()], + integrations: [ + new Integrations.BrowserTracing(), + new CaptureConsoleIntegration(), + ], tracesSampleRate: 0.6, environment: config.error_reporting_environment, beforeSend(event: Sentry.Event, hint: Sentry.EventHint) { From 9c73e9cf4eb85e30fdf1194251f34743e02f7477 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 17:26:20 +0100 Subject: [PATCH 10/12] web: fix colourstyles not being included in common_styles # Conflicts: # authentik/events/geo.py # web/src/elements/buttons/TokenCopyButton.ts --- web/src/common/styles.ts | 28 ++++++++++++++++++--- web/src/constants.ts | 23 ----------------- web/src/elements/buttons/SpinnerButton.ts | 3 ++- web/src/elements/buttons/TokenCopyButton.ts | 3 ++- web/src/elements/cards/AggregateCard.ts | 3 +-- web/src/elements/router/RouterOutlet.ts | 2 -- 6 files changed, 30 insertions(+), 32 deletions(-) diff --git a/web/src/common/styles.ts b/web/src/common/styles.ts index 41ec8d363..0480da4a6 100644 --- a/web/src/common/styles.ts +++ b/web/src/common/styles.ts @@ -1,3 +1,4 @@ +import { css, CSSResult } from "lit-element"; // @ts-ignore import PF from "@patternfly/patternfly/patternfly.css"; // @ts-ignore @@ -6,10 +7,31 @@ import PFAddons from "@patternfly/patternfly/patternfly-addons.css"; import FA from "@fortawesome/fontawesome-free/css/fontawesome.css"; // @ts-ignore import AKGlobal from "../authentik.css"; -import { CSSResult } from "lit-element"; // @ts-ignore import CodeMirrorStyle from "codemirror/lib/codemirror.css"; // @ts-ignore import CodeMirrorTheme from "codemirror/theme/monokai.css"; - -export const COMMON_STYLES: CSSResult[] = [PF, PFAddons, FA, AKGlobal, CodeMirrorStyle, CodeMirrorTheme]; +export const ColorStyles = css` + .pf-m-success { + color: var(--pf-global--success-color--100); + } + .pf-c-button.pf-m-success { + color: var(--pf-c-button--m-primary--Color); + background-color: var(--pf-global--success-color--100); + } + .pf-m-warning { + color: var(--pf-global--warning-color--100); + } + .pf-c-button.pf-m-warning { + color: var(--pf-c-button--m-primary--Color); + background-color: var(--pf-global--warning-color--100); + } + .pf-m-danger { + color: var(--pf-global--danger-color--100); + } + .pf-c-button.pf-m-danger { + color: var(--pf-c-button--m-primary--Color); + background-color: var(--pf-global--danger-color--100); + } +`; +export const COMMON_STYLES: CSSResult[] = [PF, PFAddons, FA, AKGlobal, CodeMirrorStyle, CodeMirrorTheme, ColorStyles]; diff --git a/web/src/constants.ts b/web/src/constants.ts index 73871e963..f91ede3be 100644 --- a/web/src/constants.ts +++ b/web/src/constants.ts @@ -5,27 +5,4 @@ export const SUCCESS_CLASS = "pf-m-success"; export const ERROR_CLASS = "pf-m-danger"; export const PROGRESS_CLASS = "pf-m-in-progress"; export const CURRENT_CLASS = "pf-m-current"; -export const ColorStyles = css` - .pf-m-success { - color: var(--pf-global--success-color--100); - } - .pf-c-button.pf-m-success { - color: var(--pf-c-button--m-primary--Color); - background-color: var(--pf-global--success-color--100); - } - .pf-m-warning { - color: var(--pf-global--warning-color--100); - } - .pf-c-button.pf-m-warning { - color: var(--pf-c-button--m-primary--Color); - background-color: var(--pf-global--warning-color--100); - } - .pf-m-danger { - color: var(--pf-global--danger-color--100); - } - .pf-c-button.pf-m-danger { - color: var(--pf-c-button--m-primary--Color); - background-color: var(--pf-global--danger-color--100); - } -`; export const VERSION = "2021.2.5-stable"; diff --git a/web/src/elements/buttons/SpinnerButton.ts b/web/src/elements/buttons/SpinnerButton.ts index 99aca32fa..206aa9442 100644 --- a/web/src/elements/buttons/SpinnerButton.ts +++ b/web/src/elements/buttons/SpinnerButton.ts @@ -5,7 +5,8 @@ import GlobalsStyle from "@patternfly/patternfly/base/patternfly-globals.css"; import ButtonStyle from "@patternfly/patternfly/components/Button/button.css"; // @ts-ignore import SpinnerStyle from "@patternfly/patternfly/components/Spinner/spinner.css"; -import { ColorStyles, PRIMARY_CLASS, PROGRESS_CLASS } from "../../constants"; +import { PRIMARY_CLASS, PROGRESS_CLASS } from "../../constants"; +import { ColorStyles } from "../../common/styles"; @customElement("ak-spinner-button") export class SpinnerButton extends LitElement { diff --git a/web/src/elements/buttons/TokenCopyButton.ts b/web/src/elements/buttons/TokenCopyButton.ts index 5b68818e0..46c7880b0 100644 --- a/web/src/elements/buttons/TokenCopyButton.ts +++ b/web/src/elements/buttons/TokenCopyButton.ts @@ -4,7 +4,8 @@ import GlobalsStyle from "@patternfly/patternfly/base/patternfly-globals.css"; // @ts-ignore import ButtonStyle from "@patternfly/patternfly/components/Button/button.css"; import { tokenByIdentifier } from "../../api/Tokens"; -import { ColorStyles, ERROR_CLASS, PRIMARY_CLASS, SUCCESS_CLASS } from "../../constants"; +import { ERROR_CLASS, PRIMARY_CLASS, SUCCESS_CLASS } from "../../constants"; +import { ColorStyles } from "../../common/styles"; @customElement("ak-token-copy-button") export class TokenCopyButton extends LitElement { diff --git a/web/src/elements/cards/AggregateCard.ts b/web/src/elements/cards/AggregateCard.ts index 4f21daf5f..101114df0 100644 --- a/web/src/elements/cards/AggregateCard.ts +++ b/web/src/elements/cards/AggregateCard.ts @@ -2,7 +2,6 @@ import { gettext } from "django"; import { css, CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; import { ifDefined } from "lit-html/directives/if-defined"; import { COMMON_STYLES } from "../../common/styles"; -import { ColorStyles } from "../../constants"; @customElement("ak-aggregate-card") export class AggregateCard extends LitElement { @@ -25,7 +24,7 @@ export class AggregateCard extends LitElement { text-align: center; color: var(--pf-global--Color--100); } - `, ColorStyles]); + `]); } renderInner(): TemplateResult { diff --git a/web/src/elements/router/RouterOutlet.ts b/web/src/elements/router/RouterOutlet.ts index e817ab306..5ce82f2f6 100644 --- a/web/src/elements/router/RouterOutlet.ts +++ b/web/src/elements/router/RouterOutlet.ts @@ -3,7 +3,6 @@ import { css, CSSResult, customElement, html, LitElement, property, TemplateResu import CodeMirrorStyle from "codemirror/lib/codemirror.css"; // @ts-ignore import CodeMirrorTheme from "codemirror/theme/monokai.css"; -import { ColorStyles } from "../../constants"; import { COMMON_STYLES } from "../../common/styles"; import { Route } from "./Route"; import { ROUTES } from "../../routes"; @@ -23,7 +22,6 @@ export class RouterOutlet extends LitElement { return [ CodeMirrorStyle, CodeMirrorTheme, - ColorStyles, css` :host { height: 100vh; From c20856ca175cb6bb1f4e5419aa8a7315286b7f4e Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 17:26:20 +0100 Subject: [PATCH 11/12] web: fix colourstyles not being included in common_styles # Conflicts: # authentik/events/geo.py # web/src/elements/buttons/TokenCopyButton.ts --- authentik/policies/forms.py | 4 ---- web/src/constants.ts | 2 -- 2 files changed, 6 deletions(-) diff --git a/authentik/policies/forms.py b/authentik/policies/forms.py index f4c4eeddb..b737ec817 100644 --- a/authentik/policies/forms.py +++ b/authentik/policies/forms.py @@ -2,7 +2,6 @@ from django import forms -from authentik.core.models import Group from authentik.lib.widgets import GroupedModelChoiceField from authentik.policies.models import Policy, PolicyBinding, PolicyBindingModel @@ -20,9 +19,6 @@ class PolicyBindingForm(forms.ModelForm): policy = GroupedModelChoiceField( queryset=Policy.objects.all().select_subclasses(), ) - group = forms.ModelChoiceField( - queryset=Group.objects.all().order_by("name"), required=False - ) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/web/src/constants.ts b/web/src/constants.ts index f91ede3be..9079f262a 100644 --- a/web/src/constants.ts +++ b/web/src/constants.ts @@ -1,5 +1,3 @@ -import { css } from "lit-element"; - export const PRIMARY_CLASS = "pf-m-primary"; export const SUCCESS_CLASS = "pf-m-success"; export const ERROR_CLASS = "pf-m-danger"; From 5725e543347e15b42e0934b8948eece95ad972f8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 18:16:46 +0100 Subject: [PATCH 12/12] release: 2021.2.6-stable --- .bumpversion.cfg | 2 +- .github/workflows/release.yml | 14 +++++++------- authentik/__init__.py | 2 +- docker-compose.yml | 6 +++--- helm/Chart.yaml | 2 +- helm/README.md | 2 +- helm/values.yaml | 2 +- outpost/pkg/version.go | 2 +- web/src/constants.ts | 2 +- website/docs/installation/docker-compose.md | 2 +- website/docs/installation/kubernetes.md | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e7986c0b4..22f347b91 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2021.2.5-stable +current_version = 2021.2.6-stable tag = True commit = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)\-(?P.*) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a6bda5f2..2d15d880a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,11 @@ jobs: - name: Building Docker Image run: docker build --no-cache - -t beryju/authentik:2021.2.5-stable + -t beryju/authentik:2021.2.6-stable -t beryju/authentik:latest -f Dockerfile . - name: Push Docker Container to Registry (versioned) - run: docker push beryju/authentik:2021.2.5-stable + run: docker push beryju/authentik:2021.2.6-stable - name: Push Docker Container to Registry (latest) run: docker push beryju/authentik:latest build-proxy: @@ -48,11 +48,11 @@ jobs: cd outpost/ docker build \ --no-cache \ - -t beryju/authentik-proxy:2021.2.5-stable \ + -t beryju/authentik-proxy:2021.2.6-stable \ -t beryju/authentik-proxy:latest \ -f proxy.Dockerfile . - name: Push Docker Container to Registry (versioned) - run: docker push beryju/authentik-proxy:2021.2.5-stable + run: docker push beryju/authentik-proxy:2021.2.6-stable - name: Push Docker Container to Registry (latest) run: docker push beryju/authentik-proxy:latest build-static: @@ -69,11 +69,11 @@ jobs: cd web/ docker build \ --no-cache \ - -t beryju/authentik-static:2021.2.5-stable \ + -t beryju/authentik-static:2021.2.6-stable \ -t beryju/authentik-static:latest \ -f Dockerfile . - name: Push Docker Container to Registry (versioned) - run: docker push beryju/authentik-static:2021.2.5-stable + run: docker push beryju/authentik-static:2021.2.6-stable - name: Push Docker Container to Registry (latest) run: docker push beryju/authentik-static:latest test-release: @@ -107,5 +107,5 @@ jobs: SENTRY_PROJECT: authentik SENTRY_URL: https://sentry.beryju.org with: - tagName: 2021.2.5-stable + tagName: 2021.2.6-stable environment: beryjuorg-prod diff --git a/authentik/__init__.py b/authentik/__init__.py index 404535b55..9f460cf94 100644 --- a/authentik/__init__.py +++ b/authentik/__init__.py @@ -1,2 +1,2 @@ """authentik""" -__version__ = "2021.2.5-stable" +__version__ = "2021.2.6-stable" diff --git a/docker-compose.yml b/docker-compose.yml index d2cac481a..c5e7fa808 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: networks: - internal server: - image: beryju/authentik:${AUTHENTIK_TAG:-2021.2.5-stable} + image: beryju/authentik:${AUTHENTIK_TAG:-2021.2.6-stable} command: server environment: AUTHENTIK_REDIS__HOST: redis @@ -45,7 +45,7 @@ services: env_file: - .env worker: - image: beryju/authentik:${AUTHENTIK_TAG:-2021.2.5-stable} + image: beryju/authentik:${AUTHENTIK_TAG:-2021.2.6-stable} command: worker networks: - internal @@ -62,7 +62,7 @@ services: env_file: - .env static: - image: beryju/authentik-static:${AUTHENTIK_TAG:-2021.2.5-stable} + image: beryju/authentik-static:${AUTHENTIK_TAG:-2021.2.6-stable} networks: - internal labels: diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 5ce17b47b..92da0cb75 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -4,7 +4,7 @@ name: authentik home: https://goauthentik.io sources: - https://github.com/BeryJu/authentik -version: "2021.2.5-stable" +version: "2021.2.6-stable" icon: https://raw.githubusercontent.com/BeryJu/authentik/master/web/icons/icon.svg dependencies: - name: postgresql diff --git a/helm/README.md b/helm/README.md index a4e84634a..d60018fa5 100644 --- a/helm/README.md +++ b/helm/README.md @@ -4,7 +4,7 @@ |-----------------------------------|-------------------------|-------------| | image.name | beryju/authentik | Image used to run the authentik server and worker | | image.name_static | beryju/authentik-static | Image used to run the authentik static server (CSS and JS Files) | -| image.tag | 2021.2.5-stable | Image tag | +| image.tag | 2021.2.6-stable | Image tag | | image.pullPolicy | IfNotPresent | Image Pull Policy used for all deployments | | serverReplicas | 1 | Replicas for the Server deployment | | workerReplicas | 1 | Replicas for the Worker deployment | diff --git a/helm/values.yaml b/helm/values.yaml index 6702fa10a..cb465fe28 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -5,7 +5,7 @@ image: name: beryju/authentik name_static: beryju/authentik-static name_outposts: beryju/authentik # Prefix used for Outpost deployments, Outpost type and version is appended - tag: 2021.2.5-stable + tag: 2021.2.6-stable pullPolicy: IfNotPresent serverReplicas: 1 diff --git a/outpost/pkg/version.go b/outpost/pkg/version.go index 965cd8646..4fa302eb2 100644 --- a/outpost/pkg/version.go +++ b/outpost/pkg/version.go @@ -1,3 +1,3 @@ package pkg -const VERSION = "2021.2.5-stable" +const VERSION = "2021.2.6-stable" diff --git a/web/src/constants.ts b/web/src/constants.ts index 9079f262a..a7c83cadc 100644 --- a/web/src/constants.ts +++ b/web/src/constants.ts @@ -3,4 +3,4 @@ export const SUCCESS_CLASS = "pf-m-success"; export const ERROR_CLASS = "pf-m-danger"; export const PROGRESS_CLASS = "pf-m-in-progress"; export const CURRENT_CLASS = "pf-m-current"; -export const VERSION = "2021.2.5-stable"; +export const VERSION = "2021.2.6-stable"; diff --git a/website/docs/installation/docker-compose.md b/website/docs/installation/docker-compose.md index 639d592e0..c2b6e3d70 100644 --- a/website/docs/installation/docker-compose.md +++ b/website/docs/installation/docker-compose.md @@ -15,7 +15,7 @@ Download the latest `docker-compose.yml` from [here](https://raw.githubuserconte To optionally enable error-reporting, run `echo AUTHENTIK_ERROR_REPORTING__ENABLED=true >> .env` -To optionally deploy a different version run `echo AUTHENTIK_TAG=2021.2.5-stable >> .env` +To optionally deploy a different version run `echo AUTHENTIK_TAG=2021.2.6-stable >> .env` If this is a fresh authentik install run the following commands to generate a password: diff --git a/website/docs/installation/kubernetes.md b/website/docs/installation/kubernetes.md index ae3300f2b..2fef1bc2c 100644 --- a/website/docs/installation/kubernetes.md +++ b/website/docs/installation/kubernetes.md @@ -24,7 +24,7 @@ image: name: beryju/authentik name_static: beryju/authentik-static name_outposts: beryju/authentik # Prefix used for Outpost deployments, Outpost type and version is appended - tag: 2021.2.5-stable + tag: 2021.2.6-stable serverReplicas: 1 workerReplicas: 1