Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

policies/password: password uniqueness history #13453

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

melizeche
Copy link
Contributor

@melizeche melizeche commented Mar 10, 2025

Details

Continue work done in #10631
Closes #8307

Steps to test:

  1. Create and setup a new "Password Uniqueness Policy"
  2. Edit default-password-change flow->stage bindings-> edit stage -> default-password-change-prompt and add the policy
image 3. Edit default-user-settings-flow -> Policies -> bind Password Uniqueness Policy image

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

verkaufer and others added 27 commits August 17, 2024 11:05
…ry table

If the UniquePasswordPolicy is enabled anywhere, we now record the user's hashed password.
The system should aim to keep the number of historical passwords to a minimum to avoid wasting storage space.

Admins can configure how many passwords they want to preserve. If multiple instances of the UniquePasswordPolicy exist, the system takes the max() value of all enabled policies to determine how many passwords should remain after trimming.
…ings

Querying within post_delete for other PolicyBindings will include the PolicyBinding we're deleting. We have to account for that by checking for bindings other than the one we're looking at.
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit eeba846
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67d9fd49fe3bf10007f2038c
😎 Deploy Preview https://deploy-preview-13453--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 site configuration.

Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit eeba846
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67d9fd4945bcb20008b90480
😎 Deploy Preview https://deploy-preview-13453--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 site configuration.

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 95.87629% with 12 lines in your changes missing coverage. Please review.

Project coverage is 92.75%. Comparing base (d163afe) to head (eeba846).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/policies/unique_password/tasks.py 81.25% 6 Missing ⚠️
authentik/policies/unique_password/models.py 90.90% 5 Missing ⚠️
authentik/policies/unique_password/signals.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13453      +/-   ##
==========================================
+ Coverage   92.73%   92.75%   +0.02%     
==========================================
  Files         794      803       +9     
  Lines       40430    40714     +284     
==========================================
+ Hits        37491    37764     +273     
- Misses       2939     2950      +11     
Flag Coverage Δ
e2e 48.03% <61.42%> (+0.04%) ⬆️
integration 24.37% <42.85%> (+0.05%) ⬆️
unit 90.54% <95.87%> (+0.03%) ⬆️

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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Mar 10, 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-eeba846a025d26c77512f516f8147faf8f183b6f
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-eeba846a025d26c77512f516f8147faf8f183b6f

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

@BeryJu BeryJu changed the title [WIP]Feature/unique passwords policies/password: password history Mar 12, 2025
@melizeche melizeche marked this pull request as ready for review March 18, 2025 23:44
@melizeche melizeche requested review from a team as code owners March 18, 2025 23:44
@melizeche melizeche changed the title policies/password: password history policies/password: password uniqueness history Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checking the new user password to make sure it is different from the previous ones
2 participants