update authentik to 2026.8.0 (#16674)

This commit is contained in:
thieneret
2026-08-22 06:30:52 +02:00
committed by GitHub
parent 9b319b7c01
commit f884cb704b
2 changed files with 83 additions and 151 deletions
+29 -25
View File
@@ -50,16 +50,16 @@ $STD apt install -y \
git
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
NODE_VERSION="26" NODE_MODULE=pnpm@11 setup_nodejs
setup_yq
setup_go
RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust
UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.6" setup_uv
UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.7" setup_uv
PG_VERSION="17" setup_postgresql
PG_DB_NAME="authentik" PG_DB_USER="authentik" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
XMLSEC_VERSION="1.3.12"
AUTHENTIK_VERSION="version/2026.5.6"
AUTHENTIK_VERSION="version/2026.8.0"
fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "${XMLSEC_VERSION}" "/opt/xmlsec"
fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary"
@@ -80,23 +80,25 @@ $STD rustup default "$(sed -n 's/channel = "\(.*\)"/\1/p' rust-toolchain.toml)"
msg_ok "Configured rust"
msg_info "Setting up web"
cd /opt/authentik/web
export NODE_ENV="production"
$STD npm install
$STD npm run build
$STD npm run build:sfe
cd /opt/authentik
$STD node ./scripts/node/lint-runtime.mjs ./web
cd /opt/authentik/web
$STD pnpm install --frozen-lockfile
$STD pnpm run build
$STD pnpm run build:sfe
msg_ok "Setup web"
msg_info "Setting up go proxy"
msg_info "Building outposts"
cd /opt/authentik
mkdir -p /opt/authentik/bin
export CGO_ENABLED="1"
export CC="$(arch_resolve "x86_64" "aarch64")-linux-gnu-gcc"
$STD go mod download
$STD go build -o /opt/authentik/authentik-server ./cmd/server
$STD go build -o /opt/authentik/ldap ./cmd/ldap
$STD go build -o /opt/authentik/rac ./cmd/rac
$STD go build -o /opt/authentik/radius ./cmd/radius
msg_ok "Setup go proxy"
$STD go build -o /opt/authentik/bin/ldap ./cmd/ldap
$STD go build -o /opt/authentik/bin/rac ./cmd/rac
$STD go build -o /opt/authentik/bin/radius ./cmd/radius
msg_ok "Built outposts"
cat <<EOF >/usr/local/etc/GeoIP.conf
AccountID ChangeME
@@ -109,13 +111,13 @@ EOF
echo "#39 19 * * 6,4 /usr/bin/geoipupdate -f /usr/local/etc/GeoIP.conf" | crontab -
msg_info "Building worker. It may take more than 10 minutes, please be patient."
msg_info "Building binary. It may take more than 10 minutes, please be patient."
export AWS_LC_FIPS_SYS_CC="clang"
cd /opt/authentik
$STD cargo build --package authentik --no-default-features --features core --locked --release --jobs 1
cp ./target/release/authentik /opt/authentik/authentik-worker
$STD cargo build --package authentik --no-default-features --features core --locked --release
cp ./target/release/authentik /opt/authentik/bin/
rm -r ./target
msg_ok "Built worker"
msg_ok "Built binary"
msg_info "Setting up python server"
export UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec"
@@ -127,10 +129,10 @@ export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
cd /opt/authentik
for attempt in 1 2 3; do
if [[ $attempt -eq 3 ]]; then
$STD uv sync --frozen --no-install-project --no-dev
$STD uv sync --locked --no-install-project --no-dev
break
fi
$STD uv sync --frozen --no-install-project --no-dev && break
$STD uv sync --locked --no-install-project --no-dev && break
msg_warn "uv sync attempt $attempt failed, retrying..."
sleep $((attempt * 15))
done
@@ -159,6 +161,7 @@ UV_NATIVE_TLS=1
VENV_PATH=/opt/authentik/.venv
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
RUST_BACKTRACE=full
PATH=/opt/authentik/lifecycle:/opt/authentik/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
DJANGO_SETTINGS_MODULE=authentik.root.settings
PROMETHEUS_MULTIPROC_DIR="/tmp/authentik_prometheus_tmp"
@@ -174,6 +177,7 @@ UV_NATIVE_TLS=1
VENV_PATH=/opt/authentik/.venv
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
RUST_BACKTRACE=full
PATH=/opt/authentik/lifecycle:/opt/authentik/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
DJANGO_SETTINGS_MODULE=authentik.root.settings
PROMETHEUS_MULTIPROC_DIR="/tmp/authentik_prometheus_tmp"
@@ -201,7 +205,7 @@ msg_ok "Created authentik config"
msg_info "Creating services"
cat <<EOF >/etc/systemd/system/authentik-server.service
[Unit]
Description=authentik Go Server (API Gateway)
Description=authentik Server
After=network.target
Wants=postgresql.service
@@ -210,7 +214,7 @@ User=authentik
Group=authentik
EnvironmentFile=/etc/default/authentik-server
ExecStartPre=/usr/bin/mkdir -p "\${PROMETHEUS_MULTIPROC_DIR}"
ExecStart=/opt/authentik/authentik-server
ExecStart=/opt/authentik/bin/authentik server
WorkingDirectory=/opt/authentik/
Restart=always
RestartSec=5
@@ -230,7 +234,7 @@ Group=authentik
Type=simple
EnvironmentFile=/etc/default/authentik-worker
ExecStartPre=/usr/bin/mkdir -p "\${PROMETHEUS_MULTIPROC_DIR}"
ExecStart=/opt/authentik/authentik-worker worker
ExecStart=/opt/authentik/bin/authentik worker
WorkingDirectory=/opt/authentik
Restart=always
RestartSec=5
@@ -248,7 +252,7 @@ Wants=postgresql.service
[Service]
User=authentik
Group=authentik
ExecStart=/opt/authentik/ldap
ExecStart=/opt/authentik/bin/ldap
WorkingDirectory=/opt/authentik/
Restart=always
RestartSec=5
@@ -267,7 +271,7 @@ Wants=postgresql.service
[Service]
User=authentik
Group=authentik
ExecStart=/opt/authentik/rac
ExecStart=/opt/authentik/bin/rac
WorkingDirectory=/opt/authentik/
Restart=always
RestartSec=5
@@ -286,7 +290,7 @@ Wants=postgresql.service
[Service]
User=authentik
Group=authentik
ExecStart=/opt/authentik/radius
ExecStart=/opt/authentik/bin/radius
WorkingDirectory=/opt/authentik/
Restart=always
RestartSec=5