Skip to content

api/search: add number and boolean support in AKQL queries on JSON fields (#23418) - #24028

Merged
BeryJu merged 1 commit into
goauthentik:mainfrom
atereshkin:akql-non-string-subattributes
Jul 14, 2026
Merged

BeryJu merged 1 commit into
goauthentik:mainfrom
atereshkin:akql-non-string-subattributes

Conversation

@atereshkin

Copy link
Copy Markdown
Contributor

Details

Right now AKQL queries on JSON fields only match string attributes, but not boolean, int or float (see #23418). This PR addresses that deficiency.

What does this PR change?

A value_types declaration is added on authentik.api.search.fields.JSONSearchField + some care to correctly handle float queries.

How was this tested?

UI + test suite + new tests.

Linked issues

closes #23418


Checklist

  • The project has been linted, built, and tested (make all)

@atereshkin
atereshkin requested a review from a team as a code owner July 14, 2026 16:53
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 0199242
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a56698987d63d00082d745c
😎 Deploy Preview https://deploy-preview-24028--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.25%. Comparing base (ba4d3ab) to head (0199242).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24028      +/-   ##
==========================================
- Coverage   93.31%   93.25%   -0.06%     
==========================================
  Files        1045     1045              
  Lines       61401    61422      +21     
  Branches      424      424              
==========================================
- Hits        57296    57282      -14     
- Misses       4105     4140      +35     
Flag Coverage Δ
conformance 36.12% <19.04%> (-0.01%) ⬇️
e2e 41.28% <19.04%> (-0.02%) ⬇️
integration 32.05% <19.04%> (-0.50%) ⬇️
rust 0.00% <ø> (ø)
unit 92.41% <100.00%> (+<0.01%) ⬆️
unit-migrate 92.45% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@BeryJu
BeryJu merged commit 67afed1 into goauthentik:main Jul 14, 2026
115 of 116 checks passed
@BeryJu BeryJu added the backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 label Jul 14, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #24033

BeryJu pushed a commit that referenced this pull request Jul 14, 2026
…elds (#23418) (cherry-pick #24028 to version-2026.5) (#24033)

api/search: add number and boolean support in AKQL queries on JSON fields (#23418) (#24028)

Co-authored-by: Alexander Tereshkin <[email protected]>
kensternberg-authentik added a commit that referenced this pull request Jul 15, 2026
* main:
  web/flow: revert locale-driven flow re-request from FlowExecutor (#24050)
  web/bug: harmonize and make routine the display of tasks (part 3: problem children) (#23840)
  root: PostgreSQL direct-endpoint support for LISTEN/NOTIFY and advisory locks (#23013)
  docs/social-logins: Add jumpcloud oidc and saml (#24048)
  core, web: update translations (#24037)
  web: bump @goauthentik/eslint-config from 2.0.0 to 2.0.2 in /web in the goauthentik group across 1 directory (#24007)
  ci: bump taiki-e/install-action from 2.82.9 to 2.83.2 in /.github/actions/setup (#24045)
  website: bump openapi-to-postmanv2 from 6.2.0 to 6.3.0 in /website (#24041)
  core: bump pnpm/pnpm from 11.11.0 to 11.12.0 in /lifecycle/container (#24042)
  core: bump pnpm/pnpm from 11.11.0 to 11.12.0 in /website (#24043)
  web: bump @sentry/browser from 10.63.0 to 10.64.0 in /web in the sentry group across 1 directory (#24044)
  web: bump aws-cdk from 2.1128.1 to 2.1129.0 (#24046)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#24039)
  packages/django-dramatiq-postgres/broker: close unusable PostgreSQL connections (#24023)
  api/search: add number and boolean support in AKQL queries on JSON fields (#23418) (#24028)
  enterprise: simplify tests (#18404)
  website/docs: Remove Public Release Docs. (#24031)
  website/docs: sys-mgmt: tweak settings wording (#24029)
  website/docs: cleanup 07-12: update release process guidance (#23970)
  website/integrations: add infiscal (#23996)
kensternberg-authentik added a commit that referenced this pull request Jul 15, 2026
* main: (104 commits)
  web/flow: revert locale-driven flow re-request from FlowExecutor (#24050)
  web/bug: harmonize and make routine the display of tasks (part 3: problem children) (#23840)
  root: PostgreSQL direct-endpoint support for LISTEN/NOTIFY and advisory locks (#23013)
  docs/social-logins: Add jumpcloud oidc and saml (#24048)
  core, web: update translations (#24037)
  web: bump @goauthentik/eslint-config from 2.0.0 to 2.0.2 in /web in the goauthentik group across 1 directory (#24007)
  ci: bump taiki-e/install-action from 2.82.9 to 2.83.2 in /.github/actions/setup (#24045)
  website: bump openapi-to-postmanv2 from 6.2.0 to 6.3.0 in /website (#24041)
  core: bump pnpm/pnpm from 11.11.0 to 11.12.0 in /lifecycle/container (#24042)
  core: bump pnpm/pnpm from 11.11.0 to 11.12.0 in /website (#24043)
  web: bump @sentry/browser from 10.63.0 to 10.64.0 in /web in the sentry group across 1 directory (#24044)
  web: bump aws-cdk from 2.1128.1 to 2.1129.0 (#24046)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#24039)
  packages/django-dramatiq-postgres/broker: close unusable PostgreSQL connections (#24023)
  api/search: add number and boolean support in AKQL queries on JSON fields (#23418) (#24028)
  enterprise: simplify tests (#18404)
  website/docs: Remove Public Release Docs. (#24031)
  website/docs: sys-mgmt: tweak settings wording (#24029)
  website/docs: cleanup 07-12: update release process guidance (#23970)
  website/integrations: add infiscal (#23996)
  ...
kensternberg-authentik added a commit that referenced this pull request Jul 15, 2026
…card-2

* web/cleanup/schedule-card-1: (104 commits)
  web/flow: revert locale-driven flow re-request from FlowExecutor (#24050)
  web/bug: harmonize and make routine the display of tasks (part 3: problem children) (#23840)
  root: PostgreSQL direct-endpoint support for LISTEN/NOTIFY and advisory locks (#23013)
  docs/social-logins: Add jumpcloud oidc and saml (#24048)
  core, web: update translations (#24037)
  web: bump @goauthentik/eslint-config from 2.0.0 to 2.0.2 in /web in the goauthentik group across 1 directory (#24007)
  ci: bump taiki-e/install-action from 2.82.9 to 2.83.2 in /.github/actions/setup (#24045)
  website: bump openapi-to-postmanv2 from 6.2.0 to 6.3.0 in /website (#24041)
  core: bump pnpm/pnpm from 11.11.0 to 11.12.0 in /lifecycle/container (#24042)
  core: bump pnpm/pnpm from 11.11.0 to 11.12.0 in /website (#24043)
  web: bump @sentry/browser from 10.63.0 to 10.64.0 in /web in the sentry group across 1 directory (#24044)
  web: bump aws-cdk from 2.1128.1 to 2.1129.0 (#24046)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#24039)
  packages/django-dramatiq-postgres/broker: close unusable PostgreSQL connections (#24023)
  api/search: add number and boolean support in AKQL queries on JSON fields (#23418) (#24028)
  enterprise: simplify tests (#18404)
  website/docs: Remove Public Release Docs. (#24031)
  website/docs: sys-mgmt: tweak settings wording (#24029)
  website/docs: cleanup 07-12: update release process guidance (#23970)
  website/integrations: add infiscal (#23996)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AKQL not working with non string attributes

2 participants