Skip to content

web/admin: Improve WS-Fed algo selection logic (cherry-pick #20881 to version-2026.2)#21438

Closed
authentik-automation[bot] wants to merge 5 commits intoversion-2026.2from
cherry-pick/20881-to-version-2026.2
Closed

web/admin: Improve WS-Fed algo selection logic (cherry-pick #20881 to version-2026.2)#21438
authentik-automation[bot] wants to merge 5 commits intoversion-2026.2from
cherry-pick/20881-to-version-2026.2

Conversation

@authentik-automation
Copy link
Copy Markdown
Contributor

⚠️ This cherry-pick has conflicts that require manual resolution.

Cherry-pick of #20881 to version-2026.2 branch.

Original PR: #20881
Original Author: @PeshekDotDev
Cherry-picked commit: db5a154

Please resolve the conflicts in this PR before merging.

This cherry-pick has conflicts that need manual resolution.

Original PR: #20881
Original commit: db5a154
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 7, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 2e564b6
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69e7a28555230e00082c8f0c
😎 Deploy Preview https://deploy-preview-21438--authentik-integrations.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
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.46%. Comparing base (e5d873c) to head (2e564b6).
⚠️ Report is 1 commits behind head on version-2026.2.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                Coverage Diff                 @@
##           version-2026.2   #21438      +/-   ##
==================================================
- Coverage           93.47%   93.46%   -0.01%     
==================================================
  Files                 981      981              
  Lines               55343    55343              
==================================================
- Hits                51731    51727       -4     
- Misses               3612     3616       +4     
Flag Coverage Δ
conformance 37.26% <ø> (+<0.01%) ⬆️
e2e 43.01% <ø> (-0.01%) ⬇️
integration 22.24% <ø> (+<0.01%) ⬆️
unit 91.65% <ø> (+<0.01%) ⬆️
unit-migrate 91.70% <ø> (+1.94%) ⬆️

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-2e564b67bcf0ca9dde0ab16e03545643e946a261
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-2e564b67bcf0ca9dde0ab16e03545643e946a261

Afterwards, run the upgrade commands from the latest release notes.

Copy link
Copy Markdown
Contributor

@kensternberg-authentik kensternberg-authentik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of nitpicking, and one question about if signingKeyType is initialized correctly.

?selected=${provider?.signatureAlgorithm === algorithmValue ||
(!isCurrentAlgorithmAvailable && hash === "SHA256")}
(!isCurrentAlgorithmAvailable &&
hash === DEFAULT_HASH_ALGORITHM)}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you touched it, maybe you can fix an issue here: isCurrentAlgorithmAvailable is recalculated on every loop, but doesn't use the variable that changes with each loop (hash). Consider moving the calculation for isCurrentAlgorithmAvailable out of the map() function. Since you only ever check the negation, you could rewrite in to something like currentAlgorithmNotAvailable.

const target = ev.target as AkCryptoCertificateSearch;
if (!target) return;
this.hasSigningKp = !!target.selectedKeypair;
this.signingKeyType = target.selectedKeypair?.keyType ?? KeyTypeEnum.Rsa;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This expression appears three different times, in three different Forms. If the default ever changes, someone's gonna miss one. I wonder if there's a way to extract this and put it somewhere safe.

const target = ev.target as AkCryptoCertificateSearch;
if (!target) return;
this.hasSigningKp = !!target.selectedKeypair;
this.signingKeyType = target.selectedKeypair?.keyType ?? KeyTypeEnum.Rsa;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 47 echoes Line 27. Is there a reason line 48 has no equivalent setter in loadInstance()?


renderForm() {
const setHasSigningKp = (ev: InputEvent) => {
const target = ev.target as AkCryptoCertificateSearch;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider putting a typeguard function here. InputEvent is very generic; checking that the source really is an AkCryptoCertificateSearch might catch someone using this wrong.

@PeshekDotDev PeshekDotDev enabled auto-merge (squash) April 14, 2026 04:28
@PeshekDotDev PeshekDotDev disabled auto-merge April 14, 2026 04:56
@BeryJu BeryJu closed this Apr 27, 2026
@BeryJu BeryJu deleted the cherry-pick/20881-to-version-2026.2 branch April 27, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants