Skip to content

Commit 55c6e24

Browse files
Merge branch 'main' into web/element/ak-select-table
* main: (146 commits) website: bump @types/react from 18.3.8 to 18.3.9 in /website (#11502) core: bump debugpy from 1.8.5 to 1.8.6 (#11503) core: bump google-api-python-client from 2.146.0 to 2.147.0 (#11504) web: bump @types/node from 22.6.1 to 22.7.0 in /web (#11505) core, web: update translations (#11500) sources/ldap: fix mapping check, fix debug endpoint (#11442) web/admin: fix Authentication flow being required (#11496) web: bump the wdio group across 2 directories with 5 updates (#11494) web: bump turnstile-types from 1.2.2 to 1.2.3 in /web (#11495) web: bump the swc group across 2 directories with 11 updates (#11493) web: bump the eslint group across 2 directories with 5 updates (#11492) web: bump the storybook group across 1 directory with 7 updates (#11491) core: bump bandit from 1.7.9 to 1.7.10 (#11485) web: bump the rollup group across 2 directories with 3 updates (#11487) web: bump @types/node from 22.5.5 to 22.6.1 in /web (#11490) website/docs: use a more consistent version requirement notice (#11400) website/docs: clarify API browser access (#11373) website/integrations: Glitchtip: update redirect URL (#11438) web: bump knip from 5.30.4 to 5.30.5 in /web (#11479) fix: proxy provider - docker traefik label (#11460) ...
2 parents e780182 + 004fb10 commit 55c6e24

File tree

231 files changed

+20834
-10642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+20834
-10642
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2024.8.0
2+
current_version = 2024.8.2
33
tag = True
44
commit = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<rc_t>[a-zA-Z-]+)(?P<rc_n>[1-9]\\d*))?

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,24 @@ updates:
4444
- "babel-*"
4545
eslint:
4646
patterns:
47+
- "@eslint/*"
4748
- "@typescript-eslint/*"
48-
- "eslint"
4949
- "eslint-*"
50+
- "eslint"
51+
- "typescript-eslint"
5052
storybook:
5153
patterns:
5254
- "@storybook/*"
5355
- "*storybook*"
5456
esbuild:
5557
patterns:
5658
- "@esbuild/*"
59+
- "esbuild*"
5760
rollup:
5861
patterns:
5962
- "@rollup/*"
6063
- "rollup-*"
64+
- "rollup*"
6165
swc:
6266
patterns:
6367
- "@swc/*"

.github/workflows/ci-main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ jobs:
120120
with:
121121
flags: unit
122122
token: ${{ secrets.CODECOV_TOKEN }}
123+
- if: ${{ !cancelled() }}
124+
uses: codecov/test-results-action@v1
125+
with:
126+
flags: unit
127+
file: unittest.xml
128+
token: ${{ secrets.CODECOV_TOKEN }}
123129
test-integration:
124130
runs-on: ubuntu-latest
125131
timeout-minutes: 30
@@ -138,6 +144,12 @@ jobs:
138144
with:
139145
flags: integration
140146
token: ${{ secrets.CODECOV_TOKEN }}
147+
- if: ${{ !cancelled() }}
148+
uses: codecov/test-results-action@v1
149+
with:
150+
flags: integration
151+
file: unittest.xml
152+
token: ${{ secrets.CODECOV_TOKEN }}
141153
test-e2e:
142154
name: test-e2e (${{ matrix.job.name }})
143155
runs-on: ubuntu-latest
@@ -190,6 +202,12 @@ jobs:
190202
with:
191203
flags: e2e
192204
token: ${{ secrets.CODECOV_TOKEN }}
205+
- if: ${{ !cancelled() }}
206+
uses: codecov/test-results-action@v1
207+
with:
208+
flags: e2e
209+
file: unittest.xml
210+
token: ${{ secrets.CODECOV_TOKEN }}
193211
ci-core-mark:
194212
needs:
195213
- lint

.github/workflows/ci-web.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
- working-directory: ${{ matrix.project }}/
4646
run: |
4747
npm ci
48-
${{ matrix.extra_setup }}
4948
- name: Generate API
5049
run: make gen-client-ts
5150
- name: Lint

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \
9494
/bin/sh -c "/usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"
9595

9696
# Stage 5: Python dependencies
97-
FROM ghcr.io/goauthentik/fips-python:3.12.5-slim-bookworm-fips-full AS python-deps
97+
FROM ghcr.io/goauthentik/fips-python:3.12.6-slim-bookworm-fips-full AS python-deps
9898

