Skip to content

flows: stage_invalid() makes flow restart depending on invalid_response_action setting#6780

Merged
BeryJu merged 2 commits intomainfrom
flows/restart-stage_invalid
Sep 27, 2023
Merged

flows: stage_invalid() makes flow restart depending on invalid_response_action setting#6780
BeryJu merged 2 commits intomainfrom
flows/restart-stage_invalid

Conversation

@BeryJu
Copy link
Member

@BeryJu BeryJu commented Sep 6, 2023

Details

Instead of always stopping the flow as-is when calling executor.stage_invalid(), honour the invalid_response_action setting and restart the flow


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)

…se_action setting

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

netlify bot commented Sep 6, 2023

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 4f506e9
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/651357b518a1f30008f64af4

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (5ea6739) 91.46% compared to head (4f506e9) 92.70%.
Report is 186 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6780      +/-   ##
==========================================
+ Coverage   91.46%   92.70%   +1.24%     
==========================================
  Files         565      567       +2     
  Lines       27769    27965     +196     
==========================================
+ Hits        25397    25923     +526     
+ Misses       2372     2042     -330     
Flag Coverage Δ
e2e 51.12% <100.00%> (+6.31%) ⬆️
integration 26.27% <50.00%> (-0.16%) ⬇️
unit 89.60% <100.00%> (+0.01%) ⬆️

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

Files Coverage Δ
authentik/flows/views/executor.py 82.08% <100.00%> (-0.47%) ⬇️

... and 62 files with indirect coverage changes

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

Copy link
Contributor

@smusali smusali left a comment

Choose a reason for hiding this comment

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

lgtm

@BeryJu BeryJu requested a review from a team as a code owner September 26, 2023 22:00
@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for authentik ready!

Name Link
🔨 Latest commit ef04298
🔍 Latest deploy log https://app.netlify.com/sites/authentik/deploys/65135499d71de6000806701b
😎 Deploy Preview https://deploy-preview-6780--authentik.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 80 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu force-pushed the flows/restart-stage_invalid branch from ef04298 to 4f506e9 Compare September 26, 2023 22:14
@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-flows-restart-stage_invalid-1695807671-4f506e9
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-flows-restart-stage_invalid-1695807671-4f506e9-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-flows-restart-stage_invalid-1695807671-4f506e9

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-flows-restart-stage_invalid-1695807671-4f506e9-arm64

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

@BeryJu BeryJu merged commit b15002a into main Sep 27, 2023
@BeryJu BeryJu deleted the flows/restart-stage_invalid branch September 27, 2023 10:34
kensternberg-authentik added a commit that referenced this pull request Sep 27, 2023
* main: (41 commits)
  root: fix missing /lifecycle in path
  website/blog: add info-block to blog about m2m (#7002)
  root: handle SIGHUP and SIGUSR2, healthcheck gunicorn (#6630)
  flows: stage_invalid() makes flow restart depending on invalid_response_action setting (#6780)
  core: bump psycopg from 3.1.11 to 3.1.12 (#6997)
  core: bump pydantic from 2.4.0 to 2.4.1 (#6998)
  web: bump the sentry group in /web with 2 updates (#6999)
  web: bump pyright from 1.1.328 to 1.1.329 in /web (#7000)
  website/blog: improved sentence (#6995)
  website/blog: fix missing link in m2m post (#6994)
  web/user: fix incorrect link to admin interface (#6993)
  root: disable APPEND_SLASH (#6928)
  root: replace boj/redistore with vendored version of rbcervilla/redisstore (#6988)
  sources/ldap: add default property mapping to mirror directory structure (#6990)
  website/blogs: Blog about m2m (#6974)
  root: make Celery worker concurrency configurable (#6837)
  root: make postgres connection in makefile customizable (#6977)
  core: prevent self-impersonation (#6885)
  web: bump @typescript-eslint/parser from 6.7.2 to 6.7.3 in /web (#6984)
  core: bump pydantic from 2.3.0 to 2.4.0 (#6979)
  ...
kensternberg-authentik added a commit that referenced this pull request Sep 29, 2023
* main: (50 commits)
  web/admin: invitation stage: default "continue without invitation" to false
  core: bump pydantic from 2.4.1 to 2.4.2 (#7014)
  website: bump postcss from 8.4.30 to 8.4.31 in /website (#7015)
  internal: fix redis session store (#7011)
  web: bump rollup from 3.29.3 to 3.29.4 in /web (#7009)
  core: bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#7007)
  web: bump the esbuild group in /web with 2 updates (#7005)
  website: bump react-tooltip from 5.21.4 to 5.21.5 in /website (#7006)
  core: bump github.com/redis/go-redis/v9 from 9.2.0 to 9.2.1 (#7008)
  root: fix missing /lifecycle in path
  website/blog: add info-block to blog about m2m (#7002)
  root: handle SIGHUP and SIGUSR2, healthcheck gunicorn (#6630)
  flows: stage_invalid() makes flow restart depending on invalid_response_action setting (#6780)
  core: bump psycopg from 3.1.11 to 3.1.12 (#6997)
  core: bump pydantic from 2.4.0 to 2.4.1 (#6998)
  web: bump the sentry group in /web with 2 updates (#6999)
  web: bump pyright from 1.1.328 to 1.1.329 in /web (#7000)
  website/blog: improved sentence (#6995)
  website/blog: fix missing link in m2m post (#6994)
  web/user: fix incorrect link to admin interface (#6993)
  ...
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.

2 participants