Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,17 @@ FROM --platform=${BUILDPLATFORM} ghcr.io/maxmind/geoipupdate:v7.1.0 AS geoip
ENV GEOIPUPDATE_EDITION_IDS="GeoLite2-City GeoLite2-ASN"
ENV GEOIPUPDATE_VERBOSE="1"
ENV GEOIPUPDATE_ACCOUNT_ID_FILE="/run/secrets/GEOIPUPDATE_ACCOUNT_ID"
ENV GEOIPUPDATE_LICENSE_KEY_FILE="/run/secrets/GEOIPUPDATE_LICENSE_KEY"

USER root
RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \
--mount=type=secret,id=GEOIPUPDATE_LICENSE_KEY \
mkdir -p /usr/share/GeoIP && \
/bin/sh -c "/usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"
/bin/sh -c "GEOIPUPDATE_LICENSE_KEY_FILE=/run/secrets/GEOIPUPDATE_LICENSE_KEY /usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"

# Stage 5: Download uv
FROM ghcr.io/astral-sh/uv:0.7.2 AS uv
# Stage 6: Base python image
FROM ghcr.io/goauthentik/fips-python:3.12.10-slim-bookworm-fips AS python-base
FROM ghcr.io/goauthentik/fips-python:3.13.3-slim-bookworm-fips AS python-base

ENV VENV_PATH="/ak-root/.venv" \
PATH="/lifecycle:/ak-root/.venv/bin:$PATH" \
Expand Down
2 changes: 1 addition & 1 deletion authentik/api/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def create_component(generator: SchemaGenerator, name, schema, type_=ResolvedCom
return component


def postprocess_schema_responses(result, generator: SchemaGenerator, **kwargs): # noqa: W0613
def postprocess_schema_responses(result, generator: SchemaGenerator, **kwargs):
"""Workaround to set a default response for endpoints.
Workaround suggested at
<https://github.com/tfranzel/drf-spectacular/issues/119#issuecomment-656970357>
Expand Down
4 changes: 1 addition & 3 deletions authentik/blueprints/v1/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ def get_model(self, blueprint: "Blueprint") -> str:
"""Get the blueprint model, with yaml tags resolved if present"""
return str(self.tag_resolver(self.model, blueprint))

def get_permissions(
self, blueprint: "Blueprint"
) -> Generator[BlueprintEntryPermission, None, None]:
def get_permissions(self, blueprint: "Blueprint") -> Generator[BlueprintEntryPermission]:
"""Get permissions of this entry, with all yaml tags resolved"""
for perm in self.permissions:
yield BlueprintEntryPermission(
Expand Down
2 changes: 1 addition & 1 deletion authentik/events/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def to_representation(self, instance):


@contextmanager
def capture_logs(log_default_output=True) -> Generator[list[LogEvent], None, None]:
def capture_logs(log_default_output=True) -> Generator[list[LogEvent]]:
"""Capture log entries created"""
logs = []
cap = LogCapture()
Expand Down
2 changes: 1 addition & 1 deletion authentik/lib/sync/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def iter_eval(
request: HttpRequest | None,
return_mapping: bool = False,
**kwargs,
) -> Generator[tuple[dict, PropertyMapping], None]:
) -> Generator[tuple[dict, PropertyMapping]]:
"""Iterate over all mappings that were pre-compiled and
execute all of them with the given context"""
if not self.__has_compiled:
Expand Down
2 changes: 1 addition & 1 deletion authentik/providers/scim/clients/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
chunk_size = len(ops)
if len(ops) < 1:
return
for chunk in batched(ops, chunk_size):
for chunk in batched(ops, chunk_size, strict=False):

Check warning on line 202 in authentik/providers/scim/clients/groups.py

View check run for this annotation

Codecov / codecov/patch

authentik/providers/scim/clients/groups.py#L202

Added line #L202 was not covered by tests
req = PatchRequest(Operations=list(chunk))
self._request(
"PATCH",
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "authentik"
version = "2025.4.0"
description = ""
authors = [{ name = "authentik Team", email = "hello@goauthentik.io" }]
requires-python = "==3.12.*"
requires-python = "==3.13.*"
dependencies = [
"argon2-cffi",
"celery",
Expand Down Expand Up @@ -155,12 +155,12 @@ ignore-words = ".github/codespell-words.txt"

[tool.black]
line-length = 100
target-version = ['py312']
target-version = ['py313']
exclude = 'node_modules'

[tool.ruff]
line-length = 100
target-version = "py312"
target-version = "py313"
exclude = ["**/migrations/**", "**/node_modules/**"]

[tool.ruff.lint]
Expand Down
782 changes: 453 additions & 329 deletions uv.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion website/docs/developer-docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ While the prerequisites above must be satisfied prior to having your pull reques

All Python code is linted with [black](https://black.readthedocs.io/en/stable/) and [Ruff](https://docs.astral.sh/ruff).

authentik runs on Python 3.12 at the time of writing this.
authentik runs on Python 3.13 at the time of writing this.

- Use native type-annotations wherever possible.
- Add meaningful docstrings when possible.
Expand Down
12 changes: 5 additions & 7 deletions website/docs/developer-docs/setup/full-dev-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";

## Requirements

- [Python](https://www.python.org/) (3.12 or later)
- [Python](https://www.python.org/) (3.13 or later)
- [uv](https://docs.astral.sh/uv/getting-started/installation/), (Latest stable release)
- [Go](https://go.dev/) (1.23 or later)
- [Go](https://go.dev/) (1.24 or later)
- [Node.js](https://nodejs.org/en) (22 or later)
- [PostgreSQL](https://www.postgresql.org/) (16 or later)
- [Redis](https://redis.io/) (7 or later)
Expand Down Expand Up @@ -54,9 +54,8 @@ values={[
To install the native dependencies on macOS, run:

```sh
$ pip install uv
$ brew install libxmlsec1 libpq krb5 # Required development libraries,
$ brew install postgresql redis node@22 golangci-lint # Required CLI tools
$ brew install uv postgresql redis node@22 golangci-lint # Required CLI tools
```

</TabItem>
Expand All @@ -66,14 +65,13 @@ To install native dependencies on Debian or Ubuntu, run:

```sh
$ pip install uv
$ sudo apt-get install libgss-dev krb5-config libkrb5-dev postgresql-server-dev-all
$ sudo apt-get install libgss-dev krb5-config libkrb5-dev postgresql-server-dev-all
$ sudo apt-get install postresql redis
```

Adjust your needs as required for other distributions such as Red Hat, SUSE, or Arch.

Install golangci-lint locally [from the site
instructions](https://golangci-lint.run/welcome/install/#other-ci).
Install golangci-lint locally [from the site instructions](https://golangci-lint.run/welcome/install/#other-ci).

</TabItem>

Expand Down
Loading