Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
89dad07
web: Add InvalidationFlow to Radius Provider dialogues
kensternberg-authentik Oct 23, 2024
914993a
Merge branch 'main' into dev
kensternberg-authentik Oct 30, 2024
f25a9c6
Merge branch 'main' into dev
kensternberg-authentik Nov 4, 2024
e0d5df8
Merge branch 'main' into dev
kensternberg-authentik Nov 4, 2024
7579090
Merge branch 'main' into dev
kensternberg-authentik Nov 4, 2024
3244276
Merge branch 'main' into dev
kensternberg-authentik Nov 7, 2024
5cc2c0f
Merge branch 'main' into dev
kensternberg-authentik Nov 7, 2024
831797b
Merge branch 'main' into dev
kensternberg-authentik Nov 12, 2024
36b10b4
:wqge branch 'main' into dev
kensternberg-authentik Nov 14, 2024
e7527c5
Merge branch 'main' into dev
kensternberg-authentik Nov 15, 2024
9809b94
Merge branch 'main' into dev
kensternberg-authentik Nov 20, 2024
67aed3e
Merge branch 'main' into dev
kensternberg-authentik Nov 22, 2024
5b8d86b
Merge branch 'main' into dev
kensternberg-authentik Nov 25, 2024
67b3274
Merge branch 'main' into dev
kensternberg-authentik Nov 25, 2024
20b66f8
Merge branch 'main' into dev
kensternberg-authentik Nov 26, 2024
fe9e452
Merge branch 'main' into dev
kensternberg-authentik Dec 2, 2024
9cc440e
Merge branch 'main' into dev
kensternberg-authentik Dec 5, 2024
7bb6a3d
Merge branch 'main' into dev
kensternberg-authentik Dec 9, 2024
1dcf910
Merge branch 'main' into dev
kensternberg-authentik Dec 10, 2024
6d7fc94
Merge branch 'main' into dev
kensternberg-authentik Dec 26, 2024
dddde09
This (temporary) change is needed to prevent the unit tests from fail…
kensternberg-authentik Dec 26, 2024
f6afb59
Revert "This (temporary) change is needed to prevent the unit tests f…
kensternberg-authentik Dec 26, 2024
bd0e81b
Merge branch 'main' into dev
kensternberg-authentik Jan 2, 2025
be349e2
Merge branch 'main' into dev
kensternberg-authentik Jan 3, 2025
854427e
Merge branch 'main' into dev
kensternberg-authentik Jan 6, 2025
7d972ec
Merge branch 'main' into dev
kensternberg-authentik Jan 8, 2025
50d2f69
Merge branch 'main' into dev
kensternberg-authentik Jan 11, 2025
25eefb7
Merge branch 'main' into dev
kensternberg-authentik Jan 21, 2025
457b61c
Merge branch 'main' into dev
kensternberg-authentik Jan 22, 2025
e338bef
Merge branch 'main' into dev
kensternberg-authentik Feb 13, 2025
675e60b
Merge branch 'main' into dev
kensternberg-authentik Feb 13, 2025
2279768
Merge branch 'main' into dev
kensternberg-authentik Feb 14, 2025
ffbe8fb
Merge branch 'main' into dev
kensternberg-authentik Feb 17, 2025
19f25d5
Merge branch 'main' into dev
kensternberg-authentik Feb 19, 2025
811e794
Merge branch 'main' into dev
kensternberg-authentik Mar 4, 2025
75c61af
Merge branch 'main' into dev
kensternberg-authentik Mar 5, 2025
aa20df5
Merge branch 'main' into dev
kensternberg-authentik Mar 6, 2025
5fe344f
Merge branch 'main' into dev
kensternberg-authentik Mar 7, 2025
6838736
Merge branch 'main' into dev
kensternberg-authentik Mar 11, 2025
0055882
Merge branch 'main' into dev
kensternberg-authentik Mar 11, 2025
9251e60
Merge branch 'main' into dev
kensternberg-authentik Mar 11, 2025
cd78fc0
Merge branch 'main' into dev
kensternberg-authentik Mar 14, 2025
fa994ae
Merge branch 'main' into dev
kensternberg-authentik Mar 17, 2025
61dbc93
Merge branch 'main' into dev
kensternberg-authentik Mar 24, 2025
f63b3c2
Merge branch 'main' into dev
kensternberg-authentik Mar 24, 2025
9cf551b
Merge branch 'main' into dev
kensternberg-authentik Apr 9, 2025
9a6ca4f
Merge branch 'main' into dev
kensternberg-authentik Apr 15, 2025
8b95840
Merge branch 'main' into dev
kensternberg-authentik Apr 22, 2025
baa64bc
Merge branch 'main' into dev
kensternberg-authentik Apr 23, 2025
518e9e1
Merge branch 'main' into dev
kensternberg-authentik Apr 24, 2025
5da3493
Merge branch 'main' into dev
kensternberg-authentik Apr 25, 2025
136e59c
Merge branch 'main' into dev
kensternberg-authentik May 2, 2025
cddc13f
Merge branch 'main' into dev
kensternberg-authentik May 5, 2025
38c4701
Merge branch 'main' into dev
kensternberg-authentik May 14, 2025
e340268
Merge branch 'main' into dev
kensternberg-authentik May 22, 2025
c8a0365
web/standards: use attribute naming scheme for attributes
kensternberg-authentik May 22, 2025
46244d2
web/maintenance: remove `writeOnly` hacks from Form and HorizontalFor…
kensternberg-authentik May 22, 2025
a6e1661
Found a few small things, like a missing import that might have broke…
kensternberg-authentik May 22, 2025
0a1ce4c
Merge branch 'main' into web/forms/remove-write-only-hacks
kensternberg-authentik Jun 6, 2025
bfde39a
web/admin: Update `private-text` field to pass new linting requirement.
kensternberg-authentik Jun 6, 2025
4652ca7
Merge branch 'main' into web/forms/remove-write-only-hacks
kensternberg-authentik Jun 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions web/src/admin/crypto/CertificateKeyPairForm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-textarea-input.js";
import "@goauthentik/elements/CodeMirror";
import "@goauthentik/elements/forms/HorizontalFormElement";
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
Expand Down Expand Up @@ -45,37 +46,24 @@ export class CertificateKeyPairForm extends ModelForm<CertificateKeyPair, string
required
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
<ak-private-textarea-input
label=${msg("Certificate")}
name="certificateData"
?writeOnly=${this.instance !== undefined}
?required=${true}
>
<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}
input-hint="code"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did this input-hint come from?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many moons ago when we received customer feedback that certain inputs be in a monospace font for secret keys and such.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input-hint="code" activates these three features in ak-private-textarea-input:

                    autocomplete="off"
                    spellcheck="false"
                    class="pf-c-form-control pf-m-monospace"

