From ea60c389bede1184776eccc2095f69c29edea5ad Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 30 Jun 2022 22:18:21 +0200 Subject: [PATCH] providers/saml: include SSO Binding URLs in Provider API closes #3179 Signed-off-by: Jens Langhammer --- Makefile | 4 +- authentik/providers/saml/api.py | 56 ++++- locale/en/LC_MESSAGES/django.po | 6 +- schema.yml | 16 +- web/src/locales/de.po | 28 ++- web/src/locales/en.po | 28 ++- web/src/locales/es.po | 28 ++- web/src/locales/fr_FR.po | 28 ++- web/src/locales/pl.po | 28 ++- web/src/locales/pseudo-LOCALE.po | 28 ++- web/src/locales/tr.po | 28 ++- web/src/locales/zh-Hans.po | 28 ++- web/src/locales/zh-Hant.po | 28 ++- web/src/locales/zh_TW.po | 28 ++- .../pages/providers/saml/SAMLProviderForm.ts | 1 + .../providers/saml/SAMLProviderViewPage.ts | 199 ++++++++++++------ 16 files changed, 471 insertions(+), 91 deletions(-) diff --git a/Makefile b/Makefile index 734b6e0da..9dd9a461d 100644 --- a/Makefile +++ b/Makefile @@ -71,9 +71,9 @@ gen-client-web: -o /local/gen-ts-api \ --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} mkdir -p web/node_modules/@goauthentik/api - ln -fs scripts/web_api_readme.md gen-ts-api/README.md + \cp -fv scripts/web_api_readme.md gen-ts-api/README.md cd gen-ts-api && npm i - ln -fs gen-ts-api web/node_modules/@goauthentik/api + \cp -rfv gen-ts-api/* web/node_modules/@goauthentik/api gen-client-go: wget https://raw.githubusercontent.com/goauthentik/client-go/main/config.yaml -O config.yaml diff --git a/authentik/providers/saml/api.py b/authentik/providers/saml/api.py index 1658fd02c..70a86a8cf 100644 --- a/authentik/providers/saml/api.py +++ b/authentik/providers/saml/api.py @@ -2,6 +2,7 @@ from xml.etree.ElementTree import ParseError # nosec from defusedxml.ElementTree import fromstring +from django.http import HttpRequest from django.http.response import Http404, HttpResponse from django.shortcuts import get_object_or_404 from django.urls import reverse @@ -44,14 +45,58 @@ LOGGER = get_logger() class SAMLProviderSerializer(ProviderSerializer): """SAMLProvider Serializer""" - metadata_download_url = SerializerMethodField() + url_download_metadata = SerializerMethodField() - def get_metadata_download_url(self, instance: SAMLProvider) -> str: + url_sso_post = SerializerMethodField() + url_sso_redirect = SerializerMethodField() + url_sso_init = SerializerMethodField() + + def get_url_download_metadata(self, instance: SAMLProvider) -> str: """Get metadata download URL""" - return ( + request: HttpRequest = self._context["request"]._request + return request.build_absolute_uri( reverse("authentik_api:samlprovider-metadata", kwargs={"pk": instance.pk}) + "?download" ) + def get_url_sso_post(self, instance: SAMLProvider) -> str: + """Get SSO Post URL""" + request: HttpRequest = self._context["request"]._request + try: + return request.build_absolute_uri( + reverse( + "authentik_providers_saml:sso-post", + kwargs={"application_slug": instance.application.slug}, + ) + ) + except Provider.application.RelatedObjectDoesNotExist: # pylint: disable=no-member + return "-" + + def get_url_sso_redirect(self, instance: SAMLProvider) -> str: + """Get SSO Redirect URL""" + request: HttpRequest = self._context["request"]._request + try: + return request.build_absolute_uri( + reverse( + "authentik_providers_saml:sso-redirect", + kwargs={"application_slug": instance.application.slug}, + ) + ) + except Provider.application.RelatedObjectDoesNotExist: # pylint: disable=no-member + return "-" + + def get_url_sso_init(self, instance: SAMLProvider) -> str: + """Get SSO IDP-Initiated URL""" + request: HttpRequest = self._context["request"]._request + try: + return request.build_absolute_uri( + reverse( + "authentik_providers_saml:sso-init", + kwargs={"application_slug": instance.application.slug}, + ) + ) + except Provider.application.RelatedObjectDoesNotExist: # pylint: disable=no-member + return "-" + class Meta: model = SAMLProvider @@ -69,7 +114,10 @@ class SAMLProviderSerializer(ProviderSerializer): "signing_kp", "verification_kp", "sp_binding", - "metadata_download_url", + "url_download_metadata", + "url_sso_post", + "url_sso_redirect", + "url_sso_init", ] diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index b793aecee..1f75ef273 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-26 11:48+0000\n" +"POT-Creation-Date: 2022-06-30 20:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -895,11 +895,11 @@ msgstr "" msgid "Proxy Providers" msgstr "" -#: authentik/providers/saml/api.py:177 +#: authentik/providers/saml/api.py:225 msgid "Invalid XML Syntax" msgstr "" -#: authentik/providers/saml/api.py:187 +#: authentik/providers/saml/api.py:235 #, python-format msgid "Failed to import Metadata: %(message)s" msgstr "" diff --git a/schema.yml b/schema.yml index a712e9531..73aee7f94 100644 --- a/schema.yml +++ b/schema.yml @@ -29957,7 +29957,16 @@ components: title: Service Provider Binding description: This determines how authentik sends the response back to the Service Provider. - metadata_download_url: + url_download_metadata: + type: string + readOnly: true + url_sso_post: + type: string + readOnly: true + url_sso_redirect: + type: string + readOnly: true + url_sso_init: type: string readOnly: true required: @@ -29967,9 +29976,12 @@ components: - authorization_flow - component - meta_model_name - - metadata_download_url - name - pk + - url_download_metadata + - url_sso_init + - url_sso_post + - url_sso_redirect - verbose_name - verbose_name_plural SAMLProviderImportRequest: diff --git a/web/src/locales/de.po b/web/src/locales/de.po index cc495ab20..263eb8d7c 100644 --- a/web/src/locales/de.po +++ b/web/src/locales/de.po @@ -369,6 +369,10 @@ msgstr "Erlaubt/verweigert Anfragen auf der Grundlage der Reputation der Nutzer msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "Auch bekannt als Entity ID. Standardmäßig wird die Metadaten-URL verwendet." +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "Alternativ kannst Du auch auf diesen Link klicken, wenn Du Duo auf Deinem Gerät installiert hast: " @@ -399,7 +403,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "App-Passwort (kann für die Anmeldung mit einem Ablauf genutzt werden)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1750,6 +1753,7 @@ msgstr "Domain" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "Download" @@ -1762,6 +1766,7 @@ msgstr "Zertifikat herunterladen" msgid "Download Private key" msgstr "Privaten Schlüssel herunterladen" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "Signierzertifikat herunterladen" @@ -1943,6 +1948,10 @@ msgstr "Anmeldung" msgid "Enrollment flow" msgstr "Registrierungsablauf" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "Fehler" @@ -4384,6 +4393,7 @@ msgstr "Regelmäßiger Benutzer" msgid "Related" msgstr "Verwandt" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "Verwandte Objekte" @@ -4517,6 +4527,10 @@ msgstr "" msgid "SAML Attribute Name" msgstr "SAML-Attributsname" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "SAML-Metadaten" @@ -4587,6 +4601,18 @@ msgstr "SMTP Benutzername" msgid "SSO URL" msgstr "SSO URL" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "Für alle Anbieter wird dieselbe Kennung verwendet" diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 9f77b65e6..438d1fca2 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -359,6 +359,10 @@ msgstr "Allows/denys requests based on the users and/or the IPs reputation." msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "Also known as Entity ID. Defaults the Metadata URL." +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "Also known as EntityID." + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "Alternatively, if your current device has Duo installed, click on this link:" @@ -389,7 +393,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "App password (can be used to login using a flow executor)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1775,6 +1778,7 @@ msgstr "Domain" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "Download" @@ -1787,6 +1791,7 @@ msgstr "Download Certificate" msgid "Download Private key" msgstr "Download Private key" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "Download signing certificate" @@ -1975,6 +1980,10 @@ msgstr "Enrollment" msgid "Enrollment flow" msgstr "Enrollment flow" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "EntityID/Issuer" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "Error" @@ -4458,6 +4467,7 @@ msgstr "Regular user" msgid "Related" msgstr "Related" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "Related objects" @@ -4597,6 +4607,10 @@ msgstr "SAML" msgid "SAML Attribute Name" msgstr "SAML Attribute Name" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "SAML Configuration" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "SAML Metadata" @@ -4667,6 +4681,18 @@ msgstr "SMTP Username" msgid "SSO URL" msgstr "SSO URL" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "SSO URL (IdP-initiated Login)" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "SSO URL (Post)" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "SSO URL (Redirect)" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "Same identifier is used for all providers" diff --git a/web/src/locales/es.po b/web/src/locales/es.po index 3bd282de5..2edf801ca 100644 --- a/web/src/locales/es.po +++ b/web/src/locales/es.po @@ -356,6 +356,10 @@ msgstr "Permitir/denegar solicitudes en función de los usuarios y/o la reputaci msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "También se conoce como ID de entidad. Default la URL de metadatos." +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "Como alternativa, si su dispositivo actual tiene instalado Duo, haga clic en este enlace:" @@ -386,7 +390,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "Contraseña de la aplicación (se puede usar para iniciar sesión con un ejecutor de flujo)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1741,6 +1744,7 @@ msgstr "Dominio" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "Descargar" @@ -1753,6 +1757,7 @@ msgstr "Descargar certificado" msgid "Download Private key" msgstr "Descargar clave privada" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "Descargar certificado de firma" @@ -1934,6 +1939,10 @@ msgstr "Inscripción" msgid "Enrollment flow" msgstr "Flujo de inscripción" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "Error" @@ -4377,6 +4386,7 @@ msgstr "Usuario habitual" msgid "Related" msgstr "Relacionado" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "Objetos relacionados" @@ -4510,6 +4520,10 @@ msgstr "" msgid "SAML Attribute Name" msgstr "Nombre de atributo SAML" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "Metadatos SAML" @@ -4580,6 +4594,18 @@ msgstr "Nombre de usuario SMTP" msgid "SSO URL" msgstr "URL SSO" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "Se usa el mismo identificador para todos los proveedores" diff --git a/web/src/locales/fr_FR.po b/web/src/locales/fr_FR.po index d976182cb..6f5b2bf8d 100644 --- a/web/src/locales/fr_FR.po +++ b/web/src/locales/fr_FR.po @@ -360,6 +360,10 @@ msgstr "Autorise/bloque les requêtes selon la réputation de l'utilisateur et/o msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "Aussi appelé Entity ID. URL de métadonnée par défaut." +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "Sinon, si Duo est installé sur cet appareil, cliquez sur ce lien :" @@ -390,7 +394,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "Mot de passe de l'App (peut être utilisé pour ouvrir une session en utilisant un flux d'exécution)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1758,6 +1761,7 @@ msgstr "Domaine" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "Télécharger" @@ -1770,6 +1774,7 @@ msgstr "Télécharger le certificat" msgid "Download Private key" msgstr "Télécharger la clé privée" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "" @@ -1956,6 +1961,10 @@ msgstr "Inscription" msgid "Enrollment flow" msgstr "Flux d'inscription" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "Erreur" @@ -4420,6 +4429,7 @@ msgstr "Utilisateur normal" msgid "Related" msgstr "Lié" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "" @@ -4558,6 +4568,10 @@ msgstr "" msgid "SAML Attribute Name" msgstr "Nom d'attribut SAML" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "" @@ -4628,6 +4642,18 @@ msgstr "Utilisateur SMTP" msgid "SSO URL" msgstr "URL SSO" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "Le même identifiant est utilisé pour tous les fournisseurs" diff --git a/web/src/locales/pl.po b/web/src/locales/pl.po index ea9fd506a..7bc4f513f 100644 --- a/web/src/locales/pl.po +++ b/web/src/locales/pl.po @@ -356,6 +356,10 @@ msgstr "Zezwala/odrzuca żądania na podstawie reputacji użytkowników i/lub ad msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "Znany również jako Entity ID. Domyślny adres URL metadanych." +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "Alternatywnie, jeśli na Twoim obecnym urządzeniu jest zainstalowany Duo, kliknij ten link:" @@ -386,7 +390,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "Hasło aplikacji (może być użyte do zalogowania się za pomocą executora przepływu)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1738,6 +1741,7 @@ msgstr "Domena" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "Pobierz" @@ -1750,6 +1754,7 @@ msgstr "Pobierz certyfikat" msgid "Download Private key" msgstr "Pobierz klucz prywatny" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "Pobierz certyfikat podpisywania" @@ -1931,6 +1936,10 @@ msgstr "Rejestracja" msgid "Enrollment flow" msgstr "Przepływ rejestracji" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "Błąd" @@ -4374,6 +4383,7 @@ msgstr "Zwykły użytkownik" msgid "Related" msgstr "Związane z" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "Powiązane obiekty" @@ -4507,6 +4517,10 @@ msgstr "" msgid "SAML Attribute Name" msgstr "Nazwa atrybutu SAML" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "Metadane SAML" @@ -4577,6 +4591,18 @@ msgstr "Nazwa użytkownika SMTP" msgid "SSO URL" msgstr "SSO URL" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "Ten sam identyfikator jest używany dla wszystkich dostawców" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index da8f088b6..e3cd1b45a 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -355,6 +355,10 @@ msgstr "" msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "" +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "" @@ -385,7 +389,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1761,6 +1764,7 @@ msgstr "" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "" @@ -1773,6 +1777,7 @@ msgstr "" msgid "Download Private key" msgstr "" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "" @@ -1961,6 +1966,10 @@ msgstr "" msgid "Enrollment flow" msgstr "" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "" @@ -4438,6 +4447,7 @@ msgstr "" msgid "Related" msgstr "" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "" @@ -4577,6 +4587,10 @@ msgstr "" msgid "SAML Attribute Name" msgstr "" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "" @@ -4647,6 +4661,18 @@ msgstr "" msgid "SSO URL" msgstr "" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "" diff --git a/web/src/locales/tr.po b/web/src/locales/tr.po index 8b23d8888..380cfe25d 100644 --- a/web/src/locales/tr.po +++ b/web/src/locales/tr.po @@ -356,6 +356,10 @@ msgstr "Kullanıcıların ve/veya IP'lerin itibarına göre isteklere izin ver/r msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "Entity ID olarak da bilinir. Metadata URL'sine varsayılan olarak ayarlanır." +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "Alternatif olarak, mevcut cihazınızda Duo yüklüyse, şu bağlantıya tıklayın:" @@ -386,7 +390,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "Uygulama parolası (bir akış yürütücüyle giriş yapmak için kullanılabilir)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1741,6 +1744,7 @@ msgstr "Alan Adı" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "Indir" @@ -1753,6 +1757,7 @@ msgstr "Sertifikayı İndirin" msgid "Download Private key" msgstr "Indir Özel anahtar" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "İmzalama sertifikasını indirme" @@ -1934,6 +1939,10 @@ msgstr "Kayıt" msgid "Enrollment flow" msgstr "Kayıt akışı" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "Hata" @@ -4379,6 +4388,7 @@ msgstr "Düzenli kullanıcı" msgid "Related" msgstr "İlgili" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "İlgili nesneler" @@ -4512,6 +4522,10 @@ msgstr "" msgid "SAML Attribute Name" msgstr "SAML Öznitelik Adı" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "SAML Meta Verileri" @@ -4582,6 +4596,18 @@ msgstr "SMTP Kullanıcı Adı" msgid "SSO URL" msgstr "SSO URL" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "Aynı tanımlayıcı tüm sağlayıcılar için kullanılır" diff --git a/web/src/locales/zh-Hans.po b/web/src/locales/zh-Hans.po index 2733706e3..f8389b4b9 100644 --- a/web/src/locales/zh-Hans.po +++ b/web/src/locales/zh-Hans.po @@ -356,6 +356,10 @@ msgstr "根据用户和/或 IP 信誉允许/拒绝请求。" msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "也称为 Entity ID。 默认为元数据 URL。" +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "或者,如果您当前的设备已安装 Duo,请点击此链接:" @@ -386,7 +390,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "应用密码(可用于使用流程执行器登录)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1735,6 +1738,7 @@ msgstr "域名" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "下载" @@ -1747,6 +1751,7 @@ msgstr "下载证书" msgid "Download Private key" msgstr "下载私钥" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "下载签名证书" @@ -1927,6 +1932,10 @@ msgstr "注册" msgid "Enrollment flow" msgstr "注册流程" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "错误" @@ -4349,6 +4358,7 @@ msgstr "普通用户" msgid "Related" msgstr "相关" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "相关对象" @@ -4479,6 +4489,10 @@ msgstr "SAML" msgid "SAML Attribute Name" msgstr "SAML 属性名称" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "SAML 元数据" @@ -4548,6 +4562,18 @@ msgstr "SMTP 用户名" msgid "SSO URL" msgstr "SSO URL" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "所有提供程序都使用相同的标识符" diff --git a/web/src/locales/zh-Hant.po b/web/src/locales/zh-Hant.po index 70ee9f7b8..c4e484c1c 100644 --- a/web/src/locales/zh-Hant.po +++ b/web/src/locales/zh-Hant.po @@ -357,6 +357,10 @@ msgstr "根据用户和/或 IP 信誉允许/拒绝请求。" msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "也称为实体 ID。 默认为 Metadata URL。" +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "或者,如果您当前的设备已安装 Duo,请单击此链接:" @@ -387,7 +391,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "应用程序密码(可用于使用流程执行器登录)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1738,6 +1741,7 @@ msgstr "域" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "下載" @@ -1750,6 +1754,7 @@ msgstr "下载证书" msgid "Download Private key" msgstr "下载私钥" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "下载签名证书" @@ -1930,6 +1935,10 @@ msgstr "注册" msgid "Enrollment flow" msgstr "注册流程" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "错误" @@ -4355,6 +4364,7 @@ msgstr "普通用户" msgid "Related" msgstr "相关" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "相关对象" @@ -4485,6 +4495,10 @@ msgstr "SAML" msgid "SAML Attribute Name" msgstr "SAML 属性名称" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "SAML 元数据" @@ -4554,6 +4568,18 @@ msgstr "SMTP 用户名" msgid "SSO URL" msgstr "SSO 网址" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "所有提供商都使用相同的标识符" diff --git a/web/src/locales/zh_TW.po b/web/src/locales/zh_TW.po index bcf18f87a..c0baf5697 100644 --- a/web/src/locales/zh_TW.po +++ b/web/src/locales/zh_TW.po @@ -357,6 +357,10 @@ msgstr "根据用户和/或 IP 信誉允许/拒绝请求。" msgid "Also known as Entity ID. Defaults the Metadata URL." msgstr "也称为实体 ID。 默认为 Metadata URL。" +#: src/pages/providers/saml/SAMLProviderForm.ts +msgid "Also known as EntityID." +msgstr "" + #: src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts msgid "Alternatively, if your current device has Duo installed, click on this link:" msgstr "或者,如果您当前的设备已安装 Duo,请单击此链接:" @@ -387,7 +391,6 @@ msgid "App password (can be used to login using a flow executor)" msgstr "应用程序密码(可用于使用流程执行器登录)" #: src/elements/user/UserConsentList.ts -#: src/flows/stages/consent/ConsentStage.ts #: src/pages/admin-overview/TopApplicationsTable.ts #: src/pages/providers/ProviderListPage.ts msgid "Application" @@ -1738,6 +1741,7 @@ msgstr "域" #: src/pages/crypto/CertificateKeyPairListPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/sources/saml/SAMLSourceViewPage.ts msgid "Download" msgstr "下載" @@ -1750,6 +1754,7 @@ msgstr "下载证书" msgid "Download Private key" msgstr "下载私钥" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Download signing certificate" msgstr "下载签名证书" @@ -1930,6 +1935,10 @@ msgstr "注册" msgid "Enrollment flow" msgstr "注册流程" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "EntityID/Issuer" +msgstr "" + #: src/pages/system-tasks/SystemTaskListPage.ts msgid "Error" msgstr "错误" @@ -4355,6 +4364,7 @@ msgstr "普通用户" msgid "Related" msgstr "相关" +#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Related objects" msgstr "相关对象" @@ -4485,6 +4495,10 @@ msgstr "SAML" msgid "SAML Attribute Name" msgstr "SAML 属性名称" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SAML Configuration" +msgstr "" + #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "SAML Metadata" msgstr "SAML 元数据" @@ -4554,6 +4568,18 @@ msgstr "SMTP 用户名" msgid "SSO URL" msgstr "SSO 网址" +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (IdP-initiated Login)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Post)" +msgstr "" + +#: src/pages/providers/saml/SAMLProviderViewPage.ts +msgid "SSO URL (Redirect)" +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts msgid "Same identifier is used for all providers" msgstr "所有提供商都使用相同的标识符" diff --git a/web/src/pages/providers/saml/SAMLProviderForm.ts b/web/src/pages/providers/saml/SAMLProviderForm.ts index 77a8489d0..e3571b229 100644 --- a/web/src/pages/providers/saml/SAMLProviderForm.ts +++ b/web/src/pages/providers/saml/SAMLProviderForm.ts @@ -110,6 +110,7 @@ export class SAMLProviderFormPage extends ModelForm { class="pf-c-form-control" required /> +

