web/admin: Improve WS-Fed algo selection logic (cherry-pick #20881 to version-2026.2)#21438
web/admin: Improve WS-Fed algo selection logic (cherry-pick #20881 to version-2026.2)#21438authentik-automation[bot] wants to merge 5 commits intoversion-2026.2from
Conversation
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your 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)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your 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-2e564b67bcf0ca9dde0ab16e03545643e946a261Afterwards, run the upgrade commands from the latest release notes. |
kensternberg-authentik
left a comment
There was a problem hiding this comment.
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)} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Consider putting a typeguard function here. InputEvent is very generic; checking that the source really is an AkCryptoCertificateSearch might catch someone using this wrong.
Cherry-pick of #20881 to
version-2026.2branch.Original PR: #20881
Original Author: @PeshekDotDev
Cherry-picked commit: db5a154
Please resolve the conflicts in this PR before merging.