... which you can clearly see in the textarea we are replacing.

Since those are the common settings you, Jens, use when making a textarea work as a code space. Having an attribute instead of remembering the same three lines a dozen or so times seemed parsimonious.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sigh... that comment had been "pending" for 2 weeks.)

placeholder="-----BEGIN CERTIFICATE-----"
required
?revealed=${this.instance === undefined}
help=${msg("PEM-encoded Certificate data.")}
></ak-private-textarea-input>
<ak-private-textarea-input
label=${msg("Private Key")}
>
<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.",
)}
</p>
</ak-form-element-horizontal>`;
name="keyData"
input-hint="code"
?revealed=${this.instance === undefined}
help=${msg(
"Optional Private Key. If this is set, you can use this keypair for encryption.",
)}
></ak-private-textarea-input>`;
}
}

Expand Down
13 changes: 5 additions & 8 deletions web/src/admin/enterprise/EnterpriseLicenseForm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { EVENT_REFRESH_ENTERPRISE } from "@goauthentik/common/constants";
import "@goauthentik/components/ak-private-textarea-input.js";
import "@goauthentik/elements/CodeMirror";
import "@goauthentik/elements/forms/HorizontalFormElement";
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
Expand Down Expand Up @@ -61,17 +62,13 @@ export class EnterpriseLicenseForm extends ModelForm<License, string> {
value="${ifDefined(this.installID)}"
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
<ak-private-textarea-input
name="key"
?writeOnly=${this.instance !== undefined}
?revealed=${this.instance === undefined}
label=${msg("License key")}
input-hint="code"
>
<textarea
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
></textarea>
</ak-form-element-horizontal>`;
</ak-private-textarea-input>`;
}
}