${t`Also known as EntityID.`}

{ + async renderRelatedObjects(): Promise { if (!this.provider?.signingKp) { return Promise.resolve(html``); } - return new CryptoApi(DEFAULT_CONFIG) - .cryptoCertificatekeypairsRetrieve({ - kpUuid: this.provider.signingKp, - }) - .then((kp) => { - return html`
-
- ${t`Download signing certificate`} -
-
-
- ${t`Download`} +
${t`Related objects`}
+
+
+
+
+ ${t`Download signing certificate`} -
-
-
`; - }); + +
+ +
+ + + + `; } render(): TemplateResult { @@ -178,56 +188,105 @@ export class SAMLProviderViewPage extends LitElement { -
-
- ${t`Related objects`} -
-
-
- ${until(this.renderSigningCert())} -
-
-
+ ${until(this.renderRelatedObjects())} ${ this.provider.assignedApplicationName - ? html`
-
${t`SAML Metadata`}
-
- ${until( - new ProvidersApi(DEFAULT_CONFIG) - .providersSamlMetadataRetrieve({ - id: this.provider.pk || 0, - }) - .then((m) => { - return html``; - }), - )} + ? html`
+
${t`SAML Configuration`}
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
- -
` +
+
${t`SAML Metadata`}
+
+ ${until( + new ProvidersApi(DEFAULT_CONFIG) + .providersSamlMetadataRetrieve({ + id: this.provider.pk || 0, + }) + .then((m) => { + return html``; + }), + )} +
+ +
` : html`` }