website/docs: ensure yaml code blocks have language tags (#9240)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-04-12 16:51:50 +02:00
committed by GitHub
parent 7ef14eb86d
commit 6df28758f0
21 changed files with 42 additions and 40 deletions

View File

@ -42,7 +42,7 @@ You can also bind mount single files into the folder, as long as they fall under
- Files can be in any arbitrary file structure, and can have any extension. - Files can be in any arbitrary file structure, and can have any extension.
- If the path contains `archive`, the files will be ignored (to better support certbot setups). - If the path contains `archive`, the files will be ignored (to better support certbot setups).
``` ```shell
certs/ certs/
├── baz ├── baz
│   └── bar.baz │   └── bar.baz

View File

@ -21,7 +21,7 @@ You can also [view a video walk-through](https://www.youtube.com/watch?v=O1qUbrk
Start by generating passwords for the database and cache. You can use either of the following commands: Start by generating passwords for the database and cache. You can use either of the following commands:
``` ```shell
pwgen -s 50 1 pwgen -s 50 1
openssl rand -base64 36 openssl rand -base64 36
``` ```
@ -62,7 +62,7 @@ See all configurable values on [ArtifactHub](https://artifacthub.io/packages/hel
Now, execute the following commands to install authentik: Now, execute the following commands to install authentik:
``` ```shell
helm repo add authentik https://charts.goauthentik.io helm repo add authentik https://charts.goauthentik.io
helm repo update helm repo update
helm upgrade --install authentik authentik/authentik -f values.yaml helm upgrade --install authentik authentik/authentik -f values.yaml

View File

@ -74,14 +74,14 @@ Test connectivity by using ldapsearch.
:::info :::info
ldapsearch can be installed on Linux system with these commands ldapsearch can be installed on Linux system with these commands
``` ```shell
sudo apt-get install ldap-utils -y # Debian-based systems sudo apt-get install ldap-utils -y # Debian-based systems
sudo yum install openldap-clients -y # CentOS-based systems sudo yum install openldap-clients -y # CentOS-based systems
``` ```
::: :::
``` ```shell
ldapsearch \ ldapsearch \
-x \ -x \
-H ldap://<LDAP Outpost IP address>:<Port number 389> \ # In production it is recommended to use SSL, which also requires `ldaps://` as the protocol and the SSL port -H ldap://<LDAP Outpost IP address>:<Port number 389> \ # In production it is recommended to use SSL, which also requires `ldaps://` as the protocol and the SSL port

View File

@ -43,7 +43,7 @@ This release does not introduce any new requirements.
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/2023.10/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/2023.10/docker-compose.yml
docker-compose up -d docker-compose up -d
``` ```

View File

@ -41,7 +41,7 @@ This release does not introduce any new requirements.
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/2023.5/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/2023.5/docker-compose.yml
docker-compose up -d docker-compose up -d
``` ```

View File

@ -27,7 +27,7 @@ This release does not introduce any new requirements.
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/2023.6/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/2023.6/docker-compose.yml
docker-compose up -d docker-compose up -d
``` ```

View File

@ -39,7 +39,7 @@ This release changes the PostgreSQL dependency to require Version 12 or later, w
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/2023.8/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/2023.8/docker-compose.yml
docker-compose up -d docker-compose up -d
``` ```

View File

@ -35,7 +35,7 @@ This release does not introduce any new requirements.
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/xxxx.x/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/xxxx.x/docker-compose.yml
docker compose up -d docker compose up -d
``` ```

View File

@ -178,7 +178,7 @@ This release does not introduce any new requirements, but contains some breaking
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/2024.2/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/2024.2/docker-compose.yml
docker compose up -d docker compose up -d
``` ```

View File

@ -15,7 +15,7 @@ This release does not introduce any new requirements.
To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands: To upgrade, download the new docker-compose file and update the Docker stack with the new version, using these commands:
``` ```shell
wget -O docker-compose.yml https://goauthentik.io/version/xxxx.x/docker-compose.yml wget -O docker-compose.yml https://goauthentik.io/version/xxxx.x/docker-compose.yml
docker compose up -d docker compose up -d
``` ```

View File

@ -42,7 +42,7 @@ By default, the new compose file uses a fixed version to prevent unintended upda
Before updating the file, stop all containers. Then download the file, pull the new containers and start the database. Before updating the file, stop all containers. Then download the file, pull the new containers and start the database.
``` ```shell
docker-compose down docker-compose down
docker-compose pull docker-compose pull
docker-compose up --no-start docker-compose up --no-start

View File

@ -39,7 +39,7 @@ The only manual change you have to do is replace the `PASSBOOK_` prefix in your
Additionally, the database name and username have to be changed, so add this block to your `.env` file: Additionally, the database name and username have to be changed, so add this block to your `.env` file:
``` ```shell
PG_USER=passbook PG_USER=passbook
PG_DB=passbook PG_DB=passbook
``` ```
@ -50,7 +50,7 @@ Afterwards, you can simply run `docker-compose up -d` and then the normal upgrad
The helm repository changes from passbook to authentik. To update your repository, execute these commands: The helm repository changes from passbook to authentik. To update your repository, execute these commands:
``` ```shell
helm repo remove passbook helm repo remove passbook
helm repo add authentik https://docker.beryju.org/chartrepo/authentik helm repo add authentik https://docker.beryju.org/chartrepo/authentik
``` ```
@ -68,7 +68,7 @@ postgresql:
Afterwards you can upgrade as usual from the new repository: Afterwards you can upgrade as usual from the new repository:
``` ```shell
helm upgrade authentik authentik/authentik --devel -f values.yaml helm upgrade authentik authentik/authentik --devel -f values.yaml
``` ```

View File

@ -9,14 +9,14 @@ To export data from your old instance, run this command:
- docker-compose - docker-compose
``` ```shell
docker-compose exec server ./manage.py dumpdata -o /tmp/authentik_dump.json authentik_core.User authentik_core.Group authentik_crypto.CertificateKeyPair authentik_audit.Event otp_totp.totpdevice otp_static.staticdevice otp_static.statictoken docker-compose exec server ./manage.py dumpdata -o /tmp/authentik_dump.json authentik_core.User authentik_core.Group authentik_crypto.CertificateKeyPair authentik_audit.Event otp_totp.totpdevice otp_static.staticdevice otp_static.statictoken
docker cp authentik_server_1:/tmp/authentik_dump.json authentik_dump.json docker cp authentik_server_1:/tmp/authentik_dump.json authentik_dump.json
``` ```
- kubernetes - kubernetes
``` ```shell
kubectl exec -it authentik-web-... -- ./manage.py dumpdata -o /tmp/authentik_dump.json authentik_core.User authentik_core.Group authentik_crypto.CertificateKeyPair authentik_audit.Event otp_totp.totpdevice otp_static.staticdevice otp_static.statictoken kubectl exec -it authentik-web-... -- ./manage.py dumpdata -o /tmp/authentik_dump.json authentik_core.User authentik_core.Group authentik_crypto.CertificateKeyPair authentik_audit.Event otp_totp.totpdevice otp_static.staticdevice otp_static.statictoken
kubectl cp authentik-web-...:/tmp/authentik_dump.json authentik_dump.json kubectl cp authentik-web-...:/tmp/authentik_dump.json authentik_dump.json
``` ```
@ -25,14 +25,14 @@ After that, create a new authentik instance in a different namespace (kubernetes
- docker-compose - docker-compose
``` ```shell
docker cp authentik_dump.json new_authentik_server_1:/tmp/authentik_dump.json docker cp authentik_dump.json new_authentik_server_1:/tmp/authentik_dump.json
docker-compose exec server ./manage.py loaddata /tmp/authentik_dump.json docker-compose exec server ./manage.py loaddata /tmp/authentik_dump.json
``` ```
- kubernetes - kubernetes
``` ```shell
kubectl cp authentik_dump.json authentik-web-...:/tmp/authentik_dump.json kubectl cp authentik_dump.json authentik-web-...:/tmp/authentik_dump.json
kubectl exec -it authentik-web-... -- ./manage.py loaddata /tmp/authentik_dump.json kubectl exec -it authentik-web-... -- ./manage.py loaddata /tmp/authentik_dump.json
``` ```

View File

@ -8,7 +8,7 @@ Some hosting providers block outgoing SMTP ports, in which case you'll have to h
To test if an email stage, or the global email settings are configured correctly, you can run the following command: To test if an email stage, or the global email settings are configured correctly, you can run the following command:
``` ```shell
ak test_email <to address> [-S <stage name>] ak test_email <to address> [-S <stage name>]
``` ```
@ -16,12 +16,12 @@ If you omit the `-S` parameter, the email will be sent using the global settings
To run this command with docker-compose, use To run this command with docker-compose, use
``` ```shell
docker compose exec worker ak test_email [...] docker compose exec worker ak test_email [...]
``` ```
To run this command with Kubernetes, use To run this command with Kubernetes, use
``` ```shell
kubectl exec -it deployment/authentik-worker -c authentik -- ak test_email [...] kubectl exec -it deployment/authentik-worker -c authentik -- ak test_email [...]
``` ```

View File

@ -4,24 +4,24 @@ title: Troubleshooting LDAP Synchronization
To troubleshoot LDAP sources, you can run the command below to run a synchronization in the foreground and see any errors or warnings that might happen directly To troubleshoot LDAP sources, you can run the command below to run a synchronization in the foreground and see any errors or warnings that might happen directly
``` ```shell
docker compose run --rm worker ldap_sync *slug of the source* docker compose run --rm worker ldap_sync *slug of the source*
``` ```
or, for Kubernetes, run or, for Kubernetes, run
``` ```shell
kubectl exec -it deployment/authentik-worker -c authentik -- ak ldap_sync *slug of the source* kubectl exec -it deployment/authentik-worker -c authentik -- ak ldap_sync *slug of the source*
``` ```
Starting with authentik 2023.10, you can also run command below to explicitly check the connectivity to the configured LDAP Servers: Starting with authentik 2023.10, you can also run command below to explicitly check the connectivity to the configured LDAP Servers:
``` ```shell
docker compose run --rm worker ldap_check_connection *slug of the source* docker compose run --rm worker ldap_check_connection *slug of the source*
``` ```
or, for Kubernetes, run or, for Kubernetes, run
``` ```shell
kubectl exec -it deployment/authentik-worker -c authentik -- ak ldap_check_connection *slug of the source* kubectl exec -it deployment/authentik-worker -c authentik -- ak ldap_check_connection *slug of the source*
``` ```

View File

@ -10,19 +10,19 @@ This recovery key will give whoever has the link direct access to your instances
To create the key, run the following command: To create the key, run the following command:
``` ```shell
docker compose run --rm server create_recovery_key 10 akadmin docker compose run --rm server create_recovery_key 10 akadmin
``` ```
For Kubernetes, run For Kubernetes, run
``` ```shell
kubectl exec -it deployment/authentik-worker -c authentik -- ak create_recovery_key 10 akadmin kubectl exec -it deployment/authentik-worker -c authentik -- ak create_recovery_key 10 akadmin
``` ```
or, for CLI, run or, for CLI, run
``` ```shell
ak create_recovery_key 10 akadmin ak create_recovery_key 10 akadmin
``` ```

View File

@ -6,12 +6,12 @@ If all of the Admin groups have been deleted, or misconfigured during sync, you
Run the following command, where _username_ is the user you want to add to the newly created group: Run the following command, where _username_ is the user you want to add to the newly created group:
``` ```shell
docker compose run --rm server create_admin_group username docker compose run --rm server create_admin_group username
``` ```
or, for Kubernetes, run or, for Kubernetes, run
``` ```shell
kubectl exec -it deployment/authentik-worker -c authentik -- ak create_admin_group username kubectl exec -it deployment/authentik-worker -c authentik -- ak create_admin_group username
``` ```

View File

@ -8,13 +8,13 @@ The error should be temporary and not occur after initial installation.
If it does, you can run the following command to ensure all permissions exist: If it does, you can run the following command to ensure all permissions exist:
``` ```shell
docker compose run --rm worker repair_permissions docker compose run --rm worker repair_permissions
``` ```
or, for Kubernetes, run or, for Kubernetes, run
``` ```shell
kubectl exec -it deployment/authentik-worker -c authentik -- ak repair_permissions kubectl exec -it deployment/authentik-worker -c authentik -- ak repair_permissions
``` ```

View File

@ -17,7 +17,7 @@ The fastest way to create an invitation is to use our pre-defined `default-enrol
To download the `default-enrollment-flow` file, run this command: To download the `default-enrollment-flow` file, run this command:
``` ```shell
wget https://goauthentik.io/blueprints/example/flows-enrollment-2-stage.yaml wget https://goauthentik.io/blueprints/example/flows-enrollment-2-stage.yaml
``` ```

View File

@ -93,11 +93,11 @@ underneath `additionalHeaders`:
#### Example: #### Example:
``` ```yaml
additionalHeaders: additionalHeaders:
REMOTE-USER: joe.smith REMOTE-USER: joe.smith
REMOTE-EMAIL: joe@jsmith.com REMOTE-EMAIL: joe@jsmith.com
REMOTE-NAME: Joseph REMOTE-NAME: Joseph
``` ```
These headers will now be passed to the application when the user logs in. Most applications will need to be configured to accept these headers. Some examples of applications that can accept additional headers from an authentik Proxy Provider are [Grafana](https://grafana.com/docs/grafana/latest/auth/auth-proxy/) and [Tandoor Recipes](https://docs.tandoor.dev/features/authentication/). These headers will now be passed to the application when the user logs in. Most applications will need to be configured to accept these headers. Some examples of applications that can accept additional headers from an authentik Proxy Provider are [Grafana](https://grafana.com/docs/grafana/latest/auth/auth-proxy/) and [Tandoor Recipes](https://docs.tandoor.dev/features/authentication/).

View File

@ -1,6 +1,6 @@
const fs = require("fs").promises;
import type { Config } from "@docusaurus/types"; import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic"; import type * as Preset from "@docusaurus/preset-classic";
import { themes as prismThemes } from "prism-react-renderer";
module.exports = async function (): Promise<Config> { module.exports = async function (): Promise<Config> {
const remarkGithub = (await import("remark-github")).default; const remarkGithub = (await import("remark-github")).default;
@ -82,6 +82,8 @@ module.exports = async function (): Promise<Config> {
indexName: "goauthentik", indexName: "goauthentik",
}, },
prism: { prism: {
theme: prismThemes.oneLight,
darkTheme: prismThemes.oneDark,
additionalLanguages: ["python", "diff", "json"], additionalLanguages: ["python", "diff", "json"],
}, },
}, },