diff --git a/web/src/admin/providers/ldap/LDAPProviderForm.ts b/web/src/admin/providers/ldap/LDAPProviderForm.ts
index c1e4d5629..945eb9dec 100644
--- a/web/src/admin/providers/ldap/LDAPProviderForm.ts
+++ b/web/src/admin/providers/ldap/LDAPProviderForm.ts
@@ -13,9 +13,11 @@ import { ifDefined } from "lit/directives/if-defined.js";
import { until } from "lit/directives/until.js";
import {
+ CertificateKeyPair,
CoreApi,
CoreGroupsListRequest,
CryptoApi,
+ CryptoCertificatekeypairsListRequest,
FlowsApi,
FlowsInstancesListDesignationEnum,
Group,
@@ -181,37 +183,37 @@ export class LDAPProviderFormPage extends ModelForm {
-
-
- ---------
-
- ${until(
- new CryptoApi(DEFAULT_CONFIG)
- .cryptoCertificatekeypairsList({
- ordering: "name",
- hasKey: true,
- includeDetails: false,
- })
- .then((keys) => {
- return keys.results.map((key) => {
- return html`
- ${key.name}
- `;
- });
- }),
- html`
- ${t`Loading...`}
- `,
- )}
-
+ => {
+ const args: CryptoCertificatekeypairsListRequest = {
+ ordering: "name",
+ hasKey: true,
+ includeDetails: false,
+ };
+ if (query !== undefined) {
+ args.search = query;
+ }
+ const certificates = await new CryptoApi(
+ DEFAULT_CONFIG,
+ ).cryptoCertificatekeypairsList(args);
+ return certificates.results;
+ }}
+ .renderElement=${(item: CertificateKeyPair): string => {
+ return item.name;
+ }}
+ .value=${(item: CertificateKeyPair | undefined): string | undefined => {
+ return item?.pk;
+ }}
+ .selected=${(item: CertificateKeyPair): boolean => {
+ return item.pk === this.instance?.certificate;
+ }}
+ ?blankable=${true}
+ >
+
- ${t`Due to protocol limitations, this certificate is only used when the outpost has a single provider.`}
+ ${t`Due to protocol limitations, this certificate is only used when the outpost has a single provider, or all providers use the same certificate.`}
${t`If multiple providers share an outpost, a self-signed certificate is used.`}
diff --git a/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts b/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts
index 107ef5b2a..57da744f4 100644
--- a/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts
+++ b/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts
@@ -14,8 +14,10 @@ import { ifDefined } from "lit/directives/if-defined.js";
import { until } from "lit/directives/until.js";
import {
+ CertificateKeyPair,
ClientTypeEnum,
CryptoApi,
+ CryptoCertificatekeypairsListRequest,
Flow,
FlowsApi,
FlowsInstancesListDesignationEnum,
@@ -186,39 +188,42 @@ ${this.instance?.redirectUris}
-
-
- ---------
-
- ${until(
- new CryptoApi(DEFAULT_CONFIG)
- .cryptoCertificatekeypairsList({
- ordering: "name",
- hasKey: true,
- includeDetails: false,
- })
- .then((keys) => {
- return keys.results.map((key) => {
- let selected = this.instance?.signingKey === key.pk;
- if (!this.instance && keys.results.length === 1) {
- selected = true;
- }
- return html`
- ${key.name}
- `;
- });
- }),
- html`
- ${t`Loading...`}
- `,
- )}
-
+ => {
+ const args: CryptoCertificatekeypairsListRequest = {
+ ordering: "name",
+ hasKey: true,
+ includeDetails: false,
+ };
+ if (query !== undefined) {
+ args.search = query;
+ }
+ const certificates = await new CryptoApi(
+ DEFAULT_CONFIG,
+ ).cryptoCertificatekeypairsList(args);
+ return certificates.results;
+ }}
+ .renderElement=${(item: CertificateKeyPair): string => {
+ return item.name;
+ }}
+ .value=${(item: CertificateKeyPair | undefined): string | undefined => {
+ return item?.pk;
+ }}
+ .selected=${(
+ item: CertificateKeyPair,
+ items: CertificateKeyPair[],
+ ): boolean => {
+ let selected = this.instance?.signingKey === item.pk;
+ if (!this.instance && items.length === 1) {
+ selected = true;
+ }
+ return selected;
+ }}
+ ?blankable=${true}
+ >
+
${t`Key used to sign the tokens.`}
diff --git a/web/src/admin/providers/proxy/ProxyProviderForm.ts b/web/src/admin/providers/proxy/ProxyProviderForm.ts
index d55de90a5..8e9c0b449 100644
--- a/web/src/admin/providers/proxy/ProxyProviderForm.ts
+++ b/web/src/admin/providers/proxy/ProxyProviderForm.ts
@@ -1,6 +1,7 @@
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { first } from "@goauthentik/common/utils";
import "@goauthentik/elements/SearchSelect";
+import "@goauthentik/elements/SearchSelect";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
@@ -20,7 +21,9 @@ import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-
import PFSpacing from "@patternfly/patternfly/utilities/Spacing/spacing.css";
import {
+ CertificateKeyPair,
CryptoApi,
+ CryptoCertificatekeypairsListRequest,
Flow,
FlowsApi,
FlowsInstancesListDesignationEnum,
@@ -346,35 +349,35 @@ export class ProxyProviderFormPage extends ModelForm {
${t`Advanced protocol settings`}