Conversation
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.
* main: (57 commits) stages/email: Fix query parameters getting lost in Email links (#5376) core/rbac: fix missing field when removing perm, add delete from object page (#7226) website/integrations: grafana: add Helm and Terraform config examples (#7121) web: bump @types/codemirror from 5.60.11 to 5.60.12 in /web (#7223) translate: Updates for file web/xliff/en.xlf in zh_CN (#7224) translate: Updates for file web/xliff/en.xlf in zh-Hans (#7225) website/blogs: blog about sso tax (#7202) web: Application wizard v2 with tests (#7004) web: bump API Client version (#7220) core: bump goauthentik.io/api/v3 from 3.2023083.7 to 3.2023083.8 (#7221) providers/radius: TOTP MFA support (#7217) web: bump API Client version (#7218) stage/deny: add custom message (#7144) docs: update full-dev-setup docs (#7205) enterprise: bump license usage task frequency (#7215) web: bump the storybook group in /web with 5 updates (#7212) web: bump the sentry group in /web with 2 updates (#7211) Revert "web: Updates to the Context and Tasks libraries from lit. (#7168)" web: bump @types/codemirror from 5.60.10 to 5.60.11 in /web (#7209) web: bump @types/chart.js from 2.9.38 to 2.9.39 in /web (#7206) ...
* main: web: bump API Client version (#7246) sources/oauth: include default JWKS URLs for OAuth sources (#6992) sources/oauth: periodically update OAuth sources' OIDC configuration (#7245) website/blogs: Fix sso blog to remove 3rd reason (#7230) lifecycle: fix otp_merge migration again (#7244) web: bump core-js from 3.33.0 to 3.33.1 in /web (#7243) core: bump node from 20 to 21 (#7237) web: fix bad comment that was confusing lit-analyze (#7234) translate: Updates for file web/xliff/en.xlf in zh_CN (#7235) core: bump ruff from 0.1.0 to 0.1.1 (#7238) core: bump twilio from 8.9.1 to 8.10.0 (#7239) web: bump the storybook group in /web with 5 updates (#7240) web: bump the wdio group in /tests/wdio with 4 updates (#7241) translate: Updates for file web/xliff/en.xlf in zh-Hans (#7236) web: isolate clipboard handling (#7229)
This built... and then it didn't? Anyway, the current fix is to provide type information the AkInterface for the data that consumers require.
* main: core: bump pylint-django from 2.5.3 to 2.5.4 (#7255) core: bump goauthentik.io/api/v3 from 3.2023083.9 to 3.2023083.10 (#7256) web: bump the wdio group in /tests/wdio with 1 update (#7258) web: bump the eslint group in /tests/wdio with 1 update (#7257) sources/oauth: fix name clash (#7253) web: bump the eslint group in /web with 1 update (#7250) web: bump mermaid from 10.5.0 to 10.5.1 in /web (#7247) web: break circular dependency between AKElement & Interface. (#7165)
* main: (28 commits) web: fix typo in traefik name web/admin: disable wizard banner for now (#7294) web/admin: small fixes (#7292) core: Use branding_title in the end session page (#7282) web: bump pyright from 1.1.332 to 1.1.333 in /web (#7287) website: bump react-tooltip from 5.21.5 to 5.21.6 in /website (#7283) web: bump the sentry group in /web with 2 updates (#7285) web: bump the eslint group in /web with 1 update (#7286) core: bump ruff from 0.1.1 to 0.1.2 (#7289) core: bump pytest from 7.4.2 to 7.4.3 (#7288) web: bump the wdio group in /tests/wdio with 3 updates (#7290) website/blogs: fixed typo in blog (#7281) core: bump pylint from 2.17.7 to 3.0.2 (#7270) web: bump the eslint group in /tests/wdio with 2 updates (#7274) translate: Updates for file web/xliff/en.xlf in zh-Hans (#7278) translate: Updates for file web/xliff/en.xlf in zh_CN (#7277) ci: bump actions/setup-node from 3 to 4 (#7268) core: bump pylint-django from 2.5.4 to 2.5.5 (#7271) web: bump the eslint group in /web with 2 updates (#7269) web: bump @trivago/prettier-plugin-sort-imports from 4.2.0 to 4.2.1 in /tests/wdio (#7275) ...
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
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.
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.
…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.
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for authentik ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7331 +/- ##
=======================================
Coverage 92.63% 92.64%
=======================================
Files 588 588
Lines 29192 29192
=======================================
+ Hits 27042 27044 +2
+ Misses 2150 2148 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
* main: (38 commits) crypto: fix race conditions when creating self-signed certificates on startup (#7344) blueprints: fix entries with state: absent not being deleted if their serializer has errors (#7345) web/admin: fix @change handler for ak-radio elements (#7348) rbac: handle lookup error (#7341) website/docs: add warning about upgrading to 2023.10 (#7340) web/admin: fix role form reacting to enter (#7330) core: bump github.com/google/uuid from 1.3.1 to 1.4.0 (#7333) core: bump goauthentik.io/api/v3 from 3.2023083.10 to 3.2023101.1 (#7334) core: bump ruff from 0.1.2 to 0.1.3 (#7335) core: bump pydantic-scim from 0.0.7 to 0.0.8 (#7336) website/blogs: Blog dockers (#7328) providers/proxy: attempt to fix duplicate cookie (#7324) stages/email: fix sending emails from task (#7325) web: bump API Client version (#7321) website/docs: update release notes for 2023.10.1 (#7316) release: 2023.10.1 lifecycle: fix otp merge migration (#7315) root: fix pylint errors (#7312) web: bump API Client version (#7311) release: 2023.10.0 ...
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
* main: (38 commits) crypto: fix race conditions when creating self-signed certificates on startup (#7344) blueprints: fix entries with state: absent not being deleted if their serializer has errors (#7345) web/admin: fix @change handler for ak-radio elements (#7348) rbac: handle lookup error (#7341) website/docs: add warning about upgrading to 2023.10 (#7340) web/admin: fix role form reacting to enter (#7330) core: bump github.com/google/uuid from 1.3.1 to 1.4.0 (#7333) core: bump goauthentik.io/api/v3 from 3.2023083.10 to 3.2023101.1 (#7334) core: bump ruff from 0.1.2 to 0.1.3 (#7335) core: bump pydantic-scim from 0.0.7 to 0.0.8 (#7336) website/blogs: Blog dockers (#7328) providers/proxy: attempt to fix duplicate cookie (#7324) stages/email: fix sending emails from task (#7325) web: bump API Client version (#7321) website/docs: update release notes for 2023.10.1 (#7316) release: 2023.10.1 lifecycle: fix otp merge migration (#7315) root: fix pylint errors (#7312) web: bump API Client version (#7311) release: 2023.10.0 ...
…ard-form-handling * web/error-handling-form-components: web: improve error handling in light components
…ard-form-handling * web/error-handling-form-components: Fix bug where event was recorded twice. Added the radio control to the list of LightComponents.
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-web-revise-wizard-form-handling-1698448921-262854c
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sFor arm64, use these values: AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-web-revise-wizard-form-handling-1698448921-262854c-arm64
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-web-revise-wizard-form-handling-1698448921-262854cFor arm64, use these values: authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-web-revise-wizard-form-handling-1698448921-262854c-arm64Afterwards, run the upgrade commands from the latest release notes. |
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>
* main: (60 commits) web/flows: attempt to fix bitwareden android compatibility (#7455) sources/oauth: fix patreon (#7454) website: bump the docusaurus group in /website with 3 updates (#7400) web/admin: fix chart label on dashboard user page (#7434) core: bump github.com/gorilla/sessions from 1.2.1 to 1.2.2 (#7446) core: bump github.com/gorilla/mux from 1.8.0 to 1.8.1 (#7443) core: bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#7442) core: bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (#7445) core: bump golang.org/x/sync from 0.4.0 to 0.5.0 (#7441) core: bump github.com/gorilla/securecookie from 1.1.1 to 1.1.2 (#7440) core: bump github.com/gorilla/handlers from 1.5.1 to 1.5.2 (#7444) web: bump rollup from 4.2.0 to 4.3.0 in /web (#7448) web: bump the eslint group in /web with 2 updates (#7447) core: bump uvicorn from 0.23.2 to 0.24.0 (#7450) core: bump selenium from 4.15.1 to 4.15.2 (#7449) core: bump ruff from 0.1.3 to 0.1.4 (#7451) web: bump the eslint group in /tests/wdio with 2 updates (#7452) providers/proxy: fix closed redis client (#7385) ci: explicitly give write permissions to packages (#7428) core: bump selenium from 4.15.0 to 4.15.1 (#7422) ...
…labs/context-0.5.1' into web/revise-wizard-form-handling * origin/dependabot/npm_and_yarn/web/lit-labs/context-0.5.1: web: bump @lit-labs/context from 0.4.1 to 0.5.1 in /web
* main: (210 commits) stages/email: improve error handling for incorrect template syntax (#7758) core: bump github.com/go-openapi/strfmt from 0.21.7 to 0.21.8 (#7768) website: bump postcss from 8.4.31 to 8.4.32 in /website (#7770) web: bump the eslint group in /tests/wdio with 1 update (#7773) website: bump @types/react from 18.2.39 to 18.2.41 in /website (#7769) web: bump the eslint group in /web with 1 update (#7772) website: fix typos in example URLs (#7774) root: include ca-certificates in container (#7763) root: don't show warning when app has no URLs to import (#7765) web: revert storybook (#7764) web: bump the eslint group in /web with 2 updates (#7730) website: bump @types/react from 18.2.38 to 18.2.39 in /website (#7720) web: bump the storybook group in /web with 5 updates (#7750) website/blog: fix email syntax (#7753) web: bump the wdio group in /tests/wdio with 3 updates (#7751) web: bump the babel group in /web with 3 updates (#7741) web: bump the sentry group in /web with 2 updates (#7747) web: bump pyright from 1.1.337 to 1.1.338 in /web (#7743) website: bump the docusaurus group in /website with 9 updates (#7746) web: bump rollup from 4.6.0 to 4.6.1 in /web (#7748) ...
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.
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.
…orm-handling' into web/revise-wizard-form-handling * refs/remotes/origin/web/revise-wizard-form-handling: web: bump the eslint group in /tests/wdio with 2 updates (#7783) web: bump the sentry group in /web with 2 updates (#7784) web: bump the eslint group in /web with 2 updates (#7785) web: bump chart.js from 4.4.0 to 4.4.1 in /web (#7786) website: bump @types/react from 18.2.41 to 18.2.42 in /website (#7787) website: bump react-tooltip from 5.24.0 to 5.25.0 in /website (#7788) outposts/ldap: avoid nil ptr deref in MemorySearcher (#7767)
authentik translations instructionsThanks for your pull request! authentik translations are handled using Transifex. Please edit translations over there and they'll be included automatically. |
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* dev: web: bump API Client version (#7803) events: add graph for event volume (#7639) website/docs: change links to point to our YouTube (#7794) web: bump core-js from 3.33.3 to 3.34.0 in /web (#7796) core: bump golang from 1.21.4-bookworm to 1.21.5-bookworm (#7798) web: bump the wdio group in /tests/wdio with 4 updates (#7799) web/admin: revise wizard form handling (#7331) web: bump the eslint group in /tests/wdio with 2 updates (#7783) web: bump the sentry group in /web with 2 updates (#7784) web: bump the eslint group in /web with 2 updates (#7785) web: bump chart.js from 4.4.0 to 4.4.1 in /web (#7786) website: bump @types/react from 18.2.41 to 18.2.42 in /website (#7787) website: bump react-tooltip from 5.24.0 to 5.25.0 in /website (#7788) outposts/ldap: avoid nil ptr deref in MemorySearcher (#7767)
* web/config-provider: web: bump API Client version (#7803) events: add graph for event volume (#7639) website/docs: change links to point to our YouTube (#7794) web: bump core-js from 3.33.3 to 3.34.0 in /web (#7796) core: bump golang from 1.21.4-bookworm to 1.21.5-bookworm (#7798) web: bump the wdio group in /tests/wdio with 4 updates (#7799) web/admin: revise wizard form handling (#7331) web: bump the eslint group in /tests/wdio with 2 updates (#7783) web: bump the sentry group in /web with 2 updates (#7784) web: bump the eslint group in /web with 2 updates (#7785) web: bump chart.js from 4.4.0 to 4.4.1 in /web (#7786) website: bump @types/react from 18.2.41 to 18.2.42 in /website (#7787) website: bump react-tooltip from 5.24.0 to 5.25.0 in /website (#7788) outposts/ldap: avoid nil ptr deref in MemorySearcher (#7767)
…2a-branded * web/config-provider-2-tenant: web: bump API Client version (#7803) events: add graph for event volume (#7639) website/docs: change links to point to our YouTube (#7794) web: bump core-js from 3.33.3 to 3.34.0 in /web (#7796) core: bump golang from 1.21.4-bookworm to 1.21.5-bookworm (#7798) web: bump the wdio group in /tests/wdio with 4 updates (#7799) web/admin: revise wizard form handling (#7331) web: bump the eslint group in /tests/wdio with 2 updates (#7783) web: bump the sentry group in /web with 2 updates (#7784) web: bump the eslint group in /web with 2 updates (#7785) web: bump chart.js from 4.4.0 to 4.4.1 in /web (#7786) website: bump @types/react from 18.2.41 to 18.2.42 in /website (#7787) website: bump react-tooltip from 5.24.0 to 5.25.0 in /website (#7788) outposts/ldap: avoid nil ptr deref in MemorySearcher (#7767)
…r-3-version * web/config-provider-2a-branded: web: bump API Client version (#7803) events: add graph for event volume (#7639) website/docs: change links to point to our YouTube (#7794) web: bump core-js from 3.33.3 to 3.34.0 in /web (#7796) core: bump golang from 1.21.4-bookworm to 1.21.5-bookworm (#7798) web: bump the wdio group in /tests/wdio with 4 updates (#7799) web/admin: revise wizard form handling (#7331)

Details
REPLACE ME
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)make i18n-extract)If applicable
make website)