Skip to content

stages/authenticator_static: make static token size adjustable#6565

Merged
BeryJu merged 1 commit intomainfrom
stages/authenticator_static/increase-static-token-size
Aug 17, 2023
Merged

stages/authenticator_static: make static token size adjustable#6565
BeryJu merged 1 commit intomainfrom
stages/authenticator_static/increase-static-token-size

Conversation

@BeryJu
Copy link
Member

@BeryJu BeryJu commented Aug 17, 2023

Details

Currently tokens generated by the authenticator_static stage are always 6 characters long and the length is not configurable. While 6 characters is pretty high on the convenience score for end users, it should be configurable to be more secure


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)
  • The translation files have been updated (make i18n-extract)

If applicable

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

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu requested a review from a team as a code owner August 17, 2023 17:39
@BeryJu BeryJu requested review from smusali and removed request for a team August 17, 2023 17:39
@netlify
Copy link

netlify bot commented Aug 17, 2023

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 20f1e82
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/64de5b6576a4410008d8bcf4
😎 Deploy Preview https://deploy-preview-6565--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.

@github-actions
Copy link
Contributor

authentik translations instructions

Thanks for your pull request!

authentik translations are handled using Transifex. Please edit translations over there and they'll be included automatically.

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.16% 🎉

Comparison is base (05fb15e) 92.33% compared to head (20f1e82) 92.48%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6565      +/-   ##
==========================================
+ Coverage   92.33%   92.48%   +0.16%     
==========================================
  Files         561      561              
  Lines       27081    27082       +1     
==========================================
+ Hits        25002    25045      +43     
+ Misses       2079     2037      -42     
Flag Coverage Δ
e2e 51.71% <100.00%> (+0.92%) ⬆️
integration 26.57% <60.00%> (+0.01%) ⬆️
unit 89.27% <80.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
authentik/stages/authenticator_static/api.py 100.00% <100.00%> (ø)
authentik/stages/authenticator_static/models.py 100.00% <100.00%> (ø)
authentik/stages/authenticator_static/stage.py 95.24% <100.00%> (+0.12%) ⬆️

... and 8 files with indirect coverage changes

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

@github-actions
Copy link
Contributor

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-stages-authenticator_static-increase-static-token-size-1692295026-20f1e82
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

For arm64, use these values:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-stages-authenticator_static-increase-static-token-size-1692295026-20f1e82-arm64
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
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-stages-authenticator_static-increase-static-token-size-1692295026-20f1e82

For arm64, use these values:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-stages-authenticator_static-increase-static-token-size-1692295026-20f1e82-arm64

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

@BeryJu BeryJu merged commit 7b3d1a2 into main Aug 17, 2023
@BeryJu BeryJu deleted the stages/authenticator_static/increase-static-token-size branch August 17, 2023 21:48
kensternberg-authentik added a commit that referenced this pull request Aug 21, 2023
* main: (70 commits)
  core: hotfix group membership check (#6584)
  web: bump core-js from 3.32.0 to 3.32.1 in /web (#6581)
  web: bump tslib from 2.6.1 to 2.6.2 in /web (#6583)
  web: bump the storybook group in /web with 5 updates (#6580)
  web/flows: update flow background (#6579)
  translate: Updates for file web/xliff/en.xlf in zh_CN on branch main (#6575)
  core: rework recursive group membership (#6017)
  core: bump goauthentik.io/api/v3 from 3.2023061.11 to 3.2023061.12 (#6572)
  core: bump ruff from 0.0.284 to 0.0.285 (#6570)
  ci: bump actions/setup-node from 3.8.0 to 3.8.1
  blueprints: fix blueprint importer logging potentially sensitive data (#6567)
  web: bump API Client version (#6568)
  stages/authenticator_static: make static token size adjustable (#6565)
  root: always use persistent database connections (#6560)
  website/blog: identity fun (#6564)
  web: bump the storybook group in /web with 1 update (#6561)
  web: bump @rollup/plugin-node-resolve from 15.1.0 to 15.2.0 in /web (#6562)
  web: bump @lit-labs/task from 3.0.0 to 3.0.1 in /web (#6544)
  web: bump prettier from 3.0.1 to 3.0.2 in /web (#6549)
  web: bump the storybook group in /web with 5 updates (#6559)
  ...
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.

1 participant