Skip to content

Commit

Permalink
website/docs: add architecture and persistence
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Jul 13, 2023
1 parent b0bce60 commit 55ef5f4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 25 deletions.
41 changes: 41 additions & 0 deletions website/docs/core/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Architecture
---

authentik consists of a handful of compoennts, 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 outopst)
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

### 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 is used for the lets encrypt integration
- `/templates` is used for custom email templates, and as with the other ones fully optional
32 changes: 7 additions & 25 deletions website/docs/installation/docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ See [Configuration](../installation/configuration) to change the internal ports.

## Startup

:::warning
The server assumes to have local timezone as UTC.
All internals are handled in UTC; whenever a time is displayed to the user in UI it gets localized.
Do not update or mount `/etc/timezone` or `/etc/localtime` in the authentik containers.
This will not give any advantages. It will cause problems with OAuth and SAML authentication, e.g. [see this GitHub issue](https://github.com/goauthentik/authentik/issues/3005).
:::

Afterwards, run these commands to finish:

```shell
Expand All @@ -85,28 +92,3 @@ By default, authentik is reachable (by default) on port 9000 (HTTP) and port 944
To start the initial setup, navigate to `https://<your server's IP or hostname>:9000/if/flow/initial-setup/`.

There you are prompted to set a password for the akadmin user (the default user).

## Explanation

:::warning
The server assumes to have local timezone as UTC.
All internals are handled in UTC; whenever a time is displayed to the user in UI it gets localized.
Do not update or mount `/etc/timezone` or `/etc/localtime` in the authentik containers.
This will not give any advantages.
On the contrary, it will cause problems with OAuth and SAML authentication,
e.g. [see this GitHub issue](https://github.com/goauthentik/authentik/issues/3005).
:::

The Docker-Compose project contains the following containers:

- server

This is the backend service, which does all the logic, plus runs the API and the SSO functionality. It also runs the frontend, hosts the JS/CSS files, and serves the files you've uploaded for icons/etc.

- worker

This container executes background tasks, everything you can see on the _System Tasks_ page in the frontend.

- redis (for cache)

- postgresql (default database)
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = {
"core/tenants",
"core/certificates",
"core/geoip",
"core/architecture",
],
},
{
Expand Down

0 comments on commit 55ef5f4

Please sign in to comment.