Expand Down
50 changes: 20 additions & 30 deletions web/src/admin/sources/kerberos/KerberosSourceForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
UserMatchingModeToLabel,
} from "@goauthentik/admin/sources/oauth/utils";
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-text-input.js";
import "@goauthentik/components/ak-private-textarea-input.js";
import "@goauthentik/components/ak-switch-input";
import "@goauthentik/components/ak-text-input";
import "@goauthentik/components/ak-textarea-input";
Expand Down Expand Up @@ -246,30 +248,22 @@ export class KerberosSourceForm extends WithCapabilitiesConfig(BaseSourceForm<Ke
value=${ifDefined(this.instance?.syncPrincipal)}
help=${msg("Principal used to authenticate to the KDC for syncing.")}
></ak-text-input>
<ak-form-element-horizontal
<ak-private-text-input
name="syncPassword"
label=${msg("Sync password")}
?writeOnly=${this.instance !== undefined}
>
<input type="text" value="" class="pf-c-form-control" />
<p class="pf-c-form__helper-text">
${msg(
"Password used to authenticate to the KDC for syncing. Optional if Sync keytab or Sync credentials cache is provided.",
)}
</p>
</ak-form-element-horizontal>
<ak-form-element-horizontal
?revealed=${this.instance === undefined}
help=${msg(
"Password used to authenticate to the KDC for syncing. Optional if Sync keytab or Sync credentials cache is provided.",
)}
></ak-private-text-input>
<ak-private-textarea-input
name="syncKeytab"
label=${msg("Sync keytab")}
?writeOnly=${this.instance !== undefined}
>
<textarea class="pf-c-form-control"></textarea>
<p class="pf-c-form__helper-text">
${msg(
"Keytab used to authenticate to the KDC for syncing. Optional if Sync password or Sync credentials cache is provided. Must be base64 encoded or in the form TYPE:residual.",
)}
</p>
</ak-form-element-horizontal>
?revealed=${this.instance === undefined}
help=${msg(
"Keytab used to authenticate to the KDC for syncing. Optional if Sync password or Sync credentials cache is provided. Must be base64 encoded or in the form TYPE:residual.",
)}
></ak-private-textarea-input>
<ak-text-input
name="syncCcache"
label=${msg("Sync credentials cache")}
Expand All @@ -291,18 +285,14 @@ export class KerberosSourceForm extends WithCapabilitiesConfig(BaseSourceForm<Ke
"Force the use of a specific server name for SPNEGO. Must be in the form HTTP@domain",
)}
></ak-text-input>
<ak-form-element-horizontal
<ak-private-textarea-input
name="spnegoKeytab"
label=${msg("SPNEGO keytab")}
?writeOnly=${this.instance !== undefined}
>
<textarea class="pf-c-form-control"></textarea>
<p class="pf-c-form__helper-text">
${msg(
"Keytab used for SPNEGO. Optional if SPNEGO credentials cache is provided. Must be base64 encoded or in the form TYPE:residual.",
)}
</p>
</ak-form-element-horizontal>
?revealed=${this.instance === undefined}
help=${msg(
"Keytab used for SPNEGO. Optional if SPNEGO credentials cache is provided. Must be base64 encoded or in the form TYPE:residual.",
)}
></ak-private-textarea-input>
<ak-text-input
name="spnegoCcache"
label=${msg("SPNEGO credentials cache")}
Expand Down
9 changes: 4 additions & 5 deletions web/src/admin/sources/ldap/LDAPSourceForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "@goauthentik/admin/common/ak-crypto-certificate-search";
import { placeholderHelperText } from "@goauthentik/admin/helperText";
import { BaseSourceForm } from "@goauthentik/admin/sources/BaseSourceForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-text-input.js";
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
Expand Down Expand Up @@ -259,13 +260,11 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
class="pf-c-form-control"
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
<ak-private-text-input
label=${msg("Bind Password")}
?writeOnly=${this.instance !== undefined}
name="bindPassword"
>
<input type="text" value="" class="pf-c-form-control" />
</ak-form-element-horizontal>
?revealed=${this.instance === undefined}
></ak-private-text-input>
<ak-form-element-horizontal
label=${msg("Base DN")}
?required=${true}
Expand Down
18 changes: 7 additions & 11 deletions web/src/admin/sources/oauth/OAuthSourceForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
UserMatchingModeToLabel,
} from "@goauthentik/admin/sources/oauth/utils";
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-textarea-input.js";
import "@goauthentik/components/ak-radio-input";
import "@goauthentik/elements/CodeMirror";
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
Expand Down Expand Up @@ -439,19 +440,14 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
/>
<p class="pf-c-form__helper-text">${msg("Also known as Client ID.")}</p>
</ak-form-element-horizontal>
<ak-form-element-horizontal
<ak-private-textarea-input
label=${msg("Consumer secret")}
?required=${true}
?writeOnly=${this.instance !== undefined}
name="consumerSecret"
>
<textarea
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
></textarea>
<p class="pf-c-form__helper-text">${msg("Also known as Client Secret.")}</p>
</ak-form-element-horizontal>
input-hint="code"
help=${msg("Also known as Client Secret.")}
required
?revealed=${this.instance === undefined}
></ak-private-textarea-input>
<ak-form-element-horizontal label=${msg("Scopes")} name="additionalScopes">
<input
type="text"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-text-input.js";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
import "@goauthentik/elements/forms/SearchSelect";
Expand Down Expand Up @@ -98,21 +99,13 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
required
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
label=${msg("Secret key")}
?required=${true}
?writeOnly=${this.instance !== undefined}
<ak-private-text-input
name="clientSecret"
>
<input
type="text"
value=""
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
required
/>
</ak-form-element-horizontal>
label=${msg("Secret key")}
input-hint="code"
required
?revealed=${this.instance === undefined}
></ak-private-text-input>
</div>
</ak-form-group>
<ak-form-group>
Expand All @@ -136,19 +129,12 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
spellcheck="false"
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
label=${msg("Secret key")}
?writeOnly=${this.instance !== undefined}
<ak-private-text-input
name="adminSecretKey"
>
<input
type="text"
value=""
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
/>
</ak-form-element-horizontal>
label=${msg("Secret key")}
input-hint="code"
?revealed=${this.instance === undefined}
></ak-private-text-input>
</div>
</ak-form-group>
<ak-form-group .expanded=${true}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-text-input.js";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
import "@goauthentik/elements/forms/Radio";
Expand Down Expand Up @@ -75,13 +76,13 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
class="pf-c-form-control"
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
label=${msg("SMTP Password")}
?writeOnly=${this.instance !== undefined}

