Skip to content

Commit

Permalink
Merge branch 'goauthentik:main' into sdko/integration-template/add-on…
Browse files Browse the repository at this point in the history
…ly-values-changed-warning
  • Loading branch information
4d62 authored Jan 23, 2025
2 parents d2c0c2c + 7163d33 commit 61756a9
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \
/bin/sh -c "/usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"

# Stage 5: Python dependencies
FROM ghcr.io/goauthentik/fips-python:3.12.7-slim-bookworm-fips AS python-deps
FROM ghcr.io/goauthentik/fips-python:3.12.8-slim-bookworm-fips AS python-deps

ARG TARGETARCH
ARG TARGETVARIANT
Expand Down Expand Up @@ -139,7 +139,7 @@ RUN --mount=type=bind,target=./pyproject.toml,src=./pyproject.toml \
poetry install --only=main --no-ansi --no-interaction --no-root"

# Stage 6: Run
FROM ghcr.io/goauthentik/fips-python:3.12.7-slim-bookworm-fips AS final-image
FROM ghcr.io/goauthentik/fips-python:3.12.8-slim-bookworm-fips AS final-image

ARG VERSION
ARG GIT_BUILD_HASH
Expand Down
1 change: 1 addition & 0 deletions authentik/sources/kerberos/api/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class KerberosSourceViewSet(UsedByMixin, ModelViewSet):
serializer_class = KerberosSourceSerializer
lookup_field = "slug"
filterset_fields = [
"pbm_uuid",
"name",
"slug",
"enabled",
Expand Down
1 change: 1 addition & 0 deletions authentik/sources/ldap/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class LDAPSourceViewSet(UsedByMixin, ModelViewSet):
serializer_class = LDAPSourceSerializer
lookup_field = "slug"
filterset_fields = [
"pbm_uuid",
"name",
"slug",
"enabled",
Expand Down
1 change: 1 addition & 0 deletions authentik/sources/oauth/api/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def filter_has_jwks(self, queryset, name, value): # pragma: no cover
class Meta:
model = OAuthSource
fields = [
"pbm_uuid",
"name",
"slug",
"enabled",
Expand Down
1 change: 1 addition & 0 deletions authentik/sources/plex/api/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class PlexSourceViewSet(UsedByMixin, ModelViewSet):
serializer_class = PlexSourceSerializer
lookup_field = "slug"
filterset_fields = [
"pbm_uuid",
"name",
"slug",
"enabled",
Expand Down
1 change: 1 addition & 0 deletions authentik/sources/saml/api/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SAMLSourceViewSet(UsedByMixin, ModelViewSet):
serializer_class = SAMLSourceSerializer
lookup_field = "slug"
filterset_fields = [
"pbm_uuid",
"name",
"slug",
"enabled",
Expand Down
2 changes: 1 addition & 1 deletion authentik/sources/scim/api/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ class SCIMSourceViewSet(UsedByMixin, ModelViewSet):
queryset = SCIMSource.objects.all()
serializer_class = SCIMSourceSerializer
lookup_field = "slug"
filterset_fields = ["name", "slug"]
filterset_fields = ["pbm_uuid", "name", "slug"]
search_fields = ["name", "slug", "token__identifier", "token__user__username"]
ordering = ["name"]
4 changes: 4 additions & 0 deletions authentik/stages/prompt/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from types import MethodType
from typing import Any

from django.contrib.messages import INFO, add_message
from django.db.models.query import QuerySet
from django.http import HttpRequest, HttpResponse
from django.http.request import QueryDict
Expand Down Expand Up @@ -147,6 +148,9 @@ def validate(self, attrs: dict[str, Any]) -> dict[str, Any]:
result = engine.result
if not result.passing:
raise ValidationError(list(result.messages))
else:
for msg in result.messages:
add_message(self.request, INFO, msg)
return attrs


Expand Down
30 changes: 30 additions & 0 deletions schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26248,6 +26248,11 @@ paths:
name: password_login_update_internal_password
schema:
type: boolean
- in: query
name: pbm_uuid
schema:
type: string
format: uuid
- in: query
name: realm
schema:
Expand Down Expand Up @@ -26620,6 +26625,11 @@ paths:
name: password_login_update_internal_password
schema:
type: boolean
- in: query
name: pbm_uuid
schema:
type: string
format: uuid
- in: query
name: peer_certificate
schema:
Expand Down Expand Up @@ -27049,6 +27059,11 @@ paths:
description: Number of results to return per page.
schema:
type: integer
- in: query
name: pbm_uuid
schema:
type: string
format: uuid
- in: query
name: policy_engine_mode
schema:
Expand Down Expand Up @@ -27418,6 +27433,11 @@ paths:
description: Number of results to return per page.
schema:
type: integer
- in: query
name: pbm_uuid
schema:
type: string
format: uuid
- in: query
name: policy_engine_mode
schema:
Expand Down Expand Up @@ -27821,6 +27841,11 @@ paths:
description: Number of results to return per page.
schema:
type: integer
- in: query
name: pbm_uuid
schema:
type: string
format: uuid
- in: query
name: policy_engine_mode
schema:
Expand Down Expand Up @@ -28184,6 +28209,11 @@ paths:
description: Number of results to return per page.
schema:
type: integer
- in: query
name: pbm_uuid
schema:
type: string
format: uuid
- name: search
required: false
in: query
Expand Down
8 changes: 4 additions & 4 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@floating-ui/dom": "^1.6.11",
"@formatjs/intl-listformat": "^7.5.7",
"@fortawesome/fontawesome-free": "^6.6.0",
"@goauthentik/api": "^2024.12.2-1737574964",
"@goauthentik/api": "^2024.12.2-1737631633",
"@lit-labs/ssr": "^3.2.2",
"@lit/context": "^1.1.2",
"@lit/localize": "^0.12.2",
Expand Down
6 changes: 4 additions & 2 deletions web/src/admin/providers/oauth2/OAuth2Sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DualSelectPair } from "@goauthentik/elements/ak-dual-select/types";
import { OAuthSource, SourcesApi } from "@goauthentik/api";

const sourceToSelect = (source: OAuthSource) => [
source.slug,
source.pk,
`${source.name} (${source.slug})`,
source.name,
source,
Expand Down Expand Up @@ -37,13 +37,15 @@ export function oauth2SourcesSelector(instanceMappings?: string[]) {
const oauthSources = new SourcesApi(DEFAULT_CONFIG);
const mappings = await Promise.allSettled(
instanceMappings.map((instanceId) =>
oauthSources.sourcesOauthRetrieve({ slug: instanceId }),
oauthSources.sourcesOauthList({ pbmUuid: instanceId }),
),
);

return mappings
.filter((s) => s.status === "fulfilled")
.map((s) => s.value)
.filter((s) => s.pagination.count > 0)
.map((s) => s.results[0])
.map(sourceToSelect);
};
}

0 comments on commit 61756a9

Please sign in to comment.