9999
ARG TARGETARCH
100100
ARG TARGETVARIANT
@@ -124,7 +124,7 @@ RUN --mount=type=bind,target=./pyproject.toml,src=./pyproject.toml \
124124
pip install --force-reinstall /wheels/*"
125125

126126
# Stage 6: Run
127-
FROM ghcr.io/goauthentik/fips-python:3.12.5-slim-bookworm-fips-full AS final-image
127+
FROM ghcr.io/goauthentik/fips-python:3.12.6-slim-bookworm-fips-full AS final-image
128128

129129
ARG VERSION
130130
ARG GIT_BUILD_HASH

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Even if the issue is not a CVE, we still greatly appreciate your help in hardeni
2020

2121
| Version | Supported |
2222
| -------- | --------- |
23-
| 2024.4.x ||
2423
| 2024.6.x ||
24+
| 2024.8.x ||
2525

2626
## Reporting a Vulnerability
2727

authentik/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from os import environ
44

5-
__version__ = "2024.8.0"
5+
__version__ = "2024.8.2"
66
ENV_GIT_HASH_KEY = "GIT_BUILD_HASH"
77

88

authentik/admin/tasks.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""authentik admin tasks"""
22

3-
import re
4-
53
from django.core.cache import cache
6-
from django.core.validators import URLValidator
74
from django.db import DatabaseError, InternalError, ProgrammingError
5+
from django.utils.translation import gettext_lazy as _
86
from packaging.version import parse
97
from requests import RequestException
108
from structlog.stdlib import get_logger
@@ -21,8 +19,6 @@
2119
VERSION_NULL = "0.0.0"
2220
VERSION_CACHE_KEY = "authentik_latest_version"
2321
VERSION_CACHE_TIMEOUT = 8 * 60 * 60 # 8 hours
24-
# Chop of the first ^ because we want to search the entire string
25-
URL_FINDER = URLValidator.regex.pattern[1:]
2622
LOCAL_VERSION = parse(__version__)
2723

2824

@@ -78,10 +74,16 @@ def update_latest_version(self: SystemTask):
7874
context__new_version=upstream_version,
7975
).exists():
8076
return
81-
event_dict = {"new_version": upstream_version}
82-
if match := re.search(URL_FINDER, data.get("stable", {}).get("changelog", "")):
83-
event_dict["message"] = f"Changelog: {match.group()}"
84-
Event.new(EventAction.UPDATE_AVAILABLE, **event_dict).save()
77+
Event.new(
78+
EventAction.UPDATE_AVAILABLE,
79+
message=_(
80+
"New version {version} available!".format(
81+
version=upstream_version,
82+
)
83+
),
84+
new_version=upstream_version,
85+
changelog=data.get("stable", {}).get("changelog_url"),
86+
).save()
8587
except (RequestException, IndexError) as exc:
8688
cache.set(VERSION_CACHE_KEY, VERSION_NULL, VERSION_CACHE_TIMEOUT)
8789
self.set_error(exc)

authentik/admin/tests/test_tasks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"stable": {
1818
"version": "99999999.9999999",
1919
"changelog": "See https://goauthentik.io/test",
20+
"changelog_url": "https://goauthentik.io/test",
2021
"reason": "bugfix",
2122
},
2223
}
@@ -35,7 +36,7 @@ def test_version_valid_response(self):
3536
Event.objects.filter(
3637
action=EventAction.UPDATE_AVAILABLE,
3738
context__new_version="99999999.9999999",
38-
context__message="Changelog: https://goauthentik.io/test",
39+
context__message="New version 99999999.9999999 available!",
3940
).exists()
4041
)
4142
# test that a consecutive check doesn't create a duplicate event
@@ -45,7 +46,7 @@ def test_version_valid_response(self):
4546
Event.objects.filter(
4647
action=EventAction.UPDATE_AVAILABLE,
4748
context__new_version="99999999.9999999",
48-
context__message="Changelog: https://goauthentik.io/test",
49+
context__message="New version 99999999.9999999 available!",
4950
)
5051
),
5152
1,

authentik/core/api/users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,10 @@ def impersonate(self, request: Request, pk: int) -> Response:
678678
if not request.tenant.impersonation:
679679
LOGGER.debug("User attempted to impersonate", user=request.user)
680680
return Response(status=401)
681-
if not request.user.has_perm("impersonate"):
681+
user_to_be = self.get_object()
682+
if not request.user.has_perm("impersonate", user_to_be):
682683
LOGGER.debug("User attempted to impersonate without permissions", user=request.user)
683684
return Response(status=401)
684-
user_to_be = self.get_object()
685685
if user_to_be.pk == self.request.user.pk:
686686
LOGGER.debug("User attempted to impersonate themselves", user=request.user)
687687
return Response(status=401)

0 commit comments

Comments
 (0)