core: error malformed hashed password hash on import#24120
Open
PeshekDotDev wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for authentik-docs 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 @@
## main #24120 +/- ##
==========================================
- Coverage 92.84% 92.79% -0.05%
==========================================
Files 1056 1056
Lines 62719 62784 +65
Branches 424 424
==========================================
+ Hits 58229 58261 +32
- Misses 4490 4523 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Contributor
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-75cb663ff4120c5134dad29c1750484e4291eb81
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-75cb663ff4120c5134dad29c1750484e4291eb81Afterwards, run the upgrade commands from the latest release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
What does this PR change?
Currently, if you import a hashed password (via .env like
AUTHENTIK_BOOTSTRAP_PASSWORD_HASH: HASEDPASSWORDHERE, we do not validate the password isn't malformed until after it's already been imported.Why is this change needed?
A user can put a malformed password hash, boot up authentik, and then their admin login flow can explode. The error message will not make it clear as to why. This makes it clear at server boot that the hashed password is malformed.
How was this tested?
Setting
AUTHENTIK_BOOTSTRAP_PASSWORD_HASH: malformedbefore and after the changesLinked issues
Checklist
make all)make docs)