authentik fork
This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Ken Sternberg f5394da9f7
web: Replace ad-hoc toggle control with ak-toggle-group (#6470)
* web: Replace ad-hoc toggle control with ak-toggle-group

This commit replaces various ad-hoc implementations of the Patternfly Toggle Group HTML with a web
component that encapsulates all of the needed behavior and exposes a single API with a single event
handler, return the value of the option clicked.

The results are: Lots of visual clutter is eliminated.  A single link of:

```
<div class="pf-c-toggle-group__item">
  <button
      class="pf-c-toggle-group__button ${this.mode === ProxyMode.Proxy
          ? "pf-m-selected"
          : ""}"
      type="button"
      @click=${() => {
          this.mode = ProxyMode.Proxy;
      }}>
      <span class="pf-c-toggle-group__text">${msg("Proxy")}</span>
  </button>
</div>
<div class="pf-c-divider pf-m-vertical" role="separator"></div>
```

Now looks like:

```
<option value=${ProxyMode.Proxy}>${msg("Proxy")}</option>
```

This also means that the three pages that used the Patternfly Toggle Group could eliminate all of
their Patternfly PFToggleGroup needs, as well as the `justify-content: center` extension, which also
eliminated the `css` import.

The savings aren't as spectacular as I'd hoped: removed 178 lines, but added 123; total savings 55
lines of code.  I still count this a win: we need never write another toggle component again, and
any bugs, extensions or features we may want to add can be centralized or forked without risking the
whole edifice.

* web: minor code formatting issue.

* web: adding a storybook for the ak-toggle-group component

* Bugs found by CI/CD.

* web: Replace ad-hoc search for CryptoCertificateKeyPairs with crypto-certificate-search (#6475)

* web: Replace ad-hoc search for CryptoCertificateKeyPairs with ak-crypto-certeficate-search

This commit replaces various ad-hoc implementations of `search-select` for CryptoCertificateKeyPairs
with a web component that encapsulates all of the needed behavior and exposes a single API.

The results are: Lots of visual clutter is eliminated.  A single search of:

```HTML
<ak-search-select
    .fetchObjects=${async (query?: string): Promise<CertificateKeyPair[]> => {
        const args: CryptoCertificatekeypairsListRequest = {
            ordering: "name",
            hasKey: true,
            includeDetails: false,
        };
        if (query !== undefined) {
            args.search = query;
        }
        const certificates = await new CryptoApi(
            DEFAULT_CONFIG,
        ).cryptoCertificatekeypairsList(args);
        return certificates.results;
    }}
    .renderElement=${(item: CertificateKeyPair): string => {
        return item.name;
    }}
    .value=${(item: CertificateKeyPair | undefined): string | undefined => {
        return item?.pk;
    }}
    .selected=${(item: CertificateKeyPair): boolean => {
        return this.instance?.tlsVerification === item.pk;
    }}
    ?blankable=${true}
>
</ak-search-select>
```

Now looks like:

```HTML
<ak-crypto-certificate-search certificate=${this.instance?.tlsVerification}>
</ak-crypto-certificate-search>
```

There are three searches that do not require there to be a valid key with the certificate; these are
supported with the boolean property `nokey`; likewise, there is one search (in SAMLProviderForm)
that states that if there is no current certificate in the SAMLProvider and only one certificate can
be found in the Authentik database, use that one; this is supported with the boolean property
`singleton`.

These changes replace 382 lines of object-oriented invocations with 36 lines of declarative
configuration, and 98 lines for the class.  Overall, the code for "find a crypto certificate" has
been reduced by 46%.

Suggestions for a better word than `singleton` are welcome!

* web: display tests for CryptoCertificateKeypair search

This adds a Storybook for the CryptoCertificateKeypair search, including
a mock fetch of the data.  In the course of running the tests, we discovered
that including the SearchSelect _class_ won't include the customElement declaration
unless you include the whole file!  Other bugs found: including the CSS from
Storybook is different from that of LitElement native, so much so that the
adapter needed to be included.  FlowSearch had a similar bug.  The problem
only manifests when building via Webpack (which Storybook uses) and not
Rollup, but we should support both in distribution.
2023-08-28 20:00:25 +02:00
.github ci: delete caches after PR is closed 2023-08-26 02:37:23 +02:00
.vscode root: migrate bootstrap to blueprints (#6433) 2023-07-31 19:34:46 +02:00
authentik blueprints: fix tag values not resolved correctly (#6653) 2023-08-28 18:27:44 +02:00
blueprints blueprints: fix tag values not resolved correctly (#6653) 2023-08-28 18:27:44 +02:00
cmd cmd: use live endpoint instead of ready for inbuild healthcheck 2023-05-08 22:04:18 +02:00
internal providers/proxy: fix JWKS url in embedded outpost (#6644) 2023-08-28 00:52:01 +02:00
lifecycle core: bump django from 4.1.7 to 4.2 (#5238) 2023-08-01 19:30:28 +02:00
locale core: compile backend translations (#6639) 2023-08-26 17:30:21 +02:00
schemas providers: SCIM (#4835) 2023-03-06 19:39:08 +01:00
scripts providers/oauth2: fix id_token being saved incorrectly leading to lost claims (#6645) 2023-08-28 00:51:48 +02:00
tests outposts: support json patch for Kubernetes (#6319) 2023-07-22 02:29:28 +02:00
web web: Replace ad-hoc toggle control with ak-toggle-group (#6470) 2023-08-28 20:00:25 +02:00
website website: resize images over 1080p 2023-08-26 02:38:59 +02:00
.bumpversion.cfg release: 2023.6.1 2023-07-10 13:20:22 +02:00
.dockerignore blueprints: fix tag values not resolved correctly (#6653) 2023-08-28 18:27:44 +02:00
.editorconfig website: codespell with custom dictionary and CI (#5062) 2023-03-24 00:24:55 +01:00
.gitignore root: add generated Source docs (#5323) 2023-07-31 11:59:20 +02:00
CODEOWNERS root: Test codeowners (#5586) 2023-05-11 20:26:04 +02:00
CODE_OF_CONDUCT.md root: rework and expand security policy 2022-11-28 12:10:53 +01:00
CONTRIBUTING.md website/developer-docs: move contributing to dev docs index and link contributing file (#5554) 2023-05-09 20:26:55 +02:00
Dockerfile core: bump python from 3.11.4-slim-bookworm to 3.11.5-slim-bookworm (#6650) 2023-08-28 10:56:55 +02:00
LICENSE enterprise: initial license (#5293) 2023-04-19 16:13:45 +02:00
Makefile web/flows: add more stories (#6444) 2023-08-03 17:27:58 +02:00
README.md web: Add storybook (#5865) 2023-06-07 13:05:33 +02:00
SECURITY.md website: minor fixes (#6627) 2023-08-25 23:30:29 +02:00
docker-compose.yml release: 2023.6.1 2023-07-10 13:20:22 +02:00
go.mod core: bump goauthentik.io/api/v3 from 3.2023061.12 to 3.2023061.13 (#6612) 2023-08-24 10:37:30 +02:00
go.sum core: bump goauthentik.io/api/v3 from 3.2023061.12 to 3.2023061.13 (#6612) 2023-08-24 10:37:30 +02:00
ldap.Dockerfile root: upgrade debian base images to debian 12 2023-08-24 14:32:19 +02:00
manage.py root: update deprecation warnings 2022-11-25 11:47:28 +01:00
poetry.lock core: bump ruff from 0.0.285 to 0.0.286 (#6649) 2023-08-28 10:57:33 +02:00
proxy.Dockerfile root: upgrade debian base images to debian 12 2023-08-24 14:32:19 +02:00
pyproject.toml core: bump pydantic from 1.10.12 to 2.3.0 (#6613) 2023-08-24 12:25:17 +02:00
radius.Dockerfile root: upgrade debian base images to debian 12 2023-08-24 14:32:19 +02:00
schema.yml enterprise: licensing fixes (#6601) 2023-08-23 13:20:42 +02:00

README.md

authentik logo


Join Discord GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status Code Coverage Docker pulls Latest version

What is authentik?

authentik is an open-source Identity Provider that emphasizes flexibility and versatility. It can be seamlessly integrated into existing environments to support new protocols. authentik is also a great solution for implementing sign-up, recovery, and other similar features in your application, saving you the hassle of dealing with them.

Installation

For small/test setups it is recommended to use Docker Compose; refer to the documentation.

For bigger setups, there is a Helm Chart here. This is documented here.

Screenshots

Light Dark

Development

See Developer Documentation

Security

See SECURITY.md

Adoption and Contributions

Your organization uses authentik? We'd love to add your logo to the readme and our website! Email us @ hello@goauthentik.io or open a GitHub Issue/PR! For more information on how to contribute to authentik, please refer to our CONTRIBUTING.md file.

Sponsors

This project is proudly sponsored by:

DigitalOcean provides development and testing resources for authentik.