<ak-private-text-input
name="password"
>
<input type="text" value="" class="pf-c-form-control" />
</ak-form-element-horizontal>
label=${msg("SMTP Password")}
?revealed=${this.instance === undefined}
></ak-private-text-input>

<ak-form-element-horizontal name="useTls">
<label class="pf-c-switch">
<input
Expand Down
31 changes: 12 additions & 19 deletions web/src/admin/stages/captcha/CaptchaStageForm.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-number-input";
import "@goauthentik/components/ak-private-text-input.js";
import "@goauthentik/components/ak-switch-input";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
Expand Down Expand Up @@ -68,26 +69,18 @@ export class CaptchaStageForm extends BaseStageForm<CaptchaStage> {
)}
</p>
</ak-form-element-horizontal>
<ak-form-element-horizontal
label=${msg("Private Key")}
?required=${true}
?writeOnly=${this.instance !== undefined}

<ak-private-text-input
name="privateKey"
>
<input
type="text"
value=""
class="pf-c-form-control pf-m-monospace"
autocomplete="off"
spellcheck="false"
required
/>
<p class="pf-c-form__helper-text">
${msg(
"Private key, acquired from https://www.google.com/recaptcha/intro/v3.html.",
)}
</p>
</ak-form-element-horizontal>
label=${msg("Private Key")}
input-hint="code"
required
?revealed=${this.instance === undefined}
help=${msg(
"Private key, acquired from https://www.google.com/recaptcha/intro/v3.html.",
)}
></ak-private-text-input>

<ak-switch-input
name="interactive"
label=${msg("Interactive")}
Expand Down
9 changes: 4 additions & 5 deletions web/src/admin/stages/email/EmailStageForm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import "@goauthentik/components/ak-private-text-input.js";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
import "@goauthentik/elements/utils/TimeDeltaHelp";
Expand Down Expand Up @@ -72,13 +73,11 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
class="pf-c-form-control"
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal
<ak-private-text-input
label=${msg("SMTP Password")}
?writeOnly=${this.instance !== undefined}
name="password"
>
<input type="text" value="" class="pf-c-form-control" />
</ak-form-element-horizontal>
?revealed=${this.instance === undefined}
></ak-private-text-input>
<ak-form-element-horizontal name="useTls">
<label class="pf-c-switch">
<input
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/HorizontalLightComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export class HorizontalLightComponent<T> extends AKElement {
@property({ type: String, reflect: true })
name!: string;

@property({ type: String })
@property({ type: String, reflect: true })
label = "";

@property({ type: Boolean, reflect: true })
required = false;

@property({ type: String })
@property({ type: String, reflect: true })
help = "";

@property({ type: Object })
Expand Down
Loading
Loading