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 20dde50ed3
web: add webdriverIO testing layer (#6959)
* web/add webdriverIO testing layer

This commit adds WebdriverIO as an end-to-end solution to unit testing.  WebdriverIO can be run both
locally and remotely, supports strong integration with web components, and is generally robust for
use in pipelines.  I'll confess to working through a tutorial on how to do this for web components,
and this is just chapter 2 (I think there are 5 or so chapters...).

There's a makefile, with help!  If you just run `make` it tells you:

```
Specify a command. The choices are:

  help                 Show this help
  node_modules         Runs `npm install` to prepare this feature
  precommit            Run the precommit: spell check all comments, eslint with sonarJS, prettier-write
  test-good-login      Test that we can log into the server. Requires a running instance of the server.
  test-bad-login       Test that bad usernames and passwords create appropriate error messages
```

... because Makefiles are documentation, and documentation belongs in Makefiles.

I've chosen to go with a PageObject-oriented low-level DSL; what that means is that for each major
components (a page, a form, a wizard), there's a class that provides human-readable names for
human-interactable and human-viewable objects on the page.  The LoginPage object, for example, has
selectors for the username, password, submit button, and the failure alert; accessing those allows
us to test for items as expected., and to write a DSL for "a good login" that's as straightforward
as:

```
        await LoginPage.open();
        await LoginPage.login("ken@goauthentik.io", "eat10bugs");
        await expect(UserLibraryPage.pageHeader).toHaveText("My applications");
```

There was a *lot* of messing around with the LoginPage to get the username and password into the
system.  For example, I had to do this with all the `waitForClickable` and `waitForEnable` because
we both keep the buttons inaccessible until the form has something and we "black out" the page (put
a darkening filter over it) while accessing the flow, meaning there was a race condition such that
the test would attempt to interact with the username or password field before it was accessible.
But this works now, which is very nice.

``` JavaScript
    get inputUsername() {
        return $('>>>input[name="uidField"]');
    }

    get btnSubmit() {
        return $('>>>button[type="submit"]');
    }

    async username(username: string) {
        await this.inputUsername.waitForClickable();
        await this.inputUsername.setValue(username);
        await this.btnSubmit.waitForEnabled();
        await this.btnSubmit.click();
    }
```

The bells & whistles of *Prettier*, *Eslint*, and *Codespell* have also been enabled. I do like my
guardrails.

* web/adding tests: added comments and cleaned up some administrative features.

* web/test: changed the name of one test to reflect it's 'good' status

* web: improve testing by adding test admin user via blueprint

* fix blueprints

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

* update package name

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

* add dependabot

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

* prettier run

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

* add basic CI

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

* remove hooks

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

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
2023-10-02 08:40:39 -07:00
.github web: add webdriverIO testing layer (#6959) 2023-10-02 08:40:39 -07:00
.vscode root: migrate bootstrap to blueprints (#6433) 2023-07-31 19:34:46 +02:00
authentik stages/email: rework email templates (#7029) 2023-10-02 16:04:40 +02:00
blueprints blueprints: fix mismatched user-login stage order (#7030) 2023-10-02 16:04:54 +02:00
cmd root: handle SIGHUP and SIGUSR2, healthcheck gunicorn (#6630) 2023-09-27 11:34:29 +00:00
internal internal: fix redis session store (#7011) 2023-09-28 21:06:27 +02:00
lifecycle fix ak test-all dependencies 2023-09-11 15:44:26 +02:00
locale stages/email: rework email templates (#7029) 2023-10-02 16:04:40 +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 web: add webdriverIO testing layer (#6959) 2023-10-02 08:40:39 -07:00
web web/admin: use <pre> for order field on bound elements (#7031) 2023-10-02 16:57:21 +02:00
website website/docs: add notice for nginx ingress configuration requirement (#7027) 2023-10-02 16:04:26 +02:00
.bumpversion.cfg release: 2023.8.3 2023-09-11 18:55:08 +02:00
.dockerignore root: don't exclude enterprise from container image (#6956) 2023-09-22 16:22:16 +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 core: bump pydantic from 2.4.1 to 2.4.2 (#7014) 2023-09-29 10:50:43 +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 root: fix missing /lifecycle in path 2023-09-27 17:49:30 +02:00
LICENSE enterprise: initial license (#5293) 2023-04-19 16:13:45 +02:00
Makefile root: make postgres connection in makefile customizable (#6977) 2023-09-26 12:10:18 +02:00
README.md root: remove outdated sponsorship section on readme (#6973) 2023-09-25 16:38:50 +02:00
SECURITY.md website: update 2023.8 release notes (#6666) 2023-08-29 19:57:14 +02:00
docker-compose.yml release: 2023.8.3 2023-09-11 18:55:08 +02:00
go.mod core: bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#7007) 2023-09-28 11:56:22 +02:00
go.sum core: bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#7007) 2023-09-28 11:56:22 +02:00
ldap.Dockerfile mount binds all around 2023-09-11 15:44:26 +02:00
manage.py root: update deprecation warnings 2022-11-25 11:47:28 +01:00
poetry.lock core: bump webauthn from 1.10.1 to 1.11.0 (#7021) 2023-10-02 11:26:41 +02:00
proxy.Dockerfile core: bump node from 20.5 to 20.6 (#6784) 2023-09-20 12:28:47 +02:00
pyproject.toml Merge branch 'version-2023.8' 2023-09-11 22:04:23 +02:00
radius.Dockerfile mount binds all around 2023-09-11 15:44:26 +02:00
schema.yml core: create app transactional api (#6446) 2023-09-17 23:55:21 +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.