Skip to content

core: support hashed password in users API + automated install#18686

Open
dominic-r wants to merge 28 commits intomainfrom
sdko/hash-password-bootstrap
Open

core: support hashed password in users API + automated install#18686
dominic-r wants to merge 28 commits intomainfrom
sdko/hash-password-bootstrap

Conversation

@dominic-r
Copy link
Member

@dominic-r dominic-r commented Dec 9, 2025

Overview:

Adds support for bootstrapping authentik using pre-hashed passwords. Instead of passing plaintext passwords through environment variables, admins can generate a hash locally and configure authentik with the hash directly. This also extends to runtime as admins can set password hashes on existing users via API or the admin UI as they would for setting. password.

Motivation:

The current AUTHENTIK_BOOTSTRAP_PASSWORD requires plaintext passwords in environment variables which is just bad practice and some environments may require users to be able to set their password without admins knowing it (?).

Closes: #5471

@dominic-r dominic-r added this to the Release 2025.12 milestone Dec 9, 2025
@dominic-r dominic-r self-assigned this Dec 9, 2025
@dominic-r dominic-r requested review from a team as code owners December 9, 2025 01:24
@dominic-r dominic-r added area:frontend Features or issues related to the browser, TypeScript, Node.js, etc area:docs Features or issues related to Docusaurus labels Dec 9, 2025
@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 79b365a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69828a8feaea8900088c85fc
😎 Deploy Preview https://deploy-preview-18686--authentik-storybook.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.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 292cd1d
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/698288bc37141d0008ba03a3
😎 Deploy Preview https://deploy-preview-18686--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.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 292cd1d
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/698288bb7e504300089eddbf
😎 Deploy Preview https://deploy-preview-18686--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
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 96.40523% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.29%. Comparing base (1e35482) to head (9cb094b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/core/api/users.py 72.50% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18686      +/-   ##
==========================================
+ Coverage   93.26%   93.29%   +0.02%     
==========================================
  Files         968      969       +1     
  Lines       53429    53721     +292     
==========================================
+ Hits        49831    50118     +287     
- Misses       3598     3603       +5     
Flag Coverage Δ
conformance 37.86% <6.20%> (-0.19%) ⬇️
e2e 43.83% <6.20%> (-0.22%) ⬇️
integration 22.65% <4.57%> (-0.11%) ⬇️
unit 91.45% <96.40%> (+0.04%) ⬆️
unit-migrate 91.48% <96.40%> (+0.02%) ⬆️

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
Contributor

github-actions bot commented Dec 9, 2025

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-9cb094b381a709c63d954ee9c28bbcdfad6a26b4
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-9cb094b381a709c63d954ee9c28bbcdfad6a26b4

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

@dominic-r dominic-r marked this pull request as draft December 9, 2025 12:11
@rissson rissson changed the title bootstrap: ability to use hashed password core: ability to use hashed password in users API Dec 9, 2025
@rissson rissson changed the title core: ability to use hashed password in users API core: support hashed password in users API Dec 9, 2025
@dominic-r dominic-r marked this pull request as ready for review December 22, 2025 01:37
@dominic-r dominic-r removed the request for review from gergosimonyi December 22, 2025 01:40
@dominic-r dominic-r force-pushed the sdko/hash-password-bootstrap branch from e678a9d to 9f50675 Compare January 14, 2026 23:07
Copy link
Collaborator

@gergosimonyi gergosimonyi left a comment

Choose a reason for hiding this comment

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

Setting password by hash should be possible via the API (as the title of this PR led me to believe), not only in blueprints.

This would enable workflows such as a user giving an admin their hash and logging in with the password that was used to generate that hash.

@dominic-r dominic-r force-pushed the sdko/hash-password-bootstrap branch from 9f50675 to 8ff4983 Compare January 16, 2026 00:09
@dominic-r dominic-r requested a review from a team as a code owner January 16, 2026 00:09
@dominic-r dominic-r changed the title core: support hashed password in users API core: support hashed password in users API + automated install Jan 16, 2026
@dominic-r dominic-r force-pushed the sdko/hash-password-bootstrap branch from aa1b3cd to 292cd1d Compare February 3, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend area:docs Features or issues related to Docusaurus area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Allow passing a password hash instead of a plaintext password when bootstrapping akadmin account

4 participants