38272e8a68
* web: break circular dependency between AKElement & Interface. 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. * web: fix broken typescript references This built... and then it didn't? Anyway, the current fix is to provide type information the AkInterface for the data that consumers require. * Refactor the Table component for legiibility. This commit does not change the functionality of the Table, nor does it require any changes to existing uses of the Table. It will probably be easier to review this by looking at the `View Code` in the upper-right-hand corner of GitHub's reviewer; that or side-by-side, if your monitor is wide-enough. The existing Table component is used 49 times (at last count) in authentik, and those uses are wide-ranging and complex, but they all come down to a couple of entries: - Displaying a row of summary information - Permitting the display of more complex ("expanded") information - Displaying a collection of rows - Displaying a collection of rows grouped by some header - Pagination of many rows - Permitting an action on the visible rows - *Not* blocking events that may happen on a cell or expansion - Providing a toolbar - Providing a display of "selected items" when using the table as a multi-select with many pages of items (chips display) - Providing sort functionality on columns - Providing the ability to filter the table from the back-end This commit changes none of that. What this commit does is re-arrange the innards of Table.ts into smaller units: - The RowGroup's "checkbox" and "expansion" segments are pulled out into their own functions, which makes the RowGroup's actual functionality much easier to see and understand. The same is true of the rowGroup's selection and expansion handlers. - Almost all in-line decisions and event handlers have been extracted and named, to make it easier to see and understand what's happening inside what is otherwise a jumble of HTML. - The TablePagination code was duplicated-- and one of the duplicates was wrong! So I've deduplicated it and fixed the bug. - In many cases, the conditional code grew organically, resulting in some pretty hard-to-understand conditions. - A really good example is the `itemSelectHandler`; there are two possible events that result in a change, and the consequences of that change may be that *all* checkboxes are unchecked. In all cases where there's an add/remove option, I've opted to remove the specific object always (even if it's not present!), and then add it if it's actually an add. Logically coherent as long as the accessors are not also mutators. It was not possible to redefine the `columns()` function to take anything other than a TableColumn object; I wanted to be able to replace all of the `new TableColumn("Foo")` with just `"Foo"`, building the TableColumn dynamically at construction time. Unfortunately, some of our most complex tables dynamically re-arrange the columns (RBAC, for example, draws an empty table, fetches the content, then redraws with the columns based on what was retrieved), and detecting that change and rebuilding those columns proved more difficult than anticipated. I may contemplate an alternative column specification if I find myself building a lot of tables. Likewise, it was not possible to replace all of our uses of the empty `html` declaration with the Lit-preferred `nothing` sigil; hard-coded `TemplateResult` entries scattered throughout the code caused massive type inconsistencies, since a type of `TemplateResult | nothing` is unique thanks to `nothing`'s underlying Symbol. It is for this issue that Typescript itself recommends you "prefer allowing Typescript infer the return type." I may revisit this issue later. I've added a `prequick` command to `package.json`; this one runs *only* the Typescript type checker, lit-analyse, and `eslint:precommit`, the last of which lints only the files touched since the last commit. This is fast, intended to support quick checks of code quality not normally displayed in the IDE. * web: refactor table After talking to Jens, I've put back the positional variable and eslint escape; it's better to document existing practices than try to force something. I also misunderstood the role of `inner` in one bit of code, and have restored its functionality. Looking through the code, though, I can see a case where it will fail; it's expecting `inner` to be either undefined or a TemplateResult; if there's no error message, the error message defaults to a blank TemplateResult, which is _not_ undefined, and will result in a blank table. This will only happen under very weird network failures, but... |
||
---|---|---|
.github | ||
.vscode | ||
authentik | ||
blueprints | ||
cmd | ||
internal | ||
lifecycle | ||
locale | ||
schemas | ||
scripts | ||
tests | ||
web | ||
website | ||
.bumpversion.cfg | ||
.dockerignore | ||
.editorconfig | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
docker-compose.yml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
ldap.Dockerfile | ||
LICENSE | ||
Makefile | ||
manage.py | ||
poetry.lock | ||
proxy.Dockerfile | ||
pyproject.toml | ||
radius.Dockerfile | ||
README.md | ||
schema.yml | ||
SECURITY.md |
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
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.