Skip to content

Commit

Permalink
Merge branch 'main' into sdko/docs/style-guide-n-template/prepare-2025-2
Browse files Browse the repository at this point in the history
  • Loading branch information
dominic-r authored Feb 14, 2025
2 parents 76eaa07 + 3d2bd4d commit c1dea33
Show file tree
Hide file tree
Showing 56 changed files with 628 additions and 232 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ COPY ./gen-ts-api /work/web/node_modules/@goauthentik/api
RUN npm run build

# Stage 3: Build go proxy
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.24-fips-bookworm AS go-builder
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.23-fips-bookworm AS go-builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion ldap.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

# Stage 1: Build
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.24-fips-bookworm AS builder
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.23-fips-bookworm AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion proxy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY web .
RUN npm run build-proxy

# Stage 2: Build
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.24-fips-bookworm AS builder
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.23-fips-bookworm AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion rac.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

# Stage 1: Build
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.24-fips-bookworm AS builder
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.23-fips-bookworm AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion radius.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

# Stage 1: Build
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.24-fips-bookworm AS builder
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/oss/go/microsoft/golang:1.23-fips-bookworm AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
5 changes: 3 additions & 2 deletions web/src/admin/admin-settings/AdminSettingsFooterLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ export class FooterLinkInput extends AkControlElement<FooterLink> {
tabindex="1"
/>
<input
type="text"
type="url"
@change=${onChange}
value="${ifDefined(this.footerLink.href ?? undefined)}"
class="pf-c-form-control ak-form-control"
class="pf-c-form-control ak-form-control pf-m-monospace"
autocomplete="off"
required
placeholder=${msg("URL")}
name="href"
Expand Down
6 changes: 5 additions & 1 deletion web/src/admin/admin-settings/AdminSettingsForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export class AdminSettingsForm extends Form<SettingsRequest> {
name="avatars"
label=${msg("Avatars")}
value="${ifDefined(this._settings?.avatars)}"
inputHint="code"
.bighelp=${html`
<p class="pf-c-form__helper-text">
${msg(
Expand Down Expand Up @@ -156,14 +157,16 @@ export class AdminSettingsForm extends Form<SettingsRequest> {
<ak-text-input
name="eventRetention"
label=${msg("Event retention")}
inputHint="code"
required
value="${ifDefined(this._settings?.eventRetention)}"
.bighelp=${html`<p class="pf-c-form__helper-text">
${msg("Duration after which events will be deleted from the database.")}
</p>
<p class="pf-c-form__helper-text">
${msg(
'When using an external logging solution for archiving, this can be set to "minutes=5".',
html`When using an external logging solution for archiving, this can be
set to <code>minutes=5</code>.`,
)}
</p>
<p class="pf-c-form__helper-text">
Expand Down Expand Up @@ -218,6 +221,7 @@ export class AdminSettingsForm extends Form<SettingsRequest> {
<ak-text-input
name="defaultTokenDuration"
label=${msg("Default token duration")}
inputHint="code"
required
value="${ifDefined(this._settings?.defaultTokenDuration)}"
.bighelp=${html`<p class="pf-c-form__helper-text">
Expand Down
3 changes: 3 additions & 0 deletions web/src/admin/applications/ApplicationForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Applicatio
label=${msg("Slug")}
required
help=${msg("Internal application name used in URLs.")}
inputHint="code"
></ak-text-input>
<ak-text-input
name="group"
Expand All @@ -142,6 +143,7 @@ export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Applicatio
help=${msg(
"Optionally enter a group name. Applications with identical groups are shown grouped together.",
)}
inputHint="code"
></ak-text-input>
<ak-provider-search-input
name="provider"
Expand Down Expand Up @@ -182,6 +184,7 @@ export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Applicatio
help=${msg(
"If left empty, authentik will try to extract the launch URL based on the selected provider.",
)}
inputHint="code"
></ak-text-input>
<ak-switch-input
name="openInNewTab"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class ApplicationWizardApplicationStep extends ApplicationWizardStep {
?invalid=${errors.slug ?? this.errors.has("slug")}
.errorMessages=${this.errorMessages("slug")}
help=${msg("Internal application name used in URLs.")}
inputHint="code"
></ak-slug-input>
<ak-text-input
name="group"
Expand All @@ -137,6 +138,7 @@ export class ApplicationWizardApplicationStep extends ApplicationWizardStep {
help=${msg(
"Optionally enter a group name. Applications with identical groups are shown grouped together.",
)}
inputHint="code"
></ak-text-input>
<ak-radio-input
label=${msg("Policy engine mode")}
Expand All @@ -159,6 +161,7 @@ export class ApplicationWizardApplicationStep extends ApplicationWizardStep {
help=${msg(
"If left empty, authentik will try to extract the launch URL based on the selected provider.",
)}
inputHint="code"
></ak-text-input>
<ak-switch-input
name="openInNewTab"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class ApplicationWizardRACProviderForm extends ApplicationWizardProviderF
help=${msg(
"Determines how long a session lasts before being disconnected and requiring re-authorization.",
)}
inputHint="code"
></ak-text-input>
<ak-form-group .expanded=${true}>
Expand Down
13 changes: 10 additions & 3 deletions web/src/admin/brands/BrandForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export class BrandForm extends ModelForm<Brand, string> {
<input
type="text"
value="${first(this.instance?.domain, window.location.host)}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
inputmode="url"
required
/>
<p class="pf-c-form__helper-text">
Expand Down Expand Up @@ -116,7 +119,9 @@ export class BrandForm extends ModelForm<Brand, string> {
<input
type="text"
value="${first(this.instance?.brandingLogo, DefaultBrand.brandingLogo)}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
required
/>
<p class="pf-c-form__helper-text">
Expand All @@ -134,7 +139,9 @@ export class BrandForm extends ModelForm<Brand, string> {
this.instance?.brandingFavicon,
DefaultBrand.brandingFavicon,
)}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
required
/>
<p class="pf-c-form__helper-text">
Expand Down
14 changes: 12 additions & 2 deletions web/src/admin/crypto/CertificateKeyPairForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,25 @@ export class CertificateKeyPairForm extends ModelForm<CertificateKeyPair, string
?writeOnly=${this.instance !== undefined}
?required=${true}
>
<textarea class="pf-c-form-control" required></textarea>
<textarea
autocomplete="off"
spellcheck="false"
class="pf-c-form-control pf-m-monospace"
placeholder="-----BEGIN CERTIFICATE-----"
required
></textarea>
<p class="pf-c-form__helper-text">${msg("PEM-encoded Certificate data.")}</p>
</ak-form-element-horizontal>
<ak-form-element-horizontal
name="keyData"
?writeOnly=${this.instance !== undefined}
label=${msg("Private Key")}
>
<textarea class="pf-c-form-control"></textarea>
<textarea
autocomplete="off"
class="pf-c-form-control pf-m-monospace"
spellcheck="false"
></textarea>
<p class="pf-c-form__helper-text">
${msg(
"Optional Private Key. If this is set, you can use this keypair for encryption.",
Expand Down
25 changes: 19 additions & 6 deletions web/src/admin/enterprise/EnterpriseLicenseForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,26 @@ export class EnterpriseLicenseForm extends ModelForm<License, string> {
}

renderForm(): TemplateResult {
// prettier-ignore
return html`
<ak-form-element-horizontal label=${msg("Install ID")}>
<input class="pf-c-form-control" readonly type="text" value="${ifDefined(this.installID)}" />
return html` <ak-form-element-horizontal label=${msg("Install ID")}>
<input
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
readonly
type="text"
value="${ifDefined(this.installID)}"
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal name="key" ?writeOnly=${this.instance !== undefined} label=${msg("License key")}>
<textarea class="pf-c-form-control"></textarea>
<ak-form-element-horizontal
name="key"
?writeOnly=${this.instance !== undefined}
label=${msg("License key")}
>
<textarea
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
></textarea>
</ak-form-element-horizontal>`;
}
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/admin/enterprise/EnterpriseLicenseListPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class EnterpriseLicenseListPage extends TablePage<License> {

const renderCard = (installID: string) => html`
<div class="pf-c-card__title">${msg("Your Install ID")}</div>
<div class="pf-c-card__body install-id">${installID}</div>
<div class="pf-c-card__body install-id pf-m-monospace">${installID}</div>
<div class="pf-c-card__body">
<a
target="_blank"
Expand Down
4 changes: 3 additions & 1 deletion web/src/admin/flows/FlowForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export class FlowForm extends WithCapabilitiesConfig(ModelForm<Flow, string>) {
<input
type="text"
value="${ifDefined(this.instance?.slug)}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
required
/>
<p class="pf-c-form__helper-text">${msg("Visible in the URL.")}</p>
Expand Down
9 changes: 7 additions & 2 deletions web/src/admin/outposts/ServiceConnectionDockerForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,17 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
<input
type="text"
value="${ifDefined(this.instance?.url)}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
inputmode="url"
required
/>
<p class="pf-c-form__helper-text">
${msg(
"Can be in the format of 'unix://' when connecting to a local docker daemon, using 'ssh://' to connect via SSH, or 'https://:2376' when connecting to a remote system.",
html`Can be in the format of <code>unix://</code> when connecting to a local
docker daemon, using <code>ssh://</code> to connect via SSH, or
<code>https://:2376</code> when connecting to a remote system.`,
)}
</p>
</ak-form-element-horizontal>
Expand Down
32 changes: 17 additions & 15 deletions web/src/admin/policies/PolicyWizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ export class PolicyWizard extends AKElement {
});
}

selectListener = ({ detail }: CustomEvent<TypeCreate>) => {
if (!this.wizard) return;

const { component, modelName } = detail;
const idx = this.wizard.steps.indexOf("initial") + 1;

// Exclude all current steps starting with type-,
// this happens when the user selects a type and then goes back
this.wizard.steps = this.wizard.steps.filter((step) => !step.startsWith("type-"));

this.wizard.steps.splice(idx, 0, `type-${component}-${modelName}`);

this.wizard.isValid = true;
};

render(): TemplateResult {
return html`
<ak-wizard
Expand All @@ -62,23 +77,10 @@ export class PolicyWizard extends AKElement {
<ak-wizard-page-type-create
slot="initial"
.types=${this.policyTypes}
@select=${(ev: CustomEvent<TypeCreate>) => {
if (!this.wizard) return;
const idx = this.wizard.steps.indexOf("initial") + 1;
// Exclude all current steps starting with type-,
// this happens when the user selects a type and then goes back
this.wizard.steps = this.wizard.steps.filter(
(step) => !step.startsWith("type-"),
);
this.wizard.steps.splice(
idx,
0,
`type-${ev.detail.component}-${ev.detail.modelName}`,
);
this.wizard.isValid = true;
}}
@select=${this.selectListener}
>
</ak-wizard-page-type-create>
${this.policyTypes.map((type) => {
return html`
<ak-wizard-page-form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ export class EventMatcherPolicyForm extends BasePolicyForm<EventMatcherPolicy> {
<input
type="text"
value="${ifDefined(this.instance?.clientIp || "")}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
/>
<p class="pf-c-form__helper-text">
${msg(
Expand Down
4 changes: 3 additions & 1 deletion web/src/admin/policies/geoip/GeoIPPolicyForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export class GeoIPPolicyForm extends BasePolicyForm<GeoIPPolicy> {
<input
type="text"
value="${this.instance?.asns ?? ""}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
/>
<p class="pf-c-form__helper-text">
${msg(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
<input
type="email"
value="${first(this.instance?.delegatedSubject, "")}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
required
/>
<p class="pf-c-form__helper-text">
Expand All @@ -99,7 +99,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
<input
type="text"
value="${first(this.instance?.defaultGroupEmailDomain, "")}"
class="pf-c-form-control"
class="pf-c-form-control pf-m-monospace"
required
/>
<p class="pf-c-form__helper-text">
Expand Down
2 changes: 2 additions & 0 deletions web/src/admin/providers/ldap/LDAPProviderFormForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export function renderForm(
label=${msg("Base DN")}
required
value="${provider?.baseDn ?? "DC=ldap,DC=goauthentik,DC=io"}"
inputHint="code"
.errorMessages=${errors?.baseDn ?? []}
help=${msg(
"LDAP DN under which bind requests and search requests can be made.",
Expand All @@ -153,6 +154,7 @@ export function renderForm(
value="${provider?.tlsServerName ?? ""}"
.errorMessages=${errors?.tlsServerName ?? []}
help=${tlsServerNameHelp}
inputHint="code"
></ak-text-input>
<ak-number-input
Expand Down
Loading

0 comments on commit c1dea33

Please sign in to comment.