-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website/docs: add architecture and persistence #6250
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1958698
website/docs: add architecture and persistence
BeryJu 9da5145
Apply suggestions from code review
BeryJu 26cf948
Apply suggestions from code review
BeryJu 4cfeebb
add note about kubernetes
BeryJu c6a3e7b
link to relevant parts
BeryJu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,61 @@ | ||||||
--- | ||||||
title: Architecture | ||||||
--- | ||||||
|
||||||
authentik consists of a handful of components, most of which are required for a functioning setup. | ||||||
|
||||||
```mermaid | ||||||
graph LR | ||||||
user(User) --> ak_server(authentik Server) | ||||||
ak_server --> ak_server_core(authentik Server Core) | ||||||
ak_server --> ak_outpost(Embedded outpost) | ||||||
ak_server_core --> db(PostgreSQL) | ||||||
ak_server_core --> cache(Redis) | ||||||
ak_worker(Background Worker) --> db(PostgreSQL) | ||||||
ak_worker(Background Worker) --> cache(Redis) | ||||||
``` | ||||||
|
||||||
### Server | ||||||
|
||||||
The server container consists of two sub-components, the actual server itself and the embedded outpost. Incoming requests to the server container(s) are routed by a lightweight router to either the _Core_ server or the embedded outpost. This router also handles requests for any static assets such as JavaScript and CSS files. | ||||||
|
||||||
#### Core | ||||||
|
||||||
The core sub-component handles most of authentik's logic, such as API requests, flow executions, any kind of SSO requests, etc. | ||||||
|
||||||
#### Embedded outpost | ||||||
|
||||||
Similar to [other outposts](../outposts/index.mdx), this outposts allows using [Proxy providers](../providers/proxy/index.md) without deploying a separate outpost. | ||||||
|
||||||
#### Persistence | ||||||
|
||||||
- `/media` is used to store icons and such, but not required, and if not mounted, authentik will allow you to set a URL to icons in place of a file upload | ||||||
|
||||||
### Background Worker | ||||||
|
||||||
This container executes background tasks, such as sending emails, the event notification system, and everything you can see on the _System Tasks_ page in the frontend. | ||||||
|
||||||
#### Persistence | ||||||
|
||||||
- `/certs` is used for authentik to import external certs, which in most cases shouldn't be used for SAML, but rather if you use authentik without a reverse proxy, this can be used for example for the [Let's Encrypt integration](../core/certificates.md#lets-encrypt) | ||||||
- `/templates` is used for [custom email templates](../flow/stages/email/index.mdx#custom-templates), and as with the other ones fully optional | ||||||
|
||||||
### PostgreSQL | ||||||
|
||||||
authentik uses PostgreSQL to store all of its configuration and other data (excluding uploaded files). | ||||||
|
||||||
#### Persistence | ||||||
|
||||||
- `/var/lib/postgresql/data` is used to store the PostgreSQL database | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
On Kubernetes, with the default Helm chart and using the packaged PostgreSQL sub-chart, persistent data is stored in a PVC. | ||||||
|
||||||
### Redis | ||||||
|
||||||
authentik uses Redis as a message-queue and a cache. Data in Redis is not required to be persistent, however you should be aware that restarting Redis will cause the loss of all sessions. | ||||||
|
||||||
#### Persistence | ||||||
|
||||||
- `/data` is used to store the Redis data | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
On Kubernetes, with the default Helm chart and using the packaged Redis sub-chart, persistent data is stored in a PVC. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ module.exports = { | |
"core/tenants", | ||
"core/certificates", | ||
"core/geoip", | ||
"core/architecture", | ||
], | ||
}, | ||
{ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "set a URL to icons" do you mean "define a URL for a clickable icon" or "define a URL to display an icon instead of uploading a file"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title of this section is Persistence, but the sentence in it is about a /media directory.... how are they related, how does the directory help with persistence (and of what?)?
Maybe turn this section into a Note? All of the other headers reflect a component shown in the diagram, but not this one about persistence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... I see there is a Persistence section for several of the components. Yes, I would turn these into Notes.
If you want to keep them as headings, I;d suggest for SEO reasons to retitle them to "Persistence in an outpost" and "Persistence in a background worker", etc. So that we don't end up with a bunch of heading s that all say same thing.