web/admin: revise wizard form handling (#7331)

* web: break circular dependency between AKElement & Interface.

This commit changes the way the root node of the web application shell is
discovered by child components, such that the base class shared by both
no longer results in a circular dependency between the two models.

I've run this in isolation and have seen no failures of discovery; the identity
token exists as soon as the Interface is constructed and is found by every item
on the page.

* web: fix broken typescript references

This built... and then it didn't?  Anyway, the current fix is to
provide type information the AkInterface for the data that consumers
require.

* web: extract the form processing from the form submission process

Our forms have a lot of customized value handling, and the function `serializeForm` takes
our input structures and creates a JSON object ready for submission across the wire for
the various models provided by the API.

That function was embedded in the `ak-form` object, but it has no actual dependencies on
the state of that object; aside from identifying the input elements, which is done at the
very start of processing, this large block of code stands alone.  Separating out the
"processing the form" from "identifying the form" allows us to customize our form handling
and preserve form information on the client for transactional purposes such as our wizard.

w

* web: multi-select, but there's a styling issue.

* web: provide a closed control for multi-select

This commit creates a new control, using the ak-form-element-horizontal as a *CLOSED*
object, for our multi-select.  This control right now is limited to what we expect to
be using in the wizard, but that doesn't mean it can't be smarter in the future.

* web: hung up by a silly spelling error

* web: update the form-handling method

With the `serializeForm` method extracted, it's much easier to examine and parse
every *form* with every keystroke, preserving them against the changes that
happen as the customer navigates the Wizard.  With that in place, it became
straightforward to retrofit the "handle changes to the application, to the provider, and to the providerType"
into the three pages of the wizard, and to provide *all* of the form elements in a base class
such that no specialized handling needs to happen to any of the child pages.

Fixed an ugly typo in the oauth2 provider, as well.

* web: wizard should work with multi-select and should reflect default values

(Note: This commit is predicated on both the "Extract serializeForm function from Form.ts" and
"Provide a controlled multi-select input control" PRs.)

The initial attempt at the wizard was woefully naive in its implementation, missing some critical
details along the way.  This revision starts off with one stronger assumption: trust that Jens knows
what he's doing, and knew what he was building when he wrote the initial `Form` handler.

The problem with the `Form` handler, and the reason I avoided it, was simply that it does too many
things, especially in its ModelForm variant: it receives a model from the back-end, renders a
(hand-written) form for that model, allows the user to interact with that model, and facilitates
saving it to the back-end again, complete with on-page notifications of success or failure.

The Wizard could not use all of that. It needs to gather the information for *two* models (an
Application and a Provider, plus the ProviderType) and has a new and specialized end-point for a
transaction that allows the committing or roll back of both models to happen simultaneously,
predicated on success or failure respectively.

With "Extract `serializeForm` completed, it was possible to repurpose the forms that already
existed, stripping them down to just their input components, and eventing the entire thing in a
single event loop of "events flow up, data flows down." In this case, the *entire form* is
serialized on a per-event basis and pushed up the to the orchestration layer, which saves them off.
Writing a parent `BasePanel` class that has accessors for `formValues` and `valid` means that the
state of every page is accessible with a simple query. This simplified the `BaseProviderPanel` class
to just specialize the `dispatchUpdate` method to send the wizard update with the new provider
information filled out.

Because the *form* is being treated as the source of truth about the state of a `Partial<Application>`
or `Partial<*Provider>` object, the defaults are now being captured as expected.

Likewise, this simplified the `providerCache` layer which preserves customer input in the event that
the customer starts filling out the wrong provider to a simple conditional clause in the
orchestrator. The Wizard has much fewer smarts because it doesn't (and probably never did) need
them.

Along with the above changes, the following has also been done:

For SAML and SCIM, the providerMappings now works.  They weren't being managed as `state` objects,
so they weren't receiving updates when the update event retrieved the information from the back-end.
In order to make clear what's happening, I have extracted the loops from the original definition and
built them as named objects: `propertyMappings`, `pmUserValues`, `pmGroupValues` and so on, which I
then pass into the new multi-select component.

I fixed a really embarrassing typo in Oauth2's "advanced settings" block.

I have extracted the CoreGroup search-select into a custom component.

I deleted the `merge` function.  That was a faulty experiment with non-deterministic outcomes, and I
was never happy with it.  I'm glad its gone.

I've added a title header to each of the providers, so the user can be sure that they're looking
at the right provider type when they start filling out the form.

I've created a new token, `data-ak-control`, with which we can mark all objects that we can treat as
Authentik value-producing components, the form value of which is available through a `json()`
method.  I've added this bit of intelligence to the `serializeForm` function, short-circuiting the
complex processing and putting the "this is the shape of the value we expect from this input" *onto
the input itself*.  Which is where it belongs.

* web: add error handling to wizard.

* web: improve error handling in light components

Rather than reproduce the error handling across all of the LightComponents,
I've made a parent class that takes the common fields to distribute between
the ak-form-element-horizontal and the input object itself.  This made it
much easier to properly display errors in freeform input fields in the
wizard, as well as working with the routine error handling in Form.ts

* Added the radio control to the list of LightComponents.

* Fix bug where event was recorded twice.

* Fixed merge bug (?) that somehow deleted the Authorization Select block in OAuth2.

* web: prettier had opinions

* web: added error handling and display

* web: bump @lit-labs/context from 0.4.1 to 0.5.1 in /web

Bumps [@lit-labs/context](https://github.com/lit/lit/tree/HEAD/packages/labs/context) from 0.4.1 to 0.5.1.
- [Release notes](https://github.com/lit/lit/releases)
- [Changelog](https://github.com/lit/lit/blob/main/packages/labs/context/CHANGELOG.md)
- [Commits](https://github.com/lit/lit/commits/@lit-labs/context@0.5.1/packages/labs/context)

---
updated-dependencies:
- dependency-name: "@lit-labs/context"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* web: updated wizard to run with latest package.json configuration

Apparently, there were stale dependencies in package-lock.json that were conflicting
with the requests in our package.json.  By running `npm update`, I was able to resolve
the conflict.

I have also removed the default names from the context names collection; they weren't doing
any good, and they permit frictionless renaming of dependencies, which is never a good
idea.

* web: schlepping on the errors messages

During testing, I realized I was unhappy with the error messages. They're not very helpful.
By adding links to navigate back to the place where the error occurred, and providing better
context for what the error could have been, I hope to help the use correct their errors.

* make package the same as main

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Ken Sternberg 2023-12-06 03:28:19 -08:00 committed by GitHub
parent 067ddb6936
commit afdc7d241f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 2021 additions and 1469 deletions

View File

@ -89,16 +89,14 @@ export class ApplicationListPage extends TablePage<Application> {
]; ];
} }
renderSectionBefore(): TemplateResult {
return html`<ak-application-wizard-hint></ak-application-wizard-hint>`;
}
renderSidebarAfter(): TemplateResult { renderSidebarAfter(): TemplateResult {
// Rendering the wizard with .open here, as if we set the attribute in // Rendering the wizard with .open here, as if we set the attribute in
// renderObjectCreate() it'll open two wizards, since that function gets called twice // renderObjectCreate() it'll open two wizards, since that function gets called twice
/* Re-enable the wizard later:
<ak-application-wizard
.open=${getURLParam("createWizard", false)}
.showButton=${false}
></ak-application-wizard>*/
return html`<div class="pf-c-sidebar__panel pf-m-width-25"> return html`<div class="pf-c-sidebar__panel pf-m-width-25">
<div class="pf-c-card"> <div class="pf-c-card">
<div class="pf-c-card__body"> <div class="pf-c-card__body">

View File

@ -1,5 +1,7 @@
import { WizardPanel } from "@goauthentik/components/ak-wizard-main/types"; import { WizardPanel } from "@goauthentik/components/ak-wizard-main/types";
import { AKElement } from "@goauthentik/elements/Base"; import { AKElement } from "@goauthentik/elements/Base";
import { KeyUnknown, serializeForm } from "@goauthentik/elements/forms/Form";
import { HorizontalFormElement } from "@goauthentik/elements/forms/HorizontalFormElement";
import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter"; import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter";
import { consume } from "@lit-labs/context"; import { consume } from "@lit-labs/context";
@ -10,6 +12,15 @@ import { styles as AwadStyles } from "./BasePanel.css";
import { applicationWizardContext } from "./ContextIdentity"; import { applicationWizardContext } from "./ContextIdentity";
import type { ApplicationWizardState, ApplicationWizardStateUpdate } from "./types"; import type { ApplicationWizardState, ApplicationWizardStateUpdate } from "./types";
/**
* Application Wizard Base Panel
*
* All of the displays in our system inherit from this object, which supplies the basic CSS for all
* the inputs we display, as well as the values and validity state for the form currently being
* displayed.
*
*/
export class ApplicationWizardPageBase export class ApplicationWizardPageBase
extends CustomEmitterElement(AKElement) extends CustomEmitterElement(AKElement)
implements WizardPanel implements WizardPanel
@ -18,15 +29,41 @@ export class ApplicationWizardPageBase
return AwadStyles; return AwadStyles;
} }
@query("form")
form!: HTMLFormElement;
rendered = false;
@consume({ context: applicationWizardContext }) @consume({ context: applicationWizardContext })
public wizard!: ApplicationWizardState; public wizard!: ApplicationWizardState;
// This used to be more complex; now it just establishes the event name. @query("form")
form!: HTMLFormElement;
/**
* Provide access to the values on the current form. Child implementations use this to craft the
* update that will be sent using `dispatchWizardUpdate` below.
*/
get formValues(): KeyUnknown | undefined {
const elements = [
...Array.from(
this.form.querySelectorAll<HorizontalFormElement>("ak-form-element-horizontal"),
),
...Array.from(this.form.querySelectorAll<HTMLElement>("[data-ak-control=true]")),
];
return serializeForm(elements as unknown as NodeListOf<HorizontalFormElement>);
}
/**
* Provide access to the validity of the current form. Child implementations use this to craft
* the update that will be sent using `dispatchWizardUpdate` below.
*/
get valid() {
return this.form.checkValidity();
}
rendered = false;
/**
* Provide a single source of truth for the token used to notify the orchestrator that an event
* happens. The token `ak-wizard-update` is used by the Wizard framework's reactive controller
* to route "data on the current step has changed" events to the orchestrator.
*/
dispatchWizardUpdate(update: ApplicationWizardStateUpdate) { dispatchWizardUpdate(update: ApplicationWizardStateUpdate) {
this.dispatchCustomEvent("ak-wizard-update", update); this.dispatchCustomEvent("ak-wizard-update", update);
} }

View File

@ -5,5 +5,3 @@ import { ApplicationWizardState } from "./types";
export const applicationWizardContext = createContext<ApplicationWizardState>( export const applicationWizardContext = createContext<ApplicationWizardState>(
Symbol("ak-application-wizard-state-context"), Symbol("ak-application-wizard-state-context"),
); );
export default applicationWizardContext;

View File

@ -1,4 +1,3 @@
import { merge } from "@goauthentik/common/merge";
import { AkWizard } from "@goauthentik/components/ak-wizard-main/AkWizard"; import { AkWizard } from "@goauthentik/components/ak-wizard-main/AkWizard";
import { CustomListenerElement } from "@goauthentik/elements/utils/eventEmitter"; import { CustomListenerElement } from "@goauthentik/elements/utils/eventEmitter";
@ -6,7 +5,7 @@ import { ContextProvider } from "@lit-labs/context";
import { msg } from "@lit/localize"; import { msg } from "@lit/localize";
import { customElement, state } from "lit/decorators.js"; import { customElement, state } from "lit/decorators.js";
import applicationWizardContext from "./ContextIdentity"; import { applicationWizardContext } from "./ContextIdentity";
import { newSteps } from "./steps"; import { newSteps } from "./steps";
import { import {
ApplicationStep, ApplicationStep,
@ -15,10 +14,11 @@ import {
OneOfProvider, OneOfProvider,
} from "./types"; } from "./types";
const freshWizardState = () => ({ const freshWizardState = (): ApplicationWizardState => ({
providerModel: "", providerModel: "",
app: {}, app: {},
provider: {}, provider: {},
errors: {},
}); });
@customElement("ak-application-wizard") @customElement("ak-application-wizard")
@ -56,28 +56,6 @@ export class ApplicationWizard extends CustomListenerElement(
*/ */
providerCache: Map<string, OneOfProvider> = new Map(); providerCache: Map<string, OneOfProvider> = new Map();
maybeProviderSwap(providerModel: string | undefined): boolean {
if (
providerModel === undefined ||
typeof providerModel !== "string" ||
providerModel === this.wizardState.providerModel
) {
return false;
}
this.providerCache.set(this.wizardState.providerModel, this.wizardState.provider);
const prevProvider = this.providerCache.get(providerModel);
this.wizardState.provider = prevProvider ?? {
name: `Provider for ${this.wizardState.app.name}`,
};
const method = this.steps.find(({ id }) => id === "provider-details");
if (!method) {
throw new Error("Could not find Authentication Method page?");
}
method.disabled = false;
return true;
}
// And this is where all the special cases go... // And this is where all the special cases go...
handleUpdate(detail: ApplicationWizardStateUpdate) { handleUpdate(detail: ApplicationWizardStateUpdate) {
if (detail.status === "submitted") { if (detail.status === "submitted") {
@ -87,17 +65,26 @@ export class ApplicationWizard extends CustomListenerElement(
} }
this.step.valid = this.step.valid || detail.status === "valid"; this.step.valid = this.step.valid || detail.status === "valid";
const update = detail.update; const update = detail.update;
if (!update) { if (!update) {
return; return;
} }
if (this.maybeProviderSwap(update.providerModel)) { // When the providerModel enum changes, retrieve the customer's prior work for *this* wizard
this.requestUpdate(); // session (and only this wizard session) or provide an empty model with a default provider
// name.
if (update.providerModel && update.providerModel !== this.wizardState.providerModel) {
const requestedProvider = this.providerCache.get(update.providerModel) ?? {
name: `Provider for ${this.wizardState.app.name}`,
};
if (this.wizardState.providerModel) {
this.providerCache.set(this.wizardState.providerModel, this.wizardState.provider);
}
update.provider = requestedProvider;
} }
this.wizardState = merge(this.wizardState, update) as ApplicationWizardState; this.wizardState = update as ApplicationWizardState;
this.wizardStateProvider.setValue(this.wizardState); this.wizardStateProvider.setValue(this.wizardState);
this.requestUpdate(); this.requestUpdate();
} }

View File

@ -0,0 +1,30 @@
import { AKElement } from "@goauthentik/elements/Base";
import { css, html } from "lit";
import { customElement } from "lit/decorators.js";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
import PFTitle from "@patternfly/patternfly/components/Title/title.css";
@customElement("ak-wizard-title")
export class AkWizardTitle extends AKElement {
static get styles() {
return [
PFContent,
PFTitle,
css`
.ak-bottom-spacing {
padding-bottom: var(--pf-global--spacer--lg);
}
`,
];
}
render() {
return html`<div class="ak-bottom-spacing pf-c-content">
<h3><slot></slot></h3>
</div>`;
}
}
export default AkWizardTitle;

View File

@ -5,7 +5,6 @@ import "@goauthentik/components/ak-slug-input";
import "@goauthentik/components/ak-switch-input"; import "@goauthentik/components/ak-switch-input";
import "@goauthentik/components/ak-text-input"; import "@goauthentik/components/ak-text-input";
import "@goauthentik/elements/forms/FormGroup"; import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement"; import "@goauthentik/elements/forms/HorizontalFormElement";
import { msg } from "@lit/localize"; import { msg } from "@lit/localize";
@ -17,28 +16,20 @@ import BasePanel from "../BasePanel";
@customElement("ak-application-wizard-application-details") @customElement("ak-application-wizard-application-details")
export class ApplicationWizardApplicationDetails extends BasePanel { export class ApplicationWizardApplicationDetails extends BasePanel {
handleChange(ev: Event) { handleChange(_ev: Event) {
if (!ev.target) { const formValues = this.formValues;
console.warn(`Received event with no target: ${ev}`); if (!formValues) {
return; throw new Error("No application values on form?");
} }
const target = ev.target as HTMLInputElement;
const value = target.type === "checkbox" ? target.checked : target.value;
this.dispatchWizardUpdate({ this.dispatchWizardUpdate({
update: { update: {
app: { ...this.wizard,
[target.name]: value, app: formValues,
}, },
}, status: this.valid ? "valid" : "invalid",
status: this.form.checkValidity() ? "valid" : "invalid",
}); });
} }
validator() {
return this.form.reportValidity();
}
render(): TemplateResult { render(): TemplateResult {
return html` <form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> return html` <form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input <ak-text-input
@ -48,6 +39,7 @@ export class ApplicationWizardApplicationDetails extends BasePanel {
required required
help=${msg("Application's display Name.")} help=${msg("Application's display Name.")}
id="ak-application-wizard-details-name" id="ak-application-wizard-details-name"
.errorMessages=${this.wizard.errors.app?.name ?? []}
></ak-text-input> ></ak-text-input>
<ak-slug-input <ak-slug-input
name="slug" name="slug"
@ -56,11 +48,13 @@ export class ApplicationWizardApplicationDetails extends BasePanel {
source="#ak-application-wizard-details-name" source="#ak-application-wizard-details-name"
required required
help=${msg("Internal application name used in URLs.")} help=${msg("Internal application name used in URLs.")}
.errorMessages=${this.wizard.errors.app?.slug ?? []}
></ak-slug-input> ></ak-slug-input>
<ak-text-input <ak-text-input
name="group" name="group"
value=${ifDefined(this.wizard.app?.group)} value=${ifDefined(this.wizard.app?.group)}
label=${msg("Group")} label=${msg("Group")}
.errorMessages=${this.wizard.errors.app?.group ?? []}
help=${msg( help=${msg(
"Optionally enter a group name. Applications with identical groups are shown grouped together.", "Optionally enter a group name. Applications with identical groups are shown grouped together.",
)} )}
@ -71,6 +65,7 @@ export class ApplicationWizardApplicationDetails extends BasePanel {
name="policyEngineMode" name="policyEngineMode"
.options=${policyOptions} .options=${policyOptions}
.value=${this.wizard.app?.policyEngineMode} .value=${this.wizard.app?.policyEngineMode}
.errorMessages=${this.wizard.errors.app?.policyEngineMode ?? []}
></ak-radio-input> ></ak-radio-input>
<ak-form-group aria-label="UI Settings"> <ak-form-group aria-label="UI Settings">
<span slot="header"> ${msg("UI Settings")} </span> <span slot="header"> ${msg("UI Settings")} </span>
@ -82,6 +77,7 @@ export class ApplicationWizardApplicationDetails extends BasePanel {
help=${msg( help=${msg(
"If left empty, authentik will try to extract the launch URL based on the selected provider.", "If left empty, authentik will try to extract the launch URL based on the selected provider.",
)} )}
.errorMessages=${this.wizard.errors.app?.metaLaunchUrl ?? []}
></ak-text-input> ></ak-text-input>
<ak-switch-input <ak-switch-input
name="openInNewTab" name="openInNewTab"

View File

@ -19,13 +19,17 @@ type ProviderRenderer = () => TemplateResult;
type ModelConverter = (provider: OneOfProvider) => ModelRequest; type ModelConverter = (provider: OneOfProvider) => ModelRequest;
/**
* There's an internal key and an API key because "Proxy" has three different subtypes.
*/
// prettier-ignore
type ProviderType = [ type ProviderType = [
string, string, // internal key used by the wizard to distinguish between providers
string, string, // Name of the provider
string, string, // Description
ProviderRenderer, ProviderRenderer, // Function that returns the provider's wizard panel as a TemplateResult
ProviderModelEnumType, ProviderModelEnumType, // key used by the API to distinguish between providers
ModelConverter, ModelConverter, // Handler that takes a generic provider and returns one specifically typed to its panel
]; ];
export type LocalTypeCreate = TypeCreate & { export type LocalTypeCreate = TypeCreate & {

View File

@ -25,19 +25,15 @@ export class ApplicationWizardAuthenticationMethodChoice extends BasePanel {
handleChoice(ev: InputEvent) { handleChoice(ev: InputEvent) {
const target = ev.target as HTMLInputElement; const target = ev.target as HTMLInputElement;
this.dispatchWizardUpdate({ this.dispatchWizardUpdate({
update: { providerModel: target.value }, update: {
status: this.validator() ? "valid" : "invalid", ...this.wizard,
providerModel: target.value,
errors: {},
},
status: this.valid ? "valid" : "invalid",
}); });
} }
validator() {
const radios = Array.from(this.form.querySelectorAll('input[type="radio"]'));
const chosen = radios.find(
(radio: Element) => radio instanceof HTMLInputElement && radio.checked,
);
return !!chosen;
}
renderProvider(type: LocalTypeCreate) { renderProvider(type: LocalTypeCreate) {
const method = this.wizard.providerModel; const method = this.wizard.providerModel;

View File

@ -18,12 +18,14 @@ import PFTitle from "@patternfly/patternfly/components/Title/title.css";
import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css"; import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css";
import { import {
ApplicationRequest, type ApplicationRequest,
CoreApi, CoreApi,
TransactionApplicationRequest, type ModelRequest,
TransactionApplicationResponse, type TransactionApplicationRequest,
type TransactionApplicationResponse,
ValidationError,
ValidationErrorFromJSON,
} from "@goauthentik/api"; } from "@goauthentik/api";
import type { ModelRequest } from "@goauthentik/api";
import BasePanel from "../BasePanel"; import BasePanel from "../BasePanel";
import providerModelsList from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices"; import providerModelsList from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices";
@ -88,7 +90,7 @@ export class ApplicationWizardCommitApplication extends BasePanel {
commitState: State = idleState; commitState: State = idleState;
@state() @state()
errors: string[] = []; errors?: ValidationError;
response?: TransactionApplicationResponse; response?: TransactionApplicationResponse;
@ -121,27 +123,10 @@ export class ApplicationWizardCommitApplication extends BasePanel {
} }
} }
// eslint-disable-next-line @typescript-eslint/no-explicit-any
decodeErrors(body: Record<string, any>) {
const spaceify = (src: Record<string, string>) =>
Object.values(src).map((msg) => `\u00a0\u00a0\u00a0\u00a0${msg}`);
let errs: string[] = [];
if (body["app"] !== undefined) {
errs = [...errs, msg("In the Application:"), ...spaceify(body["app"])];
}
if (body["provider"] !== undefined) {
errs = [...errs, msg("In the Provider:"), ...spaceify(body["provider"])];
}
console.log(body, errs);
return errs;
}
async send( async send(
data: TransactionApplicationRequest, data: TransactionApplicationRequest,
): Promise<TransactionApplicationResponse | void> { ): Promise<TransactionApplicationResponse | void> {
this.errors = []; this.errors = undefined;
new CoreApi(DEFAULT_CONFIG) new CoreApi(DEFAULT_CONFIG)
.coreTransactionalApplicationsUpdate({ .coreTransactionalApplicationsUpdate({
transactionApplicationRequest: data, transactionApplicationRequest: data,
@ -153,18 +138,57 @@ export class ApplicationWizardCommitApplication extends BasePanel {
this.commitState = successState; this.commitState = successState;
}) })
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
.catch((resolution: any) => { .catch(async (resolution: any) => {
resolution.response.json().then( const errors = (this.errors = ValidationErrorFromJSON(
// eslint-disable-next-line @typescript-eslint/no-explicit-any await resolution.response.json(),
(body: Record<string, any>) => { ));
this.errors = this.decodeErrors(body); this.dispatchWizardUpdate({
update: {
...this.wizard,
errors,
}, },
); status: "failed",
});
this.commitState = errorState; this.commitState = errorState;
}); });
} }
render(): TemplateResult { renderErrors(errors?: ValidationError) {
if (!errors) {
return nothing;
}
const navTo = (step: number) => () =>
this.dispatchCustomEvent("ak-wizard-nav", {
command: "goto",
step,
});
if (errors.app) {
return html`<p>${msg("There was an error in the application.")}</p>
<p><a @click=${navTo(0)}>${msg("Review the application.")}</a></p>`;
}
if (errors.provider) {
return html`<p>${msg("There was an error in the provider.")}</p>
<p><a @click=${navTo(2)}>${msg("Review the provider.")}</a></p>`;
}
if (errors.detail) {
return html`<p>${msg("There was an error")}: ${errors.detail}</p>`;
}
if ((errors?.nonFieldErrors ?? []).length > 0) {
return html`<p>$(msg("There was an error")}:</p>
<ul>
${(errors.nonFieldErrors ?? []).map((e: string) => html`<li>${e}</li>`)}
</ul>`;
}
return html`<p>
${msg(
"There was an error creating the application, but no error message was sent. Please review the server logs.",
)}
</p>`;
}
render() {
const icon = classMap( const icon = classMap(
this.commitState.icon.reduce((acc, icon) => ({ ...acc, [icon]: true }), {}), this.commitState.icon.reduce((acc, icon) => ({ ...acc, [icon]: true }), {}),
); );
@ -184,13 +208,7 @@ export class ApplicationWizardCommitApplication extends BasePanel {
> >
${this.commitState.label} ${this.commitState.label}
</h1> </h1>
${this.errors.length > 0 ${this.renderErrors(this.errors)}
? html`<ul>
${this.errors.map(
(msg) => html`<li><code>${msg}</code></li>`,
)}
</ul>`
: nothing}
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,26 +1,19 @@
import BasePanel from "../BasePanel"; import BasePanel from "../BasePanel";
export class ApplicationWizardProviderPageBase extends BasePanel { export class ApplicationWizardProviderPageBase extends BasePanel {
handleChange(ev: InputEvent) { handleChange(_ev: InputEvent) {
if (!ev.target) { const formValues = this.formValues;
console.warn(`Received event with no target: ${ev}`); if (!formValues) {
return; throw new Error("No provider values on form?");
} }
const target = ev.target as HTMLInputElement;
const value = target.type === "checkbox" ? target.checked : target.value;
this.dispatchWizardUpdate({ this.dispatchWizardUpdate({
update: { update: {
provider: { ...this.wizard,
[target.name]: value, provider: formValues,
}, },
}, status: this.valid ? "valid" : "invalid",
status: this.form.checkValidity() ? "valid" : "invalid",
}); });
} }
validator() {
return this.form.reportValidity();
}
} }
export default ApplicationWizardProviderPageBase; export default ApplicationWizardProviderPageBase;

View File

@ -1,3 +1,4 @@
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import "@goauthentik/admin/common/ak-core-group-search"; import "@goauthentik/admin/common/ak-core-group-search";
import "@goauthentik/admin/common/ak-crypto-certificate-search"; import "@goauthentik/admin/common/ak-crypto-certificate-search";
import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search"; import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search";
@ -34,12 +35,15 @@ import {
export class ApplicationWizardApplicationDetails extends BaseProviderPanel { export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
render() { render() {
const provider = this.wizard.provider as LDAPProvider | undefined; const provider = this.wizard.provider as LDAPProvider | undefined;
const errors = this.wizard.errors.provider;
return html` <form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> return html` <ak-wizard-title>${msg("Configure LDAP Provider")}</ak-wizard-title>
<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input <ak-text-input
name="name" name="name"
value=${ifDefined(provider?.name)} value=${ifDefined(provider?.name)}
label=${msg("Name")} label=${msg("Name")}
.errorMessages=${errors?.name ?? []}
required required
help=${msg("Method's display Name.")} help=${msg("Method's display Name.")}
></ak-text-input> ></ak-text-input>
@ -48,6 +52,7 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
label=${msg("Bind flow")} label=${msg("Bind flow")}
?required=${true} ?required=${true}
name="authorizationFlow" name="authorizationFlow"
.errorMessages=${errors?.authorizationFlow ?? []}
> >
<ak-tenanted-flow-search <ak-tenanted-flow-search
flowType=${FlowsInstancesListDesignationEnum.Authentication} flowType=${FlowsInstancesListDesignationEnum.Authentication}
@ -55,10 +60,16 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
.tenantFlow=${rootInterface()?.tenant?.flowAuthentication} .tenantFlow=${rootInterface()?.tenant?.flowAuthentication}
required required
></ak-tenanted-flow-search> ></ak-tenanted-flow-search>
<p class="pf-c-form__helper-text">${msg("Flow used for users to authenticate.")}</p> <p class="pf-c-form__helper-text">
${msg("Flow used for users to authenticate.")}
</p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal label=${msg("Search group")} name="searchGroup"> <ak-form-element-horizontal
label=${msg("Search group")}
name="searchGroup"
.errorMessages=${errors?.searchGroup ?? []}
>
<ak-core-group-search <ak-core-group-search
name="searchGroup" name="searchGroup"
group=${ifDefined(provider?.searchGroup ?? nothing)} group=${ifDefined(provider?.searchGroup ?? nothing)}
@ -80,14 +91,16 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
name="searchMode" name="searchMode"
.options=${searchModeOptions} .options=${searchModeOptions}
.value=${provider?.searchMode} .value=${provider?.searchMode}
help=${msg("Configure how the outpost queries the core authentik server's users.")} help=${msg(
"Configure how the outpost queries the core authentik server's users.",
)}
> >
</ak-radio-input> </ak-radio-input>
<ak-switch-input <ak-switch-input
name="openInNewTab" name="openInNewTab"
label=${msg("Code-based MFA Support")} label=${msg("Code-based MFA Support")}
?checked=${provider?.mfaSupport} ?checked=${provider?.mfaSupport ?? true}
help=${mfaSupportHelp} help=${mfaSupportHelp}
> >
</ak-switch-input> </ak-switch-input>
@ -100,13 +113,18 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
label=${msg("Base DN")} label=${msg("Base DN")}
required required
value="${first(provider?.baseDn, "DC=ldap,DC=goauthentik,DC=io")}" value="${first(provider?.baseDn, "DC=ldap,DC=goauthentik,DC=io")}"
.errorMessages=${errors?.baseDn ?? []}
help=${msg( help=${msg(
"LDAP DN under which bind requests and search requests can be made.", "LDAP DN under which bind requests and search requests can be made.",
)} )}
> >
</ak-text-input> </ak-text-input>
<ak-form-element-horizontal label=${msg("Certificate")} name="certificate"> <ak-form-element-horizontal
label=${msg("Certificate")}
name="certificate"
.errorMessages=${errors?.certificate ?? []}
>
<ak-crypto-certificate-search <ak-crypto-certificate-search
certificate=${ifDefined(provider?.certificate ?? nothing)} certificate=${ifDefined(provider?.certificate ?? nothing)}
name="certificate" name="certificate"
@ -119,6 +137,7 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
label=${msg("TLS Server name")} label=${msg("TLS Server name")}
name="tlsServerName" name="tlsServerName"
value="${first(provider?.tlsServerName, "")}" value="${first(provider?.tlsServerName, "")}"
.errorMessages=${errors?.tlsServerName ?? []}
help=${tlsServerNameHelp} help=${tlsServerNameHelp}
></ak-text-input> ></ak-text-input>
@ -127,6 +146,7 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
required required
name="uidStartNumber" name="uidStartNumber"
value="${first(provider?.uidStartNumber, 2000)}" value="${first(provider?.uidStartNumber, 2000)}"
.errorMessages=${errors?.uidStartNumber ?? []}
help=${uidStartNumberHelp} help=${uidStartNumberHelp}
></ak-number-input> ></ak-number-input>
@ -135,6 +155,7 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel {
required required
name="gidStartNumber" name="gidStartNumber"
value="${first(provider?.gidStartNumber, 4000)}" value="${first(provider?.gidStartNumber, 4000)}"
.errorMessages=${errors?.gidStartNumber ?? []}
help=${gidStartNumberHelp} help=${gidStartNumberHelp}
></ak-number-input> ></ak-number-input>
</div> </div>

View File

@ -1,3 +1,4 @@
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import "@goauthentik/admin/common/ak-crypto-certificate-search"; import "@goauthentik/admin/common/ak-crypto-certificate-search";
import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search"; import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search";
import { import {
@ -27,10 +28,10 @@ import {
PropertymappingsApi, PropertymappingsApi,
SourcesApi, SourcesApi,
} from "@goauthentik/api"; } from "@goauthentik/api";
import type { import {
OAuth2Provider, type OAuth2Provider,
PaginatedOAuthSourceList, type PaginatedOAuthSourceList,
PaginatedScopeMappingList, type PaginatedScopeMappingList,
} from "@goauthentik/api"; } from "@goauthentik/api";
import BaseProviderPanel from "../BaseProviderPanel"; import BaseProviderPanel from "../BaseProviderPanel";
@ -38,7 +39,7 @@ import BaseProviderPanel from "../BaseProviderPanel";
@customElement("ak-application-wizard-authentication-by-oauth") @customElement("ak-application-wizard-authentication-by-oauth")
export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel { export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
@state() @state()
showClientSecret = false; showClientSecret = true;
@state() @state()
propertyMappings?: PaginatedScopeMappingList; propertyMappings?: PaginatedScopeMappingList;
@ -68,18 +69,22 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
render() { render() {
const provider = this.wizard.provider as OAuth2Provider | undefined; const provider = this.wizard.provider as OAuth2Provider | undefined;
const errors = this.wizard.errors.provider;
return html`<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> return html`<ak-wizard-title>${msg("Configure OAuth2/OpenId Provider")}</ak-wizard-title>
<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input <ak-text-input
name="name" name="name"
label=${msg("Name")} label=${msg("Name")}
value=${ifDefined(provider?.name)} value=${ifDefined(provider?.name)}
.errorMessages=${errors?.name ?? []}
required required
></ak-text-input> ></ak-text-input>
<ak-form-element-horizontal <ak-form-element-horizontal
name="authenticationFlow" name="authenticationFlow"
label=${msg("Authentication flow")} label=${msg("Authentication flow")}
.errorMessages=${errors?.authenticationFlow ?? []}
> >
<ak-flow-search <ak-flow-search
flowType=${FlowsInstancesListDesignationEnum.Authentication} flowType=${FlowsInstancesListDesignationEnum.Authentication}
@ -87,13 +92,15 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
required required
></ak-flow-search> ></ak-flow-search>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Flow used when a user access this provider and is not authenticated.")} ${msg(
"Flow used when a user access this provider and is not authenticated.",
)}
</p> </p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-form-element-horizontal
name="authorizationFlow" name="authorizationFlow"
label=${msg("Authorization flow")} label=${msg("Authorization flow")}
.errorMessages=${errors?.authorizationFlow ?? []}
?required=${true} ?required=${true}
> >
<ak-flow-search <ak-flow-search
@ -124,10 +131,8 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
<ak-text-input <ak-text-input
name="clientId" name="clientId"
label=${msg("Client ID")} label=${msg("Client ID")}
value="${first( value=${provider?.clientId ?? randomString(40, ascii_letters + digits)}
provider?.clientId, .errorMessages=${errors?.clientId ?? []}
randomString(40, ascii_letters + digits),
)}"
required required
> >
</ak-text-input> </ak-text-input>
@ -135,10 +140,9 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
<ak-text-input <ak-text-input
name="clientSecret" name="clientSecret"
label=${msg("Client Secret")} label=${msg("Client Secret")}
value="${first( value=${provider?.clientSecret ??
provider?.clientSecret, randomString(128, ascii_letters + digits)}
randomString(128, ascii_letters + digits), .errorMessages=${errors?.clientSecret ?? []}
)}"
?hidden=${!this.showClientSecret} ?hidden=${!this.showClientSecret}
> >
</ak-text-input> </ak-text-input>
@ -147,18 +151,25 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
name="redirectUris" name="redirectUris"
label=${msg("Redirect URIs/Origins (RegEx)")} label=${msg("Redirect URIs/Origins (RegEx)")}
.value=${provider?.redirectUris} .value=${provider?.redirectUris}
.errorMessages=${errors?.redirectUriHelp ?? []}
.bighelp=${redirectUriHelp} .bighelp=${redirectUriHelp}
> >
</ak-textarea-input> </ak-textarea-input>
<ak-form-element-horizontal label=${msg("Signing Key")} name="signingKey"> <ak-form-element-horizontal
label=${msg("Signing Key")}
name="signingKey"
.errorMessages=${errors?.signingKey ?? []}
>
<ak-crypto-certificate-search <ak-crypto-certificate-search
certificate=${ifDefined(provider?.signingKey ?? nothing)} certificate=${ifDefined(provider?.signingKey ?? nothing)}
name="certificate" name="certificate"
singleton singleton
> >
</ak-crypto-certificate-search> </ak-crypto-certificate-search>
<p class="pf-c-form__helper-text">${msg("Key used to sign the tokens.")}</p> <p class="pf-c-form__helper-text">
${msg("Key used to sign the tokens.")}
</p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
</div> </div>
</ak-form-group> </ak-form-group>
@ -171,6 +182,7 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
label=${msg("Access code validity")} label=${msg("Access code validity")}
required required
value="${first(provider?.accessCodeValidity, "minutes=1")}" value="${first(provider?.accessCodeValidity, "minutes=1")}"
.errorMessages=${errors?.accessCodeValidity ?? []}
.bighelp=${html`<p class="pf-c-form__helper-text"> .bighelp=${html`<p class="pf-c-form__helper-text">
${msg("Configure how long access codes are valid for.")} ${msg("Configure how long access codes are valid for.")}
</p> </p>
@ -183,6 +195,7 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
label=${msg("Access Token validity")} label=${msg("Access Token validity")}
value="${first(provider?.accessTokenValidity, "minutes=5")}" value="${first(provider?.accessTokenValidity, "minutes=5")}"
required required
.errorMessages=${errors?.accessTokenValidity ?? []}
.bighelp=${html` <p class="pf-c-form__helper-text"> .bighelp=${html` <p class="pf-c-form__helper-text">
${msg("Configure how long access tokens are valid for.")} ${msg("Configure how long access tokens are valid for.")}
</p> </p>
@ -194,6 +207,7 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
name="refreshTokenValidity" name="refreshTokenValidity"
label=${msg("Refresh Token validity")} label=${msg("Refresh Token validity")}
value="${first(provider?.refreshTokenValidity, "days=30")}" value="${first(provider?.refreshTokenValidity, "days=30")}"
.errorMessages=${errors?.refreshTokenValidity ?? []}
?required=${true} ?required=${true}
.bighelp=${html` <p class="pf-c-form__helper-text"> .bighelp=${html` <p class="pf-c-form__helper-text">
${msg("Configure how long refresh tokens are valid for.")} ${msg("Configure how long refresh tokens are valid for.")}
@ -202,7 +216,11 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
> >
</ak-text-input> </ak-text-input>
<ak-form-element-horizontal label=${msg("Scopes")} name="propertyMappings"> <ak-form-element-horizontal
label=${msg("Scopes")}
name="propertyMappings"
.errorMessages=${errors?.propertyMappings ?? []}
>
<select class="pf-c-form-control" multiple> <select class="pf-c-form-control" multiple>
${this.propertyMappings?.results.map((scope) => { ${this.propertyMappings?.results.map((scope) => {
let selected = false; let selected = false;
@ -212,9 +230,11 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
"goauthentik.io/providers/oauth2/scope-", "goauthentik.io/providers/oauth2/scope-",
) || false; ) || false;
} else { } else {
selected = Array.from(provider?.propertyMappings).some((su) => { selected = Array.from(provider?.propertyMappings).some(
(su) => {
return su == scope.pk; return su == scope.pk;
}); },
);
} }
return html`<option return html`<option
value=${ifDefined(scope.pk)} value=${ifDefined(scope.pk)}
@ -273,6 +293,7 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
<ak-form-element-horizontal <ak-form-element-horizontal
label=${msg("Trusted OIDC Sources")} label=${msg("Trusted OIDC Sources")}
name="jwksSources" name="jwksSources"
.errorMessages=${errors?.jwksSources ?? []}
> >
<select class="pf-c-form-control" multiple> <select class="pf-c-form-control" multiple>
${this.oauthSources?.results.map((source) => { ${this.oauthSources?.results.map((source) => {

View File

@ -1,3 +1,4 @@
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { first } from "@goauthentik/common/utils"; import { first } from "@goauthentik/common/utils";
import "@goauthentik/components/ak-switch-input"; import "@goauthentik/components/ak-switch-input";
@ -61,11 +62,11 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
return nothing; return nothing;
} }
renderProxyMode() { renderProxyMode(): TemplateResult {
return html`<h2>This space intentionally left blank</h2>`; throw new Error("Must be implemented in a child class.");
} }
renderHttpBasic(): TemplateResult { renderHttpBasic() {
return html`<ak-text-input return html`<ak-text-input
name="basicAuthUserAttribute" name="basicAuthUserAttribute"
label=${msg("HTTP-Basic Username Key")} label=${msg("HTTP-Basic Username Key")}
@ -87,19 +88,45 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
</ak-text-input>`; </ak-text-input>`;
} }
scopeMappingConfiguration(provider?: ProxyProvider) {
const propertyMappings = this.propertyMappings?.results ?? [];
const defaultScopes = () =>
propertyMappings
.filter((scope) => !(scope?.managed ?? "").startsWith("goauthentik.io/providers"))
.map((pm) => pm.pk);
const configuredScopes = (providerMappings: string[]) =>
propertyMappings.map((scope) => scope.pk).filter((pk) => providerMappings.includes(pk));
const scopeValues = provider?.propertyMappings
? configuredScopes(provider?.propertyMappings ?? [])
: defaultScopes();
const scopePairs = propertyMappings.map((scope) => [scope.pk, scope.name]);
return { scopePairs, scopeValues };
}
render() { render() {
return html`<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> const errors = this.wizard.errors.provider;
const { scopePairs, scopeValues } = this.scopeMappingConfiguration(this.instance);
return html` <ak-wizard-title>${msg("Configure Proxy Provider")}</ak-wizard-title>
<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
${this.renderModeDescription()} ${this.renderModeDescription()}
<ak-text-input <ak-text-input
name="name" name="name"
value=${ifDefined(this.instance?.name)} value=${ifDefined(this.instance?.name)}
required required
.errorMessages=${errors?.name ?? []}
label=${msg("Name")} label=${msg("Name")}
></ak-text-input> ></ak-text-input>
<ak-form-element-horizontal <ak-form-element-horizontal
label=${msg("Authentication flow")} label=${msg("Authentication flow")}
?required=${false} ?required=${false}
.errorMessages=${errors?.authenticationFlow ?? []}
name="authenticationFlow" name="authenticationFlow"
> >
<ak-flow-search <ak-flow-search
@ -108,7 +135,9 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
required required
></ak-flow-search> ></ak-flow-search>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Flow used when a user access this provider and is not authenticated.")} ${msg(
"Flow used when a user access this provider and is not authenticated.",
)}
</p> </p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
@ -116,6 +145,7 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
label=${msg("Authorization flow")} label=${msg("Authorization flow")}
?required=${true} ?required=${true}
name="authorizationFlow" name="authorizationFlow"
.errorMessages=${errors?.authorizationFlow ?? []}
> >
<ak-flow-search <ak-flow-search
flowType=${FlowsInstancesListDesignationEnum.Authorization} flowType=${FlowsInstancesListDesignationEnum.Authorization}
@ -134,47 +164,40 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
value=${first(this.instance?.accessTokenValidity, "hours=24")} value=${first(this.instance?.accessTokenValidity, "hours=24")}
label=${msg("Token validity")} label=${msg("Token validity")}
help=${msg("Configure how long tokens are valid for.")} help=${msg("Configure how long tokens are valid for.")}
.errorMessages=${errors?.accessTokenValidity ?? []}
></ak-text-input> ></ak-text-input>
<ak-form-group> <ak-form-group>
<span slot="header">${msg("Advanced protocol settings")}</span> <span slot="header">${msg("Advanced protocol settings")}</span>
<div slot="body" class="pf-c-form"> <div slot="body" class="pf-c-form">
<ak-form-element-horizontal label=${msg("Certificate")} name="certificate"> <ak-form-element-horizontal
label=${msg("Certificate")}
name="certificate"
.errorMessages=${errors?.certificate ?? []}
>
<ak-crypto-certificate-search <ak-crypto-certificate-search
certificate=${ifDefined(this.instance?.certificate ?? undefined)} certificate=${ifDefined(this.instance?.certificate ?? undefined)}
></ak-crypto-certificate-search> ></ak-crypto-certificate-search>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-multi-select
label=${msg("Additional scopes")} label=${msg("AdditionalScopes")}
name="propertyMappings" name="propertyMappings"
> required
<select class="pf-c-form-control" multiple> .options=${scopePairs}
${this.propertyMappings?.results .values=${scopeValues}
.filter((scope) => { .errorMessages=${errors?.propertyMappings ?? []}
return !scope.managed?.startsWith("goauthentik.io/providers"); .richhelp=${html`
})
.map((scope) => {
const selected = (this.instance?.propertyMappings || []).some(
(su) => {
return su == scope.pk;
},
);
return html`<option
value=${ifDefined(scope.pk)}
?selected=${selected}
>
${scope.name}
</option>`;
})}
</select>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Additional scope mappings, which are passed to the proxy.")} ${msg(
"Additional scope mappings, which are passed to the proxy.",
)}
</p> </p>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Hold control/command to select multiple items.")} ${msg("Hold control/command to select multiple items.")}
</p> </p>
</ak-form-element-horizontal> `}
></ak-multi-select>
<ak-textarea-input <ak-textarea-input
name="skipPathRegex" name="skipPathRegex"
@ -182,6 +205,7 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
? msg("Unauthenticated URLs") ? msg("Unauthenticated URLs")
: msg("Unauthenticated Paths")} : msg("Unauthenticated Paths")}
value=${ifDefined(this.instance?.skipPathRegex)} value=${ifDefined(this.instance?.skipPathRegex)}
.errorMessages=${errors?.skipPathRegex ?? []}
.bighelp=${html` <p class="pf-c-form__helper-text"> .bighelp=${html` <p class="pf-c-form__helper-text">
${msg( ${msg(
"Regular expressions for which authentication is not required. Each new line is interpreted as a new expression.", "Regular expressions for which authentication is not required. Each new line is interpreted as a new expression.",
@ -226,12 +250,15 @@ export class AkTypeProxyApplicationWizardPage extends BaseProviderPanel {
<ak-form-element-horizontal <ak-form-element-horizontal
label=${msg("Trusted OIDC Sources")} label=${msg("Trusted OIDC Sources")}
name="jwksSources" name="jwksSources"
.errorMessages=${errors?.jwksSources ?? []}
> >
<select class="pf-c-form-control" multiple> <select class="pf-c-form-control" multiple>
${this.oauthSources?.results.map((source) => { ${this.oauthSources?.results.map((source) => {
const selected = (this.instance?.jwksSources || []).some((su) => { const selected = (this.instance?.jwksSources || []).some(
(su) => {
return su == source.pk; return su == source.pk;
}); },
);
return html`<option value=${source.pk} ?selected=${selected}> return html`<option value=${source.pk} ?selected=${selected}>
${source.name} (${source.slug}) ${source.name} (${source.slug})
</option>`; </option>`;

View File

@ -5,6 +5,8 @@ import { customElement } from "@lit/reactive-element/decorators.js";
import { html } from "lit"; import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { ProxyProvider } from "@goauthentik/api";
import AkTypeProxyApplicationWizardPage from "./AuthenticationByProxyPage"; import AkTypeProxyApplicationWizardPage from "./AuthenticationByProxyPage";
@customElement("ak-application-wizard-authentication-for-forward-proxy-domain") @customElement("ak-application-wizard-authentication-for-forward-proxy-domain")
@ -28,11 +30,15 @@ export class AkForwardDomainProxyApplicationWizardPage extends AkTypeProxyApplic
} }
renderProxyMode() { renderProxyMode() {
const provider = this.wizard.provider as ProxyProvider | undefined;
const errors = this.wizard.errors.provider;
return html` return html`
<ak-text-input <ak-text-input
name="externalHost" name="externalHost"
label=${msg("External host")} label=${msg("External host")}
value=${ifDefined(this.instance?.externalHost)} value=${ifDefined(provider?.externalHost)}
.errorMessages=${errors?.externalHost ?? []}
required required
help=${msg( help=${msg(
"The external URL you'll authenticate at. The authentik core server should be reachable under this URL.", "The external URL you'll authenticate at. The authentik core server should be reachable under this URL.",
@ -42,7 +48,8 @@ export class AkForwardDomainProxyApplicationWizardPage extends AkTypeProxyApplic
<ak-text-input <ak-text-input
name="cookieDomain" name="cookieDomain"
label=${msg("Cookie domain")} label=${msg("Cookie domain")}
value="${ifDefined(this.instance?.cookieDomain)}" value="${ifDefined(provider?.cookieDomain)}"
.errorMessages=${errors?.cookieDomain ?? []}
required required
help=${msg( help=${msg(
"Set this to the domain you wish the authentication to be valid for. Must be a parent domain of the URL above. If you're running applications as app1.domain.tld, app2.domain.tld, set this to 'domain.tld'.", "Set this to the domain you wish the authentication to be valid for. Must be a parent domain of the URL above. If you're running applications as app1.domain.tld, app2.domain.tld, set this to 'domain.tld'.",

View File

@ -7,6 +7,8 @@ import { customElement } from "@lit/reactive-element/decorators.js";
import { html } from "lit"; import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { ProxyProvider } from "@goauthentik/api";
import AkTypeProxyApplicationWizardPage from "./AuthenticationByProxyPage"; import AkTypeProxyApplicationWizardPage from "./AuthenticationByProxyPage";
@customElement("ak-application-wizard-authentication-for-reverse-proxy") @customElement("ak-application-wizard-authentication-for-reverse-proxy")
@ -20,25 +22,30 @@ export class AkReverseProxyApplicationWizardPage extends AkTypeProxyApplicationW
} }
renderProxyMode() { renderProxyMode() {
const provider = this.wizard.provider as ProxyProvider | undefined;
const errors = this.wizard.errors.provider;
return html` <ak-text-input return html` <ak-text-input
name="externalHost" name="externalHost"
value=${ifDefined(this.instance?.externalHost)} value=${ifDefined(provider?.externalHost)}
required required
label=${msg("External host")} label=${msg("External host")}
.errorMessages=${errors?.externalHost ?? []}
help=${msg( help=${msg(
"The external URL you'll access the application at. Include any non-standard port.", "The external URL you'll access the application at. Include any non-standard port.",
)} )}
></ak-text-input> ></ak-text-input>
<ak-text-input <ak-text-input
name="internalHost" name="internalHost"
value=${ifDefined(this.instance?.internalHost)} value=${ifDefined(provider?.internalHost)}
.errorMessages=${errors?.internalHost ?? []}
required required
label=${msg("Internal host")} label=${msg("Internal host")}
help=${msg("Upstream host that the requests are forwarded to.")} help=${msg("Upstream host that the requests are forwarded to.")}
></ak-text-input> ></ak-text-input>
<ak-switch-input <ak-switch-input
name="internalHostSslValidation" name="internalHostSslValidation"
?checked=${first(this.instance?.internalHostSslValidation, true)} ?checked=${first(provider?.internalHostSslValidation, true)}
label=${msg("Internal host SSL Validation")} label=${msg("Internal host SSL Validation")}
help=${msg("Validate SSL Certificates of upstream servers.")} help=${msg("Validate SSL Certificates of upstream servers.")}
> >

View File

@ -5,6 +5,8 @@ import { customElement } from "@lit/reactive-element/decorators.js";
import { html } from "lit"; import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { ProxyProvider } from "@goauthentik/api";
import AkTypeProxyApplicationWizardPage from "./AuthenticationByProxyPage"; import AkTypeProxyApplicationWizardPage from "./AuthenticationByProxyPage";
@customElement("ak-application-wizard-authentication-for-single-forward-proxy") @customElement("ak-application-wizard-authentication-for-single-forward-proxy")
@ -21,11 +23,15 @@ export class AkForwardSingleProxyApplicationWizardPage extends AkTypeProxyApplic
} }
renderProxyMode() { renderProxyMode() {
const provider = this.wizard.provider as ProxyProvider | undefined;
const errors = this.wizard.errors.provider;
return html`<ak-text-input return html`<ak-text-input
name="externalHost" name="externalHost"
value=${ifDefined(this.instance?.externalHost)} value=${ifDefined(provider?.externalHost)}
required required
label=${msg("External host")} label=${msg("External host")}
.errorMessages=${errors?.externalHost ?? []}
help=${msg( help=${msg(
"The external URL you'll access the application at. Include any non-standard port.", "The external URL you'll access the application at. Include any non-standard port.",
)} )}

View File

@ -1,3 +1,4 @@
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import "@goauthentik/admin/common/ak-crypto-certificate-search"; import "@goauthentik/admin/common/ak-crypto-certificate-search";
import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search"; import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search";
import { ascii_letters, digits, first, randomString } from "@goauthentik/common/utils"; import { ascii_letters, digits, first, randomString } from "@goauthentik/common/utils";
@ -19,12 +20,15 @@ import BaseProviderPanel from "../BaseProviderPanel";
export class ApplicationWizardAuthenticationByRadius extends BaseProviderPanel { export class ApplicationWizardAuthenticationByRadius extends BaseProviderPanel {
render() { render() {
const provider = this.wizard.provider as RadiusProvider | undefined; const provider = this.wizard.provider as RadiusProvider | undefined;
const errors = this.wizard.errors.provider;
return html`<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> return html`<ak-wizard-title>${msg("Configure Radius Provider")}</ak-wizard-title>
<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input <ak-text-input
name="name" name="name"
label=${msg("Name")} label=${msg("Name")}
value=${ifDefined(provider?.name)} value=${ifDefined(provider?.name)}
.errorMessages=${errors?.name ?? []}
required required
> >
</ak-text-input> </ak-text-input>
@ -33,6 +37,7 @@ export class ApplicationWizardAuthenticationByRadius extends BaseProviderPanel {
label=${msg("Authentication flow")} label=${msg("Authentication flow")}
?required=${true} ?required=${true}
name="authorizationFlow" name="authorizationFlow"
.errorMessages=${errors?.authorizationFlow ?? []}
> >
<ak-tenanted-flow-search <ak-tenanted-flow-search
flowType=${FlowsInstancesListDesignationEnum.Authentication} flowType=${FlowsInstancesListDesignationEnum.Authentication}
@ -40,7 +45,9 @@ export class ApplicationWizardAuthenticationByRadius extends BaseProviderPanel {
.tenantFlow=${rootInterface()?.tenant?.flowAuthentication} .tenantFlow=${rootInterface()?.tenant?.flowAuthentication}
required required
></ak-tenanted-flow-search> ></ak-tenanted-flow-search>
<p class="pf-c-form__helper-text">${msg("Flow used for users to authenticate.")}</p> <p class="pf-c-form__helper-text">
${msg("Flow used for users to authenticate.")}
</p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-group expanded> <ak-form-group expanded>
@ -49,6 +56,7 @@ export class ApplicationWizardAuthenticationByRadius extends BaseProviderPanel {
<ak-text-input <ak-text-input
name="sharedSecret" name="sharedSecret"
label=${msg("Shared secret")} label=${msg("Shared secret")}
.errorMessages=${errors?.sharedSecret ?? []}
value=${first( value=${first(
provider?.sharedSecret, provider?.sharedSecret,
randomString(128, ascii_letters + digits), randomString(128, ascii_letters + digits),
@ -59,6 +67,7 @@ export class ApplicationWizardAuthenticationByRadius extends BaseProviderPanel {
name="clientNetworks" name="clientNetworks"
label=${msg("Client Networks")} label=${msg("Client Networks")}
value=${first(provider?.clientNetworks, "0.0.0.0/0, ::/0")} value=${first(provider?.clientNetworks, "0.0.0.0/0, ::/0")}
.errorMessages=${errors?.clientNetworks ?? []}
required required
help=${msg(`List of CIDRs (comma-seperated) that clients can connect from. A more specific help=${msg(`List of CIDRs (comma-seperated) that clients can connect from. A more specific
CIDR will match before a looser one. Clients connecting from a non-specified CIDR CIDR will match before a looser one. Clients connecting from a non-specified CIDR

View File

@ -1,7 +1,10 @@
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import "@goauthentik/admin/common/ak-core-group-search"; import "@goauthentik/admin/common/ak-core-group-search";
import "@goauthentik/admin/common/ak-crypto-certificate-search"; import "@goauthentik/admin/common/ak-crypto-certificate-search";
import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search"; import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-multi-select";
import "@goauthentik/components/ak-number-input"; import "@goauthentik/components/ak-number-input";
import "@goauthentik/components/ak-radio-input"; import "@goauthentik/components/ak-radio-input";
import "@goauthentik/components/ak-switch-input"; import "@goauthentik/components/ak-switch-input";
@ -10,7 +13,7 @@ import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement"; import "@goauthentik/elements/forms/HorizontalFormElement";
import { msg } from "@lit/localize"; import { msg } from "@lit/localize";
import { customElement } from "@lit/reactive-element/decorators/custom-element.js"; import { customElement, state } from "@lit/reactive-element/decorators.js";
import { html } from "lit"; import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
@ -27,9 +30,11 @@ import {
signatureAlgorithmOptions, signatureAlgorithmOptions,
spBindingOptions, spBindingOptions,
} from "./SamlProviderOptions"; } from "./SamlProviderOptions";
import "./saml-property-mappings-search";
@customElement("ak-application-wizard-authentication-by-saml-configuration") @customElement("ak-application-wizard-authentication-by-saml-configuration")
export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPanel { export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPanel {
@state()
propertyMappings?: PaginatedSAMLPropertyMappingList; propertyMappings?: PaginatedSAMLPropertyMappingList;
constructor() { constructor() {
@ -43,21 +48,47 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
}); });
} }
propertyMappingConfiguration(provider?: SAMLProvider) {
const propertyMappings = this.propertyMappings?.results ?? [];
const configuredMappings = (providerMappings: string[]) =>
propertyMappings.map((pm) => pm.pk).filter((pmpk) => providerMappings.includes(pmpk));
const managedMappings = () =>
propertyMappings
.filter((pm) => (pm?.managed ?? "").startsWith("goauthentik.io/providers/saml"))
.map((pm) => pm.pk);
const pmValues = provider?.propertyMappings
? configuredMappings(provider?.propertyMappings ?? [])
: managedMappings();
const propertyPairs = propertyMappings.map((pm) => [pm.pk, pm.name]);
return { pmValues, propertyPairs };
}
render() { render() {
const provider = this.wizard.provider as SAMLProvider | undefined; const provider = this.wizard.provider as SAMLProvider | undefined;
const errors = this.wizard.errors.provider;
return html` <form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> const { pmValues, propertyPairs } = this.propertyMappingConfiguration(provider);
return html` <ak-wizard-title>${msg("Configure SAML Provider")}</ak-wizard-title>
<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input <ak-text-input
name="name" name="name"
value=${ifDefined(provider?.name)} value=${ifDefined(provider?.name)}
required required
label=${msg("Name")} label=${msg("Name")}
.errorMessages=${errors?.name ?? []}
></ak-text-input> ></ak-text-input>
<ak-form-element-horizontal <ak-form-element-horizontal
label=${msg("Authentication flow")} label=${msg("Authentication flow")}
?required=${false} ?required=${false}
name="authenticationFlow" name="authenticationFlow"
.errorMessages=${errors?.authenticationFlow ?? []}
> >
<ak-flow-search <ak-flow-search
flowType=${FlowsInstancesListDesignationEnum.Authentication} flowType=${FlowsInstancesListDesignationEnum.Authentication}
@ -65,7 +96,9 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
required required
></ak-flow-search> ></ak-flow-search>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Flow used when a user access this provider and is not authenticated.")} ${msg(
"Flow used when a user access this provider and is not authenticated.",
)}
</p> </p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
@ -73,6 +106,7 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
label=${msg("Authorization flow")} label=${msg("Authorization flow")}
?required=${true} ?required=${true}
name="authorizationFlow" name="authorizationFlow"
.errorMessages=${errors?.authorizationFlow ?? []}
> >
<ak-flow-search <ak-flow-search
flowType=${FlowsInstancesListDesignationEnum.Authorization} flowType=${FlowsInstancesListDesignationEnum.Authorization}
@ -92,6 +126,7 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
value=${ifDefined(provider?.acsUrl)} value=${ifDefined(provider?.acsUrl)}
required required
label=${msg("ACS URL")} label=${msg("ACS URL")}
.errorMessages=${errors?.acsUrl ?? []}
></ak-text-input> ></ak-text-input>
<ak-text-input <ak-text-input
@ -100,6 +135,7 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
required required
label=${msg("Issuer")} label=${msg("Issuer")}
help=${msg("Also known as EntityID.")} help=${msg("Also known as EntityID.")}
.errorMessages=${errors?.issuer ?? []}
></ak-text-input> ></ak-text-input>
<ak-radio-input <ak-radio-input
@ -118,6 +154,7 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
name="audience" name="audience"
value=${ifDefined(provider?.audience)} value=${ifDefined(provider?.audience)}
label=${msg("Audience")} label=${msg("Audience")}
.errorMessages=${errors?.audience ?? []}
></ak-text-input> ></ak-text-input>
</div> </div>
</ak-form-group> </ak-form-group>
@ -154,36 +191,19 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
</p> </p>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-multi-select
label=${msg("Property mappings")} label=${msg("Property Mappings")}
?required=${true}
name="propertyMappings" name="propertyMappings"
> required
<select class="pf-c-form-control" multiple> .options=${propertyPairs}
${this.propertyMappings?.results.map((mapping) => { .values=${pmValues}
let selected = false; .richhelp=${html` <p class="pf-c-form__helper-text">
if (!provider?.propertyMappings) { ${msg("Property mappings used for user mapping.")}
selected = </p>
mapping.managed?.startsWith(
"goauthentik.io/providers/saml",
) || false;
} else {
selected = Array.from(provider?.propertyMappings).some((su) => {
return su == mapping.pk;
});
}
return html`<option
value=${ifDefined(mapping.pk)}
?selected=${selected}
>
${mapping.name}
</option>`;
})}
</select>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Hold control/command to select multiple items.")} ${msg("Hold control/command to select multiple items.")}
</p> </p>`}
</ak-form-element-horizontal> ></ak-multi-select>
<ak-form-element-horizontal <ak-form-element-horizontal
label=${msg("NameID Property Mapping")} label=${msg("NameID Property Mapping")}
@ -205,7 +225,10 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
value=${provider?.assertionValidNotBefore || "minutes=-5"} value=${provider?.assertionValidNotBefore || "minutes=-5"}
required required
label=${msg("Assertion valid not before")} label=${msg("Assertion valid not before")}
help=${msg("Configure the maximum allowed time drift for an assertion.")} help=${msg(
"Configure the maximum allowed time drift for an assertion.",
)}
.errorMessages=${errors?.assertionValidNotBefore ?? []}
></ak-text-input> ></ak-text-input>
<ak-text-input <ak-text-input
@ -213,7 +236,10 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
value=${provider?.assertionValidNotOnOrAfter || "minutes=5"} value=${provider?.assertionValidNotOnOrAfter || "minutes=5"}
required required
label=${msg("Assertion valid not on or after")} label=${msg("Assertion valid not on or after")}
help=${msg("Assertion not valid on or after current time + this value.")} help=${msg(
"Assertion not valid on or after current time + this value.",
)}
.errorMessages=${errors?.assertionValidNotOnOrAfter ?? []}
></ak-text-input> ></ak-text-input>
<ak-text-input <ak-text-input
@ -222,6 +248,7 @@ export class ApplicationWizardProviderSamlConfiguration extends BaseProviderPane
required required
label=${msg("Session valid not on or after")} label=${msg("Session valid not on or after")}
help=${msg("Session not valid on or after current time + this value.")} help=${msg("Session not valid on or after current time + this value.")}
.errorMessages=${errors?.sessionValidNotOnOrAfter ?? []}
></ak-text-input> ></ak-text-input>
<ak-radio-input <ak-radio-input

View File

@ -1,81 +0,0 @@
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search-no-default";
import "@goauthentik/components/ak-file-input";
import { AkFileInput } from "@goauthentik/components/ak-file-input";
import "@goauthentik/components/ak-text-input";
import "@goauthentik/elements/forms/HorizontalFormElement";
import { msg } from "@lit/localize";
import { customElement } from "@lit/reactive-element/decorators/custom-element.js";
import { html } from "lit";
import { query } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import {
FlowsInstancesListDesignationEnum,
ProvidersSamlImportMetadataCreateRequest,
} from "@goauthentik/api";
import BaseProviderPanel from "../BaseProviderPanel";
@customElement("ak-application-wizard-authentication-by-saml-import")
export class ApplicationWizardProviderSamlImport extends BaseProviderPanel {
@query('ak-file-input[name="metadata"]')
fileInput!: AkFileInput;
handleChange(ev: InputEvent) {
if (!ev.target) {
console.warn(`Received event with no target: ${ev}`);
return;
}
const target = ev.target as HTMLInputElement;
if (target.type === "file") {
const file = this.fileInput.files?.[0] ?? null;
if (file) {
this.dispatchWizardUpdate({
update: {
provider: {
file,
},
},
status: this.form.checkValidity() ? "valid" : "invalid",
});
}
return;
}
super.handleChange(ev);
}
render() {
const provider = this.wizard.provider as
| ProvidersSamlImportMetadataCreateRequest
| undefined;
return html` <form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input
name="name"
value=${ifDefined(provider?.name)}
label=${msg("Name")}
required
help=${msg("Method's display Name.")}
></ak-text-input>
<ak-form-element-horizontal
label=${msg("Authorization flow")}
?required=${true}
name="authorizationFlow"
>
<ak-flow-search-no-default
flowType=${FlowsInstancesListDesignationEnum.Authorization}
required
></ak-flow-search-no-default>
<p class="pf-c-form__helper-text">
${msg("Flow used when authorizing this provider.")}
</p>
</ak-form-element-horizontal>
<ak-file-input name="metadata" label=${msg("Metadata")} required></ak-file-input>
</form>`;
}
}
export default ApplicationWizardProviderSamlImport;

View File

@ -1,7 +1,10 @@
import "@goauthentik/admin/applications/wizard/ak-wizard-title";
import "@goauthentik/admin/common/ak-core-group-search";
import "@goauthentik/admin/common/ak-crypto-certificate-search"; import "@goauthentik/admin/common/ak-crypto-certificate-search";
import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search"; import "@goauthentik/admin/common/ak-flow-search/ak-tenanted-flow-search";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { first } from "@goauthentik/common/utils"; import { first } from "@goauthentik/common/utils";
import "@goauthentik/components/ak-multi-select";
import "@goauthentik/components/ak-switch-input"; import "@goauthentik/components/ak-switch-input";
import "@goauthentik/components/ak-text-input"; import "@goauthentik/components/ak-text-input";
import "@goauthentik/elements/forms/FormGroup"; import "@goauthentik/elements/forms/FormGroup";
@ -12,14 +15,7 @@ import { customElement, state } from "@lit/reactive-element/decorators.js";
import { html } from "lit"; import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { import { PaginatedSCIMMappingList, PropertymappingsApi, type SCIMProvider } from "@goauthentik/api";
CoreApi,
CoreGroupsListRequest,
type Group,
PaginatedSCIMMappingList,
PropertymappingsApi,
type SCIMProvider,
} from "@goauthentik/api";
import BaseProviderPanel from "../BaseProviderPanel"; import BaseProviderPanel from "../BaseProviderPanel";
@ -31,22 +27,52 @@ export class ApplicationWizardAuthenticationBySCIM extends BaseProviderPanel {
constructor() { constructor() {
super(); super();
new PropertymappingsApi(DEFAULT_CONFIG) new PropertymappingsApi(DEFAULT_CONFIG)
.propertymappingsScopeList({ .propertymappingsScimList({
ordering: "scope_name", ordering: "managed",
}) })
.then((propertyMappings: PaginatedSCIMMappingList) => { .then((propertyMappings: PaginatedSCIMMappingList) => {
this.propertyMappings = propertyMappings; this.propertyMappings = propertyMappings;
}); });
} }
propertyMappingConfiguration(provider?: SCIMProvider) {
const propertyMappings = this.propertyMappings?.results ?? [];
const configuredMappings = (providerMappings: string[]) =>
propertyMappings.map((pm) => pm.pk).filter((pmpk) => providerMappings.includes(pmpk));
const managedMappings = (key: string) =>
propertyMappings
.filter((pm) => pm.managed === `goauthentik.io/providers/scim/${key}`)
.map((pm) => pm.pk);
const pmUserValues = provider?.propertyMappings
? configuredMappings(provider?.propertyMappings ?? [])
: managedMappings("user");
const pmGroupValues = provider?.propertyMappingsGroup
? configuredMappings(provider?.propertyMappingsGroup ?? [])
: managedMappings("group");
const propertyPairs = propertyMappings.map((pm) => [pm.pk, pm.name]);
return { pmUserValues, pmGroupValues, propertyPairs };
}
render() { render() {
const provider = this.wizard.provider as SCIMProvider | undefined; const provider = this.wizard.provider as SCIMProvider | undefined;
const errors = this.wizard.errors.provider;
return html`<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}> const { pmUserValues, pmGroupValues, propertyPairs } =
this.propertyMappingConfiguration(provider);
return html`<ak-wizard-title>${msg("Configure SCIM Provider")}</ak-wizard-title>
<form class="pf-c-form pf-m-horizontal" @input=${this.handleChange}>
<ak-text-input <ak-text-input
name="name" name="name"
label=${msg("Name")} label=${msg("Name")}
value=${ifDefined(provider?.name)} value=${ifDefined(provider?.name)}
.errorMessages=${errors?.name ?? []}
required required
></ak-text-input> ></ak-text-input>
<ak-form-group expanded> <ak-form-group expanded>
@ -58,12 +84,14 @@ export class ApplicationWizardAuthenticationBySCIM extends BaseProviderPanel {
value="${first(provider?.url, "")}" value="${first(provider?.url, "")}"
required required
help=${msg("SCIM base url, usually ends in /v2.")} help=${msg("SCIM base url, usually ends in /v2.")}
.errorMessages=${errors?.url ?? []}
> >
</ak-text-input> </ak-text-input>
<ak-text-input <ak-text-input
name="token" name="token"
label=${msg("Token")} label=${msg("Token")}
value="${first(provider?.token, "")}" value="${first(provider?.token, "")}"
.errorMessages=${errors?.token ?? []}
required required
help=${msg( help=${msg(
"Token to authenticate with. Currently only bearer authentication is supported.", "Token to authenticate with. Currently only bearer authentication is supported.",
@ -81,31 +109,9 @@ export class ApplicationWizardAuthenticationBySCIM extends BaseProviderPanel {
label=${msg("Exclude service accounts")} label=${msg("Exclude service accounts")}
></ak-switch-input> ></ak-switch-input>
<ak-form-element-horizontal label=${msg("Group")} name="filterGroup"> <ak-form-element-horizontal label=${msg("Group")} name="filterGroup">
<ak-search-select <ak-core-group-search
.fetchObjects=${async (query?: string): Promise<Group[]> => { .group=${provider?.filterGroup}
const args: CoreGroupsListRequest = { ></ak-core-group-search>
ordering: "name",
};
if (query !== undefined) {
args.search = query;
}
const groups = await new CoreApi(DEFAULT_CONFIG).coreGroupsList(
args,
);
return groups.results;
}}
.renderElement=${(group: Group): string => {
return group.name;
}}
.value=${(group: Group | undefined): string | undefined => {
return group ? group.pk : undefined;
}}
.selected=${(group: Group): boolean => {
return group.pk === provider?.filterGroup;
}}
?blankable=${true}
>
</ak-search-select>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Only sync users within the selected group.")} ${msg("Only sync users within the selected group.")}
</p> </p>
@ -115,71 +121,32 @@ export class ApplicationWizardAuthenticationBySCIM extends BaseProviderPanel {
<ak-form-group ?expanded=${true}> <ak-form-group ?expanded=${true}>
<span slot="header"> ${msg("Attribute mapping")} </span> <span slot="header"> ${msg("Attribute mapping")} </span>
<div slot="body" class="pf-c-form"> <div slot="body" class="pf-c-form">
<ak-form-element-horizontal <ak-multi-select
label=${msg("User Property Mappings")} label=${msg("User Property Mappings")}
?required=${true} required
name="propertyMappings" name="propertyMappings"
> .options=${propertyPairs}
<select class="pf-c-form-control" multiple> .values=${pmUserValues}
${this.propertyMappings?.results.map((mapping) => { .richhelp=${html` <p class="pf-c-form__helper-text">
let selected = false; ${msg("Property mappings used for user mapping.")}
if (!provider?.propertyMappings) {
selected =
mapping.managed === "goauthentik.io/providers/scim/user" ||
false;
} else {
selected = Array.from(provider?.propertyMappings).some((su) => {
return su == mapping.pk;
});
}
return html`<option
value=${ifDefined(mapping.pk)}
?selected=${selected}
>
${mapping.name}
</option>`;
})}
</select>
<p class="pf-c-form__helper-text">
${msg("Property mappings used to user mapping.")}
</p> </p>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Hold control/command to select multiple items.")} ${msg("Hold control/command to select multiple items.")}
</p> </p>`}
</ak-form-element-horizontal> ></ak-multi-select>
<ak-form-element-horizontal <ak-multi-select
label=${msg("Group Property Mappings")} label=${msg("Group Property Mappings")}
?required=${true} required
name="propertyMappingsGroup" name="propertyMappingsGroup"
> .options=${propertyPairs}
<select class="pf-c-form-control" multiple> .values=${pmGroupValues}
${this.propertyMappings?.results.map((mapping) => { .richhelp=${html` <p class="pf-c-form__helper-text">
let selected = false; ${msg("Property mappings used for group creation.")}
if (!provider?.propertyMappingsGroup) {
selected =
mapping.managed === "goauthentik.io/providers/scim/group";
} else {
selected = Array.from(provider?.propertyMappingsGroup).some(
(su) => {
return su == mapping.pk;
},
);
}
return html`<option
value=${ifDefined(mapping.pk)}
?selected=${selected}
>
${mapping.name}
</option>`;
})}
</select>
<p class="pf-c-form__helper-text">
${msg("Property mappings used to group creation.")}
</p> </p>
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${msg("Hold control/command to select multiple items.")} ${msg("Hold control/command to select multiple items.")}
</p> </p>`}
</ak-form-element-horizontal> ></ak-multi-select>
</div> </div>
</ak-form-group> </ak-form-group>
</form>`; </form>`;

View File

@ -15,6 +15,12 @@ import "./commit/ak-application-wizard-commit-application";
import "./methods/ak-application-wizard-authentication-method"; import "./methods/ak-application-wizard-authentication-method";
import { ApplicationStep as ApplicationStepType } from "./types"; import { ApplicationStep as ApplicationStepType } from "./types";
/**
* In the current implementation, all of the child forms have access to the wizard's
* global context, into which all data is written, and which is updated by events
* flowing into the top-level orchestrator.
*/
class ApplicationStep implements ApplicationStepType { class ApplicationStep implements ApplicationStepType {
id = "application"; id = "application";
label = "Application Details"; label = "Application Details";

View File

@ -3,7 +3,7 @@ import { customElement } from "@lit/reactive-element/decorators/custom-element.j
import { state } from "@lit/reactive-element/decorators/state.js"; import { state } from "@lit/reactive-element/decorators/state.js";
import { LitElement, html } from "lit"; import { LitElement, html } from "lit";
import applicationWizardContext from "../ContextIdentity"; import { applicationWizardContext } from "../ContextIdentity";
import type { ApplicationWizardState } from "../types"; import type { ApplicationWizardState } from "../types";
@customElement("ak-application-context-display-for-test") @customElement("ak-application-context-display-for-test")

View File

@ -9,6 +9,7 @@ import {
type RadiusProviderRequest, type RadiusProviderRequest,
type SAMLProviderRequest, type SAMLProviderRequest,
type SCIMProviderRequest, type SCIMProviderRequest,
type ValidationError,
} from "@goauthentik/api"; } from "@goauthentik/api";
export type OneOfProvider = export type OneOfProvider =
@ -24,12 +25,13 @@ export interface ApplicationWizardState {
providerModel: string; providerModel: string;
app: Partial<ApplicationRequest>; app: Partial<ApplicationRequest>;
provider: OneOfProvider; provider: OneOfProvider;
errors: ValidationError;
} }
type StatusType = "invalid" | "valid" | "submitted" | "failed"; type StatusType = "invalid" | "valid" | "submitted" | "failed";
export type ApplicationWizardStateUpdate = { export type ApplicationWizardStateUpdate = {
update?: Partial<ApplicationWizardState>; update?: ApplicationWizardState;
status?: StatusType; status?: StatusType;
}; };

View File

@ -1,120 +0,0 @@
/** Taken from: https://github.com/zellwk/javascript/tree/master
*
* We have added some typescript annotations, but this is such a rich feature with deep nesting
* we'll just have to watch it closely for any issues. So far there don't seem to be any.
*
*/
function objectType<T>(value: T) {
return Object.prototype.toString.call(value);
}
// Creates a deep clone for each value
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function cloneDescriptorValue(value: any) {
// Arrays
if (objectType(value) === "[object Array]") {
const array = [];
for (let v of value) {
v = cloneDescriptorValue(v);
array.push(v);
}
return array;
}
// Objects
if (objectType(value) === "[object Object]") {
const obj = {};
const props = Object.keys(value);
for (const prop of props) {
const descriptor = Object.getOwnPropertyDescriptor(value, prop);
if (!descriptor) {
continue;
}
if (descriptor.value) {
descriptor.value = cloneDescriptorValue(descriptor.value);
}
Object.defineProperty(obj, prop, descriptor);
}
return obj;
}
// Other Types of Objects
if (objectType(value) === "[object Date]") {
return new Date(value.getTime());
}
if (objectType(value) === "[object Map]") {
const map = new Map();
for (const entry of value) {
map.set(entry[0], cloneDescriptorValue(entry[1]));
}
return map;
}
if (objectType(value) === "[object Set]") {
const set = new Set();
for (const entry of value.entries()) {
set.add(cloneDescriptorValue(entry[0]));
}
return set;
}
// Types we don't need to clone or cannot clone.
// Examples:
// - Primitives don't need to clone
// - Functions cannot clone
return value;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _merge(output: Record<string, any>, input: Record<string, any>) {
const props = Object.keys(input);
for (const prop of props) {
// Prevents Prototype Pollution
if (prop === "__proto__") continue;
const descriptor = Object.getOwnPropertyDescriptor(input, prop);
if (!descriptor) {
continue;
}
const value = descriptor.value;
if (value) descriptor.value = cloneDescriptorValue(value);
// If don't have prop => Define property
// [ken@goauthentik] Using `hasOwn` is preferable over
// the basic identity test, according to Typescript.
if (!Object.hasOwn(output, prop)) {
Object.defineProperty(output, prop, descriptor);
continue;
}
// If have prop, but type is not object => Overwrite by redefining property
if (typeof output[prop] !== "object") {
Object.defineProperty(output, prop, descriptor);
continue;
}
// If have prop, but type is Object => Concat the arrays together.
if (objectType(descriptor.value) === "[object Array]") {
output[prop] = output[prop].concat(descriptor.value);
continue;
}
// If have prop, but type is Object => Merge.
_merge(output[prop], descriptor.value);
}
}
export function merge(...sources: Array<object>) {
const result = {};
for (const source of sources) {
_merge(result, source);
}
return result;
}
export default merge;

View File

@ -54,6 +54,13 @@ export function camelToSnake(key: string): string {
return result.split(" ").join("_").toLowerCase(); return result.split(" ").join("_").toLowerCase();
} }
const capitalize = (key: string) => (key.length === 0 ? "" : key[0].toUpperCase() + key.slice(1));
export function snakeToCamel(key: string) {
const [start, ...rest] = key.split("_");
return [start, ...rest.map(capitalize)].join("");
}
export function groupBy<T>(objects: T[], callback: (obj: T) => string): Array<[string, T[]]> { export function groupBy<T>(objects: T[], callback: (obj: T) => string): Array<[string, T[]]> {
const m = new Map<string, T[]>(); const m = new Map<string, T[]>();
objects.forEach((obj) => { objects.forEach((obj) => {

View File

@ -0,0 +1,72 @@
import { AKElement } from "@goauthentik/elements/Base";
import { TemplateResult, html, nothing } from "lit";
import { property } from "lit/decorators.js";
type HelpType = TemplateResult | typeof nothing;
export class HorizontalLightComponent extends AKElement {
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
// we're not actually using that and, for the meantime, we need the form handlers to be able to
// find the children of this component.
//
// TODO: This abstraction is wrong; it's putting *more* layers in as a way of managing the
// visual clutter and legibility issues of ak-form-elemental-horizontal and patternfly in
// general.
protected createRenderRoot() {
return this;
}
@property({ type: String })
name!: string;
@property({ type: String })
label = "";
@property({ type: Boolean })
required = false;
@property({ type: String })
help = "";
@property({ type: Object })
bighelp?: TemplateResult | TemplateResult[];
@property({ type: Boolean })
hidden = false;
@property({ type: Boolean })
invalid = false;
@property({ attribute: false })
errorMessages: string[] = [];
renderControl() {
throw new Error("Must be implemented in a subclass");
}
renderHelp(): HelpType[] {
const bigHelp: HelpType[] = Array.isArray(this.bighelp)
? this.bighelp
: [this.bighelp ?? nothing];
return [
this.help ? html`<p class="pf-c-form__helper-text">${this.help}</p>` : nothing,
...bigHelp,
];
}
render() {
// prettier-ignore
return html`<ak-form-element-horizontal
label=${this.label}
?required=${this.required}
?hidden=${this.hidden}
name=${this.name}
.errorMessages=${this.errorMessages}
?invalid=${this.invalid}
>
${this.renderControl()}
${this.renderHelp()}
</ak-form-element-horizontal> `;
}
}

View File

@ -0,0 +1,150 @@
import "@goauthentik/app/elements/forms/HorizontalFormElement";
import { AKElement } from "@goauthentik/elements/Base";
import { TemplateResult, css, html, nothing } from "lit";
import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { map } from "lit/directives/map.js";
import { Ref, createRef, ref } from "lit/directives/ref.js";
import PFForm from "@patternfly/patternfly/components/Form/form.css";
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";
type Pair = [string, string];
const selectStyles = css`
select[multiple] {
min-height: 15rem;
}
`;
/**
* Horizontal layout control with a multi-select.
*
* @part select - The select itself, to override the height specified above.
*/
@customElement("ak-multi-select")
export class AkMultiSelect extends AKElement {
constructor() {
super();
this.dataset.akControl = "true";
}
static get styles() {
return [PFBase, PFForm, PFFormControl, selectStyles];
}
/**
* The [name] attribute, which is also distributed to the layout manager and the input control.
*/
@property({ type: String })
name!: string;
/**
* The text label to display on the control
*/
@property({ type: String })
label = "";
/**
* The values to be displayed in the select. The format is [Value, Label], where the label is
* what will be displayed.
*/
@property({ attribute: false })
options: Pair[] = [];
/**
* If true, at least one object must be selected
*/
@property({ type: Boolean })
required = false;
/**
* Supporting a simple help string
*/
@property({ type: String })
help = "";
/**
* For more complex help instructions, provide a template result.
*/
@property({ type: Object })
bighelp!: TemplateResult | TemplateResult[];
/**
* An array of strings representing the objects currently selected.
*/
@property({ type: Array })
values: string[] = [];
/**
* Helper accessor for older code
*/
get value() {
return this.values;
}
/**
* One of two criteria (the other being the data-ak-control flag) that specifies this as a
* control that produces values of specific interest to our REST API. This is our modern
* accessor name.
*/
json() {
return this.values;
}
renderHelp() {
return [
this.help ? html`<p class="pf-c-form__helper-text">${this.help}</p>` : nothing,
this.bighelp ? this.bighelp : nothing,
];
}
handleChange(ev: Event) {
if (ev.type === "change") {
this.values = Array.from(this.selectRef.value!.querySelectorAll("option"))
.filter((option) => option.selected)
.map((option) => option.value);
this.dispatchEvent(
new CustomEvent("ak-select", {
detail: this.values,
composed: true,
bubbles: true,
}),
);
}
}
selectRef: Ref<HTMLSelectElement> = createRef();
render() {
return html` <div class="pf-c-form">
<ak-form-element-horizontal
label=${this.label}
?required=${this.required}
name=${this.name}
>
<select
part="select"
class="pf-c-form-control"
name=${ifDefined(this.name)}
multiple
${ref(this.selectRef)}
@change=${this.handleChange}
>
${map(
this.options,
([value, label]) =>
html`<option value=${value} ?selected=${this.values.includes(value)}>
${label}
</option>`,
)}
</select>
${this.renderHelp()}
</ak-form-element-horizontal>
</div>`;
}
}
export default AkMultiSelect;

View File

@ -1,51 +1,21 @@
import { AKElement } from "@goauthentik/elements/Base"; import { html } from "lit";
import { html, nothing } from "lit";
import { customElement, property } from "lit/decorators.js"; import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { HorizontalLightComponent } from "./HorizontalLightComponent";
@customElement("ak-number-input") @customElement("ak-number-input")
export class AkNumberInput extends AKElement { export class AkNumberInput extends HorizontalLightComponent {
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
// we're not actually using that and, for the meantime, we need the form handlers to be able to
// find the children of this component.
//
// TODO: This abstraction is wrong; it's putting *more* layers in as a way of managing the
// visual clutter and legibility issues of ak-form-elemental-horizontal and patternfly in
// general.
protected createRenderRoot() {
return this;
}
@property({ type: String })
name!: string;
@property({ type: String })
label = "";
@property({ type: Number, reflect: true }) @property({ type: Number, reflect: true })
value = 0; value = 0;
@property({ type: Boolean }) renderControl() {
required = false; return html`<input
@property({ type: String })
help = "";
render() {
return html`<ak-form-element-horizontal
label=${this.label}
?required=${this.required}
name=${this.name}
>
<input
type="number" type="number"
value=${ifDefined(this.value)} value=${ifDefined(this.value)}
class="pf-c-form-control" class="pf-c-form-control"
?required=${this.required} ?required=${this.required}
/> />`;
${this.help ? html`<p class="pf-c-form__helper-text">${this.help}</p>` : nothing}
</ak-form-element-horizontal> `;
} }
} }

View File

@ -1,35 +1,13 @@
import { AKElement } from "@goauthentik/elements/Base";
import { RadioOption } from "@goauthentik/elements/forms/Radio"; import { RadioOption } from "@goauthentik/elements/forms/Radio";
import "@goauthentik/elements/forms/Radio"; import "@goauthentik/elements/forms/Radio";
import { html, nothing } from "lit"; import { html, nothing } from "lit";
import { customElement, property } from "lit/decorators.js"; import { customElement, property } from "lit/decorators.js";
import { HorizontalLightComponent } from "./HorizontalLightComponent";
@customElement("ak-radio-input") @customElement("ak-radio-input")
export class AkRadioInput<T> extends AKElement { export class AkRadioInput<T> extends HorizontalLightComponent {
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
// we're not actually using that and, for the meantime, we need the form handlers to be able to
// find the children of this component.
//
// TODO: This abstraction is wrong; it's putting *more* layers in as a way of managing the
// visual clutter and legibility issues of ak-form-elemental-horizontal and patternfly in
// general.
protected createRenderRoot() {
return this;
}
@property({ type: String })
name!: string;
@property({ type: String })
label = "";
@property({ type: String })
help = "";
@property({ type: Boolean })
required = false;
@property({ type: Object }) @property({ type: Object })
value!: T; value!: T;
@ -37,24 +15,25 @@ export class AkRadioInput<T> extends AKElement {
options: RadioOption<T>[] = []; options: RadioOption<T>[] = [];
handleInput(ev: CustomEvent) { handleInput(ev: CustomEvent) {
if ("detail" in ev) {
this.value = ev.detail.value; this.value = ev.detail.value;
} }
}
render() { renderHelp() {
return html`<ak-form-element-horizontal // This is weird, but Typescript says it's necessary?
label=${this.label} return [nothing as typeof nothing];
?required=${this.required} }
name=${this.name}
> renderControl() {
<ak-radio return html`<ak-radio
.options=${this.options} .options=${this.options}
.value=${this.value} .value=${this.value}
@input=${this.handleInput} @input=${this.handleInput}
></ak-radio> ></ak-radio>
${this.help.trim() ${this.help.trim()
? html`<p class="pf-c-form__helper-radio">${this.help}</p>` ? html`<p class="pf-c-form__helper-radio">${this.help}</p>`
: nothing} : nothing}`;
</ak-form-element-horizontal> `;
} }
} }

View File

@ -1,44 +1,16 @@
import { convertToSlug } from "@goauthentik/common/utils"; import { convertToSlug } from "@goauthentik/common/utils";
import { AKElement } from "@goauthentik/elements/Base";
import { TemplateResult, html, nothing } from "lit"; import { html } from "lit";
import { customElement, property, query } from "lit/decorators.js"; import { customElement, property, query } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { HorizontalLightComponent } from "./HorizontalLightComponent";
@customElement("ak-slug-input") @customElement("ak-slug-input")
export class AkSlugInput extends AKElement { export class AkSlugInput extends HorizontalLightComponent {
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
// we're not actually using that and, for the meantime, we need the form handlers to be able to
// find the children of this component.
//
// TODO: This abstraction is wrong; it's putting *more* layers in as a way of managing the
// visual clutter and legibility issues of ak-form-elemental-horizontal and patternfly in
// general.
protected createRenderRoot() {
return this;
}
@property({ type: String })
name!: string;
@property({ type: String })
label = "";
@property({ type: String, reflect: true }) @property({ type: String, reflect: true })
value = ""; value = "";
@property({ type: Boolean })
required = false;
@property({ type: String })
help = "";
@property({ type: Boolean })
hidden = false;
@property({ type: Object })
bighelp!: TemplateResult | TemplateResult[];
@property({ type: String }) @property({ type: String })
source = ""; source = "";
@ -59,13 +31,6 @@ export class AkSlugInput extends AKElement {
this.input.addEventListener("input", this.handleTouch); this.input.addEventListener("input", this.handleTouch);
} }
renderHelp() {
return [
this.help ? html`<p class="pf-c-form__helper-text">${this.help}</p>` : nothing,
this.bighelp ? this.bighelp : nothing,
];
}
// Do not stop propagation of this event; it must be sent up the tree so that a parent // Do not stop propagation of this event; it must be sent up the tree so that a parent
// component, such as a custom forms manager, may receive it. // component, such as a custom forms manager, may receive it.
handleTouch(ev: Event) { handleTouch(ev: Event) {
@ -150,21 +115,13 @@ export class AkSlugInput extends AKElement {
super.disconnectedCallback(); super.disconnectedCallback();
} }
render() { renderControl() {
return html`<ak-form-element-horizontal return html`<input
label=${this.label}
?required=${this.required}
?hidden=${this.hidden}
name=${this.name}
>
<input
type="text" type="text"
value=${ifDefined(this.value)} value=${ifDefined(this.value)}
class="pf-c-form-control" class="pf-c-form-control"
?required=${this.required} ?required=${this.required}
/> />`;
${this.renderHelp()}
</ak-form-element-horizontal> `;
} }
} }

View File

@ -1,65 +1,21 @@
import { AKElement } from "@goauthentik/elements/Base"; import { html } from "lit";
import { TemplateResult, html, nothing } from "lit";
import { customElement, property } from "lit/decorators.js"; import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js"; import { ifDefined } from "lit/directives/if-defined.js";
import { HorizontalLightComponent } from "./HorizontalLightComponent";
@customElement("ak-text-input") @customElement("ak-text-input")
export class AkTextInput extends AKElement { export class AkTextInput extends HorizontalLightComponent {
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but
// we're not actually using that and, for the meantime, we need the form handlers to be able to
// find the children of this component.
//
// TODO: This abstraction is wrong; it's putting *more* layers in as a way of managing the
// visual clutter and legibility issues of ak-form-elemental-horizontal and patternfly in
// general.
protected createRenderRoot() {
return this;
}
@property({ type: String })
name!: string;
@property({ type: String })
label = "";
@property({ type: String, reflect: true }) @property({ type: String, reflect: true })
value = ""; value = "";
@property({ type: Boolean }) renderControl() {
required = false; return html` <input
@property({ type: String })
help = "";
@property({ type: Boolean })
hidden = false;
@property({ type: Object })
bighelp!: TemplateResult | TemplateResult[];
renderHelp() {
return [
this.help ? html`<p class="pf-c-form__helper-text">${this.help}</p>` : nothing,
this.bighelp ? this.bighelp : nothing,
];
}
render() {
return html`<ak-form-element-horizontal
label=${this.label}
?required=${this.required}
?hidden=${this.hidden}
name=${this.name}
>
<input
type="text" type="text"
value=${ifDefined(this.value)} value=${ifDefined(this.value)}
class="pf-c-form-control" class="pf-c-form-control"
?required=${this.required} ?required=${this.required}
/> />`;
${this.renderHelp()}
</ak-form-element-horizontal> `;
} }
} }

View File

@ -1,57 +1,22 @@
import { AKElement } from "@goauthentik/elements/Base"; import { html } from "lit";
import { TemplateResult, html, nothing } from "lit";
import { customElement, property } from "lit/decorators.js"; import { customElement, property } from "lit/decorators.js";
import { HorizontalLightComponent } from "./HorizontalLightComponent";
@customElement("ak-textarea-input") @customElement("ak-textarea-input")
export class AkTextareaInput extends AKElement { export class AkTextareaInput extends HorizontalLightComponent {
// Render into the lightDOM. This effectively erases the shadowDOM nature of this component, but @property({ type: String, reflect: true })
// we're not actually using that and, for the meantime, we need the form handlers to be able to
// find the children of this component.
//
// TODO: This abstraction is wrong; it's putting *more* layers in as a way of managing the
// visual clutter and legibility issues of ak-form-elemental-horizontal and patternfly in
// general.
protected createRenderRoot() {
return this;
}
@property({ type: String })
name!: string;
@property({ type: String })
label = "";
@property({ type: String })
value = ""; value = "";
@property({ type: Boolean }) renderControl() {
required = false; // Prevent the leading spaces added by Prettier's whitespace algo
// prettier-ignore
@property({ type: String }) return html`<textarea
help = ""; class="pf-c-form-control"
@property({ type: Object })
bighelp!: TemplateResult | TemplateResult[];
renderHelp() {
return [
this.help ? html`<p class="pf-c-form__helper-textarea">${this.help}</p>` : nothing,
this.bighelp ? this.bighelp : nothing,
];
}
render() {
return html`<ak-form-element-horizontal
label=${this.label}
?required=${this.required} ?required=${this.required}
name=${this.name} name=${this.name}
> >${this.value !== undefined ? this.value : ""}</textarea
<textarea class="pf-c-form-control" ?required=${this.required} name=${this.name}> > `;
${this.value !== undefined ? this.value : ""}</textarea
>
${this.renderHelp()}
</ak-form-element-horizontal> `;
} }
} }

View File

@ -0,0 +1,79 @@
import "@goauthentik/elements/messages/MessageContainer";
import { Meta } from "@storybook/web-components";
import { TemplateResult, html, render } from "lit";
import "../ak-multi-select";
import AkMultiSelect from "../ak-multi-select";
const metadata: Meta<AkMultiSelect> = {
title: "Components / MultiSelect",
component: "ak-multi-select",
parameters: {
docs: {
description: {
component: "A stylized value control for multi-select displays",
},
},
},
};
export default metadata;
const container = (testItem: TemplateResult) =>
html` <div style="background: #fff; padding: 2em">
<style>
li {
display: block;
}
p {
margin-top: 1em;
}
</style>
${testItem}
<div id="message-pad" style="margin-top: 1em"></div>
</div>`;
const testOptions = [
["funky", "Option One: Funky"],
["strange", "Option Two: Strange"],
["weird", "Option Three: Weird"],
];
export const RadioInput = () => {
const result = "";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const displayChange = (ev: any) => {
const messagePad = document.getElementById("message-pad");
const component: AkMultiSelect | null = document.querySelector(
'ak-multi-select[name="ak-test-multi-select"]',
);
const results = html`
<p>Results from event:</p>
<ul style="list-style-type: disc">
${ev.target.value.map((v: string) => html`<li>${v}</li>`)}
</ul>
<p>Results from component:</p>
<ul style="list-style-type: disc">
${component!.json().map((v: string) => html`<li>${v}</li>`)}
</ul>
`;
render(results, messagePad!);
};
return container(
html`<ak-multi-select
@ak-select=${displayChange}
label="Test Radio Button"
name="ak-test-multi-select"
help="This is where you would read the help messages"
.options=${testOptions}
></ak-multi-select>
<div>${result}</div>`,
);
};

View File

@ -31,10 +31,15 @@ export interface KeyUnknown {
[key: string]: unknown; [key: string]: unknown;
} }
// Literally the only field `assignValue()` cares about.
type HTMLNamedElement = Pick<HTMLInputElement, "name">;
type AkControlElement = HTMLInputElement & { json: () => string | string[] };
/** /**
* Recursively assign `value` into `json` while interpreting the dot-path of `element.name` * Recursively assign `value` into `json` while interpreting the dot-path of `element.name`
*/ */
function assignValue(element: HTMLInputElement, value: unknown, json: KeyUnknown): void { function assignValue(element: HTMLNamedElement, value: unknown, json: KeyUnknown): void {
let parent = json; let parent = json;
if (!element.name?.includes(".")) { if (!element.name?.includes(".")) {
parent[element.name] = value; parent[element.name] = value;
@ -60,6 +65,16 @@ export function serializeForm<T extends KeyUnknown>(
const json: { [key: string]: unknown } = {}; const json: { [key: string]: unknown } = {};
elements.forEach((element) => { elements.forEach((element) => {
element.requestUpdate(); element.requestUpdate();
if (element.hidden) {
return;
}
// TODO: Tighten up the typing so that we can handle both.
if ("akControl" in element.dataset) {
assignValue(element, (element as unknown as AkControlElement).json(), json);
return;
}
const inputElement = element.querySelector<HTMLInputElement>("[name]"); const inputElement = element.querySelector<HTMLInputElement>("[name]");
if (element.hidden || !inputElement) { if (element.hidden || !inputElement) {
return; return;

View File

@ -5800,12 +5800,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s848288f8c2265aad"> <trans-unit id="s848288f8c2265aad">
<source>Your application has been saved</source> <source>Your application has been saved</source>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
</trans-unit> </trans-unit>
@ -6075,6 +6069,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -6077,12 +6077,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s848288f8c2265aad"> <trans-unit id="s848288f8c2265aad">
<source>Your application has been saved</source> <source>Your application has been saved</source>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
</trans-unit> </trans-unit>
@ -6352,6 +6346,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -5716,12 +5716,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s848288f8c2265aad"> <trans-unit id="s848288f8c2265aad">
<source>Your application has been saved</source> <source>Your application has been saved</source>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
</trans-unit> </trans-unit>
@ -5991,6 +5985,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -7617,14 +7617,6 @@ Les liaisons avec les groupes/utilisateurs sont vérifiées par rapport à l'uti
<source>Your application has been saved</source> <source>Your application has been saved</source>
<target>L'application a été sauvegardée</target> <target>L'application a été sauvegardée</target>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
<target>Dans l'application :</target>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
<target>Dans le fournisseur :</target>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
<target>Nom d'affichage de la méthode.</target> <target>Nom d'affichage de la méthode.</target>
@ -7986,6 +7978,51 @@ Les liaisons avec les groupes/utilisateurs sont vérifiées par rapport à l'uti
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
<target>Lorsqu'activé, l'étape acceptera toujours l'identifiant utilisateur donné et continuera.</target> <target>Lorsqu'activé, l'étape acceptera toujours l'identifiant utilisateur donné et continuera.</target>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -5924,12 +5924,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s848288f8c2265aad"> <trans-unit id="s848288f8c2265aad">
<source>Your application has been saved</source> <source>Your application has been saved</source>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
</trans-unit> </trans-unit>
@ -6199,6 +6193,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -7556,14 +7556,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<source>Your application has been saved</source> <source>Your application has been saved</source>
<target>Ŷōũŕ àƥƥĺĩćàţĩōń ĥàś ƀēēń śàvēď</target> <target>Ŷōũŕ àƥƥĺĩćàţĩōń ĥàś ƀēēń śàvēď</target>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
<target>Ĩń ţĥē Àƥƥĺĩćàţĩōń:</target>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
<target>Ĩń ţĥē Ƥŕōvĩďēŕ:</target>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
<target>Mēţĥōď'ś ďĩśƥĺàŷ Ńàmē.</target> <target>Mēţĥōď'ś ďĩśƥĺàŷ Ńàmē.</target>
@ -7732,149 +7724,258 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s4bd386db7302bb22"> <trans-unit id="s4bd386db7302bb22">
<source>Create With Wizard</source> <source>Create With Wizard</source>
<target>Ćŕēàţē Ŵĩţĥ Ŵĩźàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="s070fdfb03034ca9b"> <trans-unit id="s070fdfb03034ca9b">
<source>One hint, 'New Application Wizard', is currently hidden</source> <source>One hint, 'New Application Wizard', is currently hidden</source>
<target>Ōńē ĥĩńţ, 'Ńēŵ Àƥƥĺĩćàţĩōń Ŵĩźàŕď', ĩś ćũŕŕēńţĺŷ ĥĩďďēń</target>
</trans-unit> </trans-unit>
<trans-unit id="s61bd841e66966325"> <trans-unit id="s61bd841e66966325">
<source>External applications that use authentik as an identity provider via protocols like OAuth2 and SAML. All applications are shown here, even ones you cannot access.</source> <source>External applications that use authentik as an identity provider via protocols like OAuth2 and SAML. All applications are shown here, even ones you cannot access.</source>
<target>Ēxţēŕńàĺ àƥƥĺĩćàţĩōńś ţĥàţ ũśē àũţĥēńţĩķ àś àń ĩďēńţĩţŷ ƥŕōvĩďēŕ vĩà ƥŕōţōćōĺś ĺĩķē ŌÀũţĥ2 àńď ŚÀMĹ. Àĺĺ àƥƥĺĩćàţĩōńś àŕē śĥōŵń ĥēŕē, ēvēń ōńēś ŷōũ ćàńńōţ àććēśś.</target>
</trans-unit> </trans-unit>
<trans-unit id="s1cc306d8e28c4464"> <trans-unit id="s1cc306d8e28c4464">
<source>Deny message</source> <source>Deny message</source>
<target>Ďēńŷ mēśśàĝē</target>
</trans-unit> </trans-unit>
<trans-unit id="s6985c401e1100122"> <trans-unit id="s6985c401e1100122">
<source>Message shown when this stage is run.</source> <source>Message shown when this stage is run.</source>
<target>Mēśśàĝē śĥōŵń ŵĥēń ţĥĩś śţàĝē ĩś ŕũń.</target>
</trans-unit> </trans-unit>
<trans-unit id="s09f0c100d0ad2fec"> <trans-unit id="s09f0c100d0ad2fec">
<source>Open Wizard</source> <source>Open Wizard</source>
<target>Ōƥēń Ŵĩźàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="sf2ef885f7d0a101d"> <trans-unit id="sf2ef885f7d0a101d">
<source>Demo Wizard</source> <source>Demo Wizard</source>
<target>Ďēmō Ŵĩźàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="s77505ee5d2e45e53"> <trans-unit id="s77505ee5d2e45e53">
<source>Run the demo wizard</source> <source>Run the demo wizard</source>
<target>Ŕũń ţĥē ďēmō ŵĩźàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="s4498e890d47a8066"> <trans-unit id="s4498e890d47a8066">
<source>OAuth2/OIDC (Open Authorization/OpenID Connect)</source> <source>OAuth2/OIDC (Open Authorization/OpenID Connect)</source>
<target>ŌÀũţĥ2/ŌĨĎĆ (Ōƥēń Àũţĥōŕĩźàţĩōń/ŌƥēńĨĎ Ćōńńēćţ)</target>
</trans-unit> </trans-unit>
<trans-unit id="s4f2e195d09e2868c"> <trans-unit id="s4f2e195d09e2868c">
<source>LDAP (Lightweight Directory Access Protocol)</source> <source>LDAP (Lightweight Directory Access Protocol)</source>
<target>ĹĎÀƤ (Ĺĩĝĥţŵēĩĝĥţ Ďĩŕēćţōŕŷ Àććēśś Ƥŕōţōćōĺ)</target>
</trans-unit> </trans-unit>
<trans-unit id="s7f5bb0c9923315ed"> <trans-unit id="s7f5bb0c9923315ed">
<source>Forward Auth (Single Application)</source> <source>Forward Auth (Single Application)</source>
<target>Ƒōŕŵàŕď Àũţĥ (Śĩńĝĺē Àƥƥĺĩćàţĩōń)</target>
</trans-unit> </trans-unit>
<trans-unit id="sf8008d2d6b064b95"> <trans-unit id="sf8008d2d6b064b95">
<source>Forward Auth (Domain Level)</source> <source>Forward Auth (Domain Level)</source>
<target>Ƒōŕŵàŕď Àũţĥ (Ďōmàĩń Ĺēvēĺ)</target>
</trans-unit> </trans-unit>
<trans-unit id="sfa8a1ffa9fee07d3"> <trans-unit id="sfa8a1ffa9fee07d3">
<source>SAML (Security Assertion Markup Language)</source> <source>SAML (Security Assertion Markup Language)</source>
<target>ŚÀMĹ (Śēćũŕĩţŷ Àśśēŕţĩōń Màŕķũƥ Ĺàńĝũàĝē)</target>
</trans-unit> </trans-unit>
<trans-unit id="s848a23972e388662"> <trans-unit id="s848a23972e388662">
<source>RADIUS (Remote Authentication Dial-In User Service)</source> <source>RADIUS (Remote Authentication Dial-In User Service)</source>
<target>ŔÀĎĨŨŚ (Ŕēmōţē Àũţĥēńţĩćàţĩōń Ďĩàĺ-Ĩń Ũśēŕ Śēŕvĩćē)</target>
</trans-unit> </trans-unit>
<trans-unit id="s3e902999ddf7b50e"> <trans-unit id="s3e902999ddf7b50e">
<source>SCIM (System for Cross-domain Identity Management)</source> <source>SCIM (System for Cross-domain Identity Management)</source>
<target>ŚĆĨM (Śŷśţēm ƒōŕ Ćŕōśś-ďōmàĩń Ĩďēńţĩţŷ Màńàĝēmēńţ)</target>
</trans-unit> </trans-unit>
<trans-unit id="sdc5690be4a342985"> <trans-unit id="sdc5690be4a342985">
<source>The token has been copied to your clipboard</source> <source>The token has been copied to your clipboard</source>
<target>Ţĥē ţōķēń ĥàś ƀēēń ćōƥĩēď ţō ŷōũŕ ćĺĩƥƀōàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="s7f3edfee24690c9f"> <trans-unit id="s7f3edfee24690c9f">
<source>The token was displayed because authentik does not have permission to write to the clipboard</source> <source>The token was displayed because authentik does not have permission to write to the clipboard</source>
<target>Ţĥē ţōķēń ŵàś ďĩśƥĺàŷēď ƀēćàũśē àũţĥēńţĩķ ďōēś ńōţ ĥàvē ƥēŕmĩśśĩōń ţō ŵŕĩţē ţō ţĥē ćĺĩƥƀōàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="saf6097bfa25205b8"> <trans-unit id="saf6097bfa25205b8">
<source>A copy of this recovery link has been placed in your clipboard</source> <source>A copy of this recovery link has been placed in your clipboard</source>
<target>À ćōƥŷ ōƒ ţĥĩś ŕēćōvēŕŷ ĺĩńķ ĥàś ƀēēń ƥĺàćēď ĩń ŷōũŕ ćĺĩƥƀōàŕď</target>
</trans-unit> </trans-unit>
<trans-unit id="s5b8ee296ed258568"> <trans-unit id="s5b8ee296ed258568">
<source>The current tenant must have a recovery flow configured to use a recovery link</source> <source>The current tenant must have a recovery flow configured to use a recovery link</source>
<target>Ţĥē ćũŕŕēńţ ţēńàńţ mũśţ ĥàvē à ŕēćōvēŕŷ ƒĺōŵ ćōńƒĩĝũŕēď ţō ũśē à ŕēćōvēŕŷ ĺĩńķ</target>
</trans-unit> </trans-unit>
<trans-unit id="s895514dda9cb9c94"> <trans-unit id="s895514dda9cb9c94">
<source>Create recovery link</source> <source>Create recovery link</source>
<target>Ćŕēàţē ŕēćōvēŕŷ ĺĩńķ</target>
</trans-unit> </trans-unit>
<trans-unit id="se5c795faf2c07514"> <trans-unit id="se5c795faf2c07514">
<source>Create Recovery Link</source> <source>Create Recovery Link</source>
<target>Ćŕēàţē Ŕēćōvēŕŷ Ĺĩńķ</target>
</trans-unit> </trans-unit>
<trans-unit id="s84fcddede27b8e2a"> <trans-unit id="s84fcddede27b8e2a">
<source>External</source> <source>External</source>
<target>Ēxţēŕńàĺ</target>
</trans-unit> </trans-unit>
<trans-unit id="s1a635369edaf4dc3"> <trans-unit id="s1a635369edaf4dc3">
<source>Service account</source> <source>Service account</source>
<target>Śēŕvĩćē àććōũńţ</target>
</trans-unit> </trans-unit>
<trans-unit id="sff930bf2834e2201"> <trans-unit id="sff930bf2834e2201">
<source>Service account (internal)</source> <source>Service account (internal)</source>
<target>Śēŕvĩćē àććōũńţ (ĩńţēŕńàĺ)</target>
</trans-unit> </trans-unit>
<trans-unit id="s66313b45b69cfc88"> <trans-unit id="s66313b45b69cfc88">
<source>Check the release notes</source> <source>Check the release notes</source>
<target>Ćĥēćķ ţĥē ŕēĺēàśē ńōţēś</target>
</trans-unit> </trans-unit>
<trans-unit id="sb4d7bae2440d9781"> <trans-unit id="sb4d7bae2440d9781">
<source>User Statistics</source> <source>User Statistics</source>
<target>Ũśēŕ Śţàţĩśţĩćś</target>
</trans-unit> </trans-unit>
<trans-unit id="s0924f51b028233a3"> <trans-unit id="s0924f51b028233a3">
<source>&lt;No name set&gt;</source> <source>&lt;No name set&gt;</source>
<target>&lt;Ńō ńàmē śēţ&gt;</target>
</trans-unit> </trans-unit>
<trans-unit id="sdc9a6ad1af30572c"> <trans-unit id="sdc9a6ad1af30572c">
<source>For nginx's auth_request or traefik's forwardAuth</source> <source>For nginx's auth_request or traefik's forwardAuth</source>
<target>Ƒōŕ ńĝĩńx'ś àũţĥ_ŕēǫũēśţ ōŕ ţŕàēƒĩķ'ś ƒōŕŵàŕďÀũţĥ</target>
</trans-unit> </trans-unit>
<trans-unit id="sfc31264ef7ff86ef"> <trans-unit id="sfc31264ef7ff86ef">
<source>For nginx's auth_request or traefik's forwardAuth per root domain</source> <source>For nginx's auth_request or traefik's forwardAuth per root domain</source>
<target>Ƒōŕ ńĝĩńx'ś àũţĥ_ŕēǫũēśţ ōŕ ţŕàēƒĩķ'ś ƒōŕŵàŕďÀũţĥ ƥēŕ ŕōōţ ďōmàĩń</target>
</trans-unit> </trans-unit>
<trans-unit id="sc615309d10a9228c"> <trans-unit id="sc615309d10a9228c">
<source>RBAC is in preview.</source> <source>RBAC is in preview.</source>
<target>ŔßÀĆ ĩś ĩń ƥŕēvĩēŵ.</target>
</trans-unit> </trans-unit>
<trans-unit id="s32babfed740fd3c1"> <trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source> <source>User type used for newly created users.</source>
<target>Ũśēŕ ţŷƥē ũśēď ƒōŕ ńēŵĺŷ ćŕēàţēď ũśēŕś.</target>
</trans-unit> </trans-unit>
<trans-unit id="s4a34a6be4c68ec87"> <trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source> <source>Users created</source>
<target>Ũśēŕś ćŕēàţēď</target>
</trans-unit> </trans-unit>
<trans-unit id="s275c956687e2e656"> <trans-unit id="s275c956687e2e656">
<source>Failed logins</source> <source>Failed logins</source>
<target>Ƒàĩĺēď ĺōĝĩńś</target>
</trans-unit> </trans-unit>
<trans-unit id="sb35c08e3a541188f"> <trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source> <source>Also known as Client ID.</source>
<target>Àĺśō ķńōŵń àś Ćĺĩēńţ ĨĎ.</target>
</trans-unit> </trans-unit>
<trans-unit id="sd46fd9b647cfea10"> <trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source> <source>Also known as Client Secret.</source>
<target>Àĺśō ķńōŵń àś Ćĺĩēńţ Śēćŕēţ.</target>
</trans-unit> </trans-unit>
<trans-unit id="s4476e9c50cfd13f4"> <trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source> <source>Global status</source>
<target>Ĝĺōƀàĺ śţàţũś</target>
</trans-unit> </trans-unit>
<trans-unit id="sd21a971eea208533"> <trans-unit id="sd21a971eea208533">
<source>Vendor</source> <source>Vendor</source>
<target>Vēńďōŕ</target>
</trans-unit> </trans-unit>
<trans-unit id="sadadfe9dfa06d7dd"> <trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source> <source>No sync status.</source>
<target>Ńō śŷńć śţàţũś.</target>
</trans-unit> </trans-unit>
<trans-unit id="s2b1c81130a65a55b"> <trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source> <source>Sync currently running.</source>
<target>Śŷńć ćũŕŕēńţĺŷ ŕũńńĩńĝ.</target>
</trans-unit> </trans-unit>
<trans-unit id="sf36170f71cea38c2"> <trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source> <source>Connectivity</source>
<target>Ćōńńēćţĩvĩţŷ</target>
</trans-unit> </trans-unit>
<trans-unit id="sd94e99af8b41ff54"> <trans-unit id="sd94e99af8b41ff54">
<source>0: Too guessable: risky password. (guesses &amp;lt; 10^3)</source> <source>0: Too guessable: risky password. (guesses &amp;lt; 10^3)</source>
<target>0: Ţōō ĝũēśśàƀĺē: ŕĩśķŷ ƥàśśŵōŕď. (ĝũēśśēś &amp;ĺţ; 10^3)</target>
</trans-unit> </trans-unit>
<trans-unit id="sc926385d1a624c3a"> <trans-unit id="sc926385d1a624c3a">
<source>1: Very guessable: protection from throttled online attacks. (guesses &amp;lt; 10^6)</source> <source>1: Very guessable: protection from throttled online attacks. (guesses &amp;lt; 10^6)</source>
<target>1: Vēŕŷ ĝũēśśàƀĺē: ƥŕōţēćţĩōń ƒŕōm ţĥŕōţţĺēď ōńĺĩńē àţţàćķś. (ĝũēśśēś &amp;ĺţ; 10^6)</target>
</trans-unit> </trans-unit>
<trans-unit id="s8aae61c41319602c"> <trans-unit id="s8aae61c41319602c">
<source>2: Somewhat guessable: protection from unthrottled online attacks. (guesses &amp;lt; 10^8)</source> <source>2: Somewhat guessable: protection from unthrottled online attacks. (guesses &amp;lt; 10^8)</source>
<target>2: Śōmēŵĥàţ ĝũēśśàƀĺē: ƥŕōţēćţĩōń ƒŕōm ũńţĥŕōţţĺēď ōńĺĩńē àţţàćķś. (ĝũēśśēś &amp;ĺţ; 10^8)</target>
</trans-unit> </trans-unit>
<trans-unit id="sc1f4b57e722a89d6"> <trans-unit id="sc1f4b57e722a89d6">
<source>3: Safely unguessable: moderate protection from offline slow-hash scenario. (guesses &amp;lt; 10^10)</source> <source>3: Safely unguessable: moderate protection from offline slow-hash scenario. (guesses &amp;lt; 10^10)</source>
<target>3: Śàƒēĺŷ ũńĝũēśśàƀĺē: mōďēŕàţē ƥŕōţēćţĩōń ƒŕōm ōƒƒĺĩńē śĺōŵ-ĥàśĥ śćēńàŕĩō. (ĝũēśśēś &amp;ĺţ; 10^10)</target>
</trans-unit> </trans-unit>
<trans-unit id="sd47f3d3c9741343d"> <trans-unit id="sd47f3d3c9741343d">
<source>4: Very unguessable: strong protection from offline slow-hash scenario. (guesses &amp;gt;= 10^10)</source> <source>4: Very unguessable: strong protection from offline slow-hash scenario. (guesses &amp;gt;= 10^10)</source>
<target>4: Vēŕŷ ũńĝũēśśàƀĺē: śţŕōńĝ ƥŕōţēćţĩōń ƒŕōm ōƒƒĺĩńē śĺōŵ-ĥàśĥ śćēńàŕĩō. (ĝũēśśēś &amp;ĝţ;= 10^10)</target>
</trans-unit> </trans-unit>
<trans-unit id="s3d2a8b86a4f5a810"> <trans-unit id="s3d2a8b86a4f5a810">
<source>Successfully created user and added to group <x id="0" equiv-text="${this.group.name}"/></source> <source>Successfully created user and added to group <x id="0" equiv-text="${this.group.name}"/></source>
<target>Śũććēśśƒũĺĺŷ ćŕēàţēď ũśēŕ àńď àďďēď ţō ĝŕōũƥ <x id="0" equiv-text="${this.group.name}"/></target>
</trans-unit> </trans-unit>
<trans-unit id="s824e0943a7104668"> <trans-unit id="s824e0943a7104668">
<source>This user will be added to the group "<x id="0" equiv-text="${this.targetGroup.name}"/>".</source> <source>This user will be added to the group "<x id="0" equiv-text="${this.targetGroup.name}"/>".</source>
<target>Ţĥĩś ũśēŕ ŵĩĺĺ ƀē àďďēď ţō ţĥē ĝŕōũƥ "<x id="0" equiv-text="${this.targetGroup.name}"/>".</target>
</trans-unit> </trans-unit>
<trans-unit id="s62e7f6ed7d9cb3ca"> <trans-unit id="s62e7f6ed7d9cb3ca">
<source>Pretend user exists</source> <source>Pretend user exists</source>
<target>Ƥŕēţēńď ũśēŕ ēxĩśţś</target>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
<target>Ŵĥēń ēńàƀĺēď, ţĥē śţàĝē ŵĩĺĺ àĺŵàŷś àććēƥţ ţĥē ĝĩvēń ũśēŕ ĩďēńţĩƒĩēŕ àńď ćōńţĩńũē.</target>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
<target>Ţĥēŕē ŵàś àń ēŕŕōŕ ĩń ţĥē àƥƥĺĩćàţĩōń.</target>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
<target>Ŕēvĩēŵ ţĥē àƥƥĺĩćàţĩōń.</target>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
<target>Ţĥēŕē ŵàś àń ēŕŕōŕ ĩń ţĥē ƥŕōvĩďēŕ.</target>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
<target>Ŕēvĩēŵ ţĥē ƥŕōvĩďēŕ.</target>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
<target>Ţĥēŕē ŵàś àń ēŕŕōŕ</target>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
<target>Ţĥēŕē ŵàś àń ēŕŕōŕ ćŕēàţĩńĝ ţĥē àƥƥĺĩćàţĩōń, ƀũţ ńō ēŕŕōŕ mēśśàĝē ŵàś śēńţ. Ƥĺēàśē ŕēvĩēŵ ţĥē śēŕvēŕ ĺōĝś.</target>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
<target>Ćōńƒĩĝũŕē ĹĎÀƤ Ƥŕōvĩďēŕ</target>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
<target>Ćōńƒĩĝũŕē ŌÀũţĥ2/ŌƥēńĨď Ƥŕōvĩďēŕ</target>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
<target>Ćōńƒĩĝũŕē Ƥŕōxŷ Ƥŕōvĩďēŕ</target>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
<target>ÀďďĩţĩōńàĺŚćōƥēś</target>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
<target>Ćōńƒĩĝũŕē Ŕàďĩũś Ƥŕōvĩďēŕ</target>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
<target>Ćōńƒĩĝũŕē ŚÀMĹ Ƥŕōvĩďēŕ</target>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
<target>Ƥŕōƥēŕţŷ màƥƥĩńĝś ũśēď ƒōŕ ũśēŕ màƥƥĩńĝ.</target>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
<target>Ćōńƒĩĝũŕē ŚĆĨM Ƥŕōvĩďēŕ</target>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
<target>Ƥŕōƥēŕţŷ màƥƥĩńĝś ũśēď ƒōŕ ĝŕōũƥ ćŕēàţĩōń.</target>
</trans-unit> </trans-unit>
</body></file></xliff> </body></file></xliff>

View File

@ -5709,12 +5709,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s848288f8c2265aad"> <trans-unit id="s848288f8c2265aad">
<source>Your application has been saved</source> <source>Your application has been saved</source>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
</trans-unit> </trans-unit>
@ -5984,6 +5978,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -7619,14 +7619,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<source>Your application has been saved</source> <source>Your application has been saved</source>
<target>您的应用程序已保存</target> <target>您的应用程序已保存</target>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
<target>在应用程序中:</target>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
<target>在提供程序中:</target>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
<target>方法的显示名称。</target> <target>方法的显示名称。</target>
@ -7988,6 +7980,51 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
<target>启用时,此阶段总是会接受指定的用户 ID 并继续。</target> <target>启用时,此阶段总是会接受指定的用户 ID 并继续。</target>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -5757,12 +5757,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s848288f8c2265aad"> <trans-unit id="s848288f8c2265aad">
<source>Your application has been saved</source> <source>Your application has been saved</source>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
</trans-unit> </trans-unit>
@ -6032,6 +6026,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s52bdc80690a9a8dc"> <trans-unit id="s52bdc80690a9a8dc">
<source>When enabled, the stage will always accept the given user identifier and continue.</source> <source>When enabled, the stage will always accept the given user identifier and continue.</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

View File

@ -7555,14 +7555,6 @@ Bindings to groups/users are checked against the user of the event.</source>
<source>Your application has been saved</source> <source>Your application has been saved</source>
<target>已經儲存您的應用程式</target> <target>已經儲存您的應用程式</target>
</trans-unit> </trans-unit>
<trans-unit id="sf60f1e5b76897c93">
<source>In the Application:</source>
<target>在應用程式:</target>
</trans-unit>
<trans-unit id="s7ce65cf482b7bff0">
<source>In the Provider:</source>
<target>在供應商:</target>
</trans-unit>
<trans-unit id="s67d858051b34c38b"> <trans-unit id="s67d858051b34c38b">
<source>Method's display Name.</source> <source>Method's display Name.</source>
<target>方法的顯示名稱。</target> <target>方法的顯示名稱。</target>
@ -7925,6 +7917,51 @@ Bindings to groups/users are checked against the user of the event.</source>
</trans-unit> </trans-unit>
<trans-unit id="s5d7748b1d2363478"> <trans-unit id="s5d7748b1d2363478">
<source>Are you sure you want to remove the selected users from the group <x id="0" equiv-text="${this.targetGroup?.name}"/>?</source> <source>Are you sure you want to remove the selected users from the group <x id="0" equiv-text="${this.targetGroup?.name}"/>?</source>
</trans-unit>
<trans-unit id="scda8dc24b561e205">
<source>There was an error in the application.</source>
</trans-unit>
<trans-unit id="sdaca9c2c0361ed3a">
<source>Review the application.</source>
</trans-unit>
<trans-unit id="sb50000a8fada5672">
<source>There was an error in the provider.</source>
</trans-unit>
<trans-unit id="s21f95eaf151d4ce3">
<source>Review the provider.</source>
</trans-unit>
<trans-unit id="s9fd39a5cb20b4e61">
<source>There was an error</source>
</trans-unit>
<trans-unit id="s7a6b3453209e1066">
<source>There was an error creating the application, but no error message was sent. Please review the server logs.</source>
</trans-unit>
<trans-unit id="s1a711c19cda48375">
<source>Configure LDAP Provider</source>
</trans-unit>
<trans-unit id="s9368e965b5c292ab">
<source>Configure OAuth2/OpenId Provider</source>
</trans-unit>
<trans-unit id="sf5cbccdc6254c8dc">
<source>Configure Proxy Provider</source>
</trans-unit>
<trans-unit id="sf6d46bb442b77e91">
<source>AdditionalScopes</source>
</trans-unit>
<trans-unit id="s2c8c6f89089b31d4">
<source>Configure Radius Provider</source>
</trans-unit>
<trans-unit id="sfe906cde5dddc041">
<source>Configure SAML Provider</source>
</trans-unit>
<trans-unit id="sb3defbacd01ad972">
<source>Property mappings used for user mapping.</source>
</trans-unit>
<trans-unit id="s7ccce0ec8d228db6">
<source>Configure SCIM Provider</source>
</trans-unit>
<trans-unit id="sd7728d2b6e1d25e9">
<source>Property mappings used for group creation.</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>