diff --git a/Makefile b/Makefile index b5ee0fe50..b8002b6a8 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +.SHELLFLAGS += -x -e +PWD = $(shell pwd) + all: lint-fix lint test gen test-integration: @@ -24,6 +27,14 @@ lint: gen: ./manage.py generate_swagger -o swagger.yaml -f yaml + docker run \ + --rm -v ${PWD}:/local \ + openapitools/openapi-generator-cli generate \ + -i /local/swagger.yaml \ + -g typescript-fetch \ + -o /local/web/api \ + --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0 + cd web/api && npx tsc local-stack: export AUTHENTIK_TAG=testing diff --git a/authentik/providers/proxy/api.py b/authentik/providers/proxy/api.py index 7b6c7bf76..c729d1241 100644 --- a/authentik/providers/proxy/api.py +++ b/authentik/providers/proxy/api.py @@ -33,6 +33,8 @@ class OpenIDConnectConfigurationSerializer(PassiveSerializer): class ProxyProviderSerializer(ProviderSerializer): """ProxyProvider Serializer""" + redirect_uris = CharField(read_only=True) + def validate(self, attrs) -> dict[Any, str]: """Check that internal_host is set when forward_auth_mode is disabled""" if ( @@ -67,6 +69,7 @@ class ProxyProviderSerializer(ProviderSerializer): "basic_auth_password_attribute", "basic_auth_user_attribute", "forward_auth_mode", + "redirect_uris", ] diff --git a/swagger.yaml b/swagger.yaml index ff7727e20..296b4d628 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -17498,6 +17498,11 @@ definitions: description: Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. type: boolean + redirect_uris: + title: Redirect uris + type: string + readOnly: true + minLength: 1 SAMLProvider: required: - name diff --git a/web/src/pages/providers/proxy/ProxyProviderForm.ts b/web/src/pages/providers/proxy/ProxyProviderForm.ts index 80af18752..adb3412bb 100644 --- a/web/src/pages/providers/proxy/ProxyProviderForm.ts +++ b/web/src/pages/providers/proxy/ProxyProviderForm.ts @@ -125,7 +125,7 @@ export class ProxyProviderFormPage extends ModelForm { ?required=${true} name="externalHost"> -

${t`The external URL you'll access the outpost at.`}

+

${t`The external URL you'll access the application at`}

diff --git a/web/src/pages/providers/proxy/ProxyProviderViewPage.ts b/web/src/pages/providers/proxy/ProxyProviderViewPage.ts index 16305ab74..6c65b5fb2 100644 --- a/web/src/pages/providers/proxy/ProxyProviderViewPage.ts +++ b/web/src/pages/providers/proxy/ProxyProviderViewPage.ts @@ -6,8 +6,7 @@ import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css"; -import PFSizing from "@patternfly/patternfly/utilities/Sizing/sizing.css"; -import PFFlex from "@patternfly/patternfly/utilities/Flex/flex.css"; +import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css"; import PFDisplay from "@patternfly/patternfly/utilities/Display/display.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import AKGlobal from "../../../authentik.css"; @@ -22,6 +21,7 @@ import "./ProxyProviderForm"; import { ProvidersApi, ProxyProvider } from "authentik-api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; +import { until } from "lit-html/directives/until"; @customElement("ak-provider-proxy-view") export class ProxyProviderViewPage extends LitElement { @@ -42,7 +42,7 @@ export class ProxyProviderViewPage extends LitElement { provider?: ProxyProvider; static get styles(): CSSResult[] { - return [PFBase, PFButton, PFPage, PFFlex, PFDisplay, PFGallery, PFContent, PFCard, PFDescriptionList, PFSizing, AKGlobal]; + return [PFBase, PFButton, PFPage, PFGrid, PFGallery, PFContent, PFCard, PFDescriptionList, AKGlobal]; } constructor() { @@ -59,8 +59,8 @@ export class ProxyProviderViewPage extends LitElement { } return html`
-
-
+
+
@@ -115,6 +115,23 @@ export class ProxyProviderViewPage extends LitElement {
+
+
+ ${t`Forward auth`} +
+
+
+ ${this.provider.forwardAuthMode ? + html` +   + ${t`Yes`}`: + html` +   + ${t`No`}` + } +
+
+
+
+
+
+ ${t`Protocol Settings`} +
+
+
+
+
+ ${t`Allowed Redirect URIs`} +
+
+
+ ${this.provider.redirectUris} +
+
+
+
+
+
+