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

events: add context manager to ignore/modify audit events being written #9181

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented Apr 8, 2024

Details

This is basically just to clean up the events log a bit, by either correctly attributing events during un-authenticated flows or don't write certain events (like webauthn updates)


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)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu requested a review from a team as a code owner April 8, 2024 22:19
Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit 9d5f24f
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/66146d8c3f66f5000819dc90

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 9d5f24f
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/66146d8cc5622a0008883507

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 93.22034% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 92.40%. Comparing base (16b8edd) to head (9d5f24f).

Files Patch % Lines
authentik/events/middleware.py 85.71% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9181      +/-   ##
==========================================
- Coverage   92.40%   92.40%   -0.01%     
==========================================
  Files         646      646              
  Lines       31801    31851      +50     
==========================================
+ Hits        29386    29431      +45     
- Misses       2415     2420       +5     
Flag Coverage Δ
e2e 50.47% <23.72%> (-0.06%) ⬇️
integration 26.35% <15.25%> (+0.12%) ⬆️
unit 89.79% <93.22%> (+<0.01%) ⬆️

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.

Copy link
Contributor

github-actions bot commented Apr 8, 2024

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-ghcr.io/goauthentik/dev-server:gh-9d5f24f6c89c4489dd5e1078a187becaac9ba7f3
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-ghcr.io/goauthentik/dev-server:gh-9d5f24f6c89c4489dd5e1078a187becaac9ba7f3-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-ghcr.io/goauthentik/dev-server:gh-9d5f24f6c89c4489dd5e1078a187becaac9ba7f3

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-ghcr.io/goauthentik/dev-server:gh-9d5f24f6c89c4489dd5e1078a187becaac9ba7f3-arm64

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

@BeryJu BeryJu merged commit 2ec8a44 into main Apr 8, 2024
66 checks passed
@BeryJu BeryJu deleted the events/audit-ignore-context-manager branch April 8, 2024 23:42
kensternberg-authentik added a commit that referenced this pull request Apr 9, 2024
* main:
  web/admin: fix SAML Provider preview (#9192)
  core, web: update translations (#9183)
  web: bump chromedriver from 123.0.1 to 123.0.2 in /tests/wdio (#9188)
  website: bump @types/react from 18.2.74 to 18.2.75 in /website (#9185)
  website/docs: update Postgresql username (#9190)
  core: bump maxmind/geoipupdate from v6.1 to v7.0 (#9186)
  events: add context manager to ignore/modify audit events being written (#9181)
  web: fix application library list display length and capability (#9094)
kensternberg-authentik added a commit that referenced this pull request Apr 9, 2024
* dev:
  web/admin: fix SAML Provider preview (#9192)
  core, web: update translations (#9183)
  web: bump chromedriver from 123.0.1 to 123.0.2 in /tests/wdio (#9188)
  website: bump @types/react from 18.2.74 to 18.2.75 in /website (#9185)
  website/docs: update Postgresql username (#9190)
  core: bump maxmind/geoipupdate from v6.1 to v7.0 (#9186)
  events: add context manager to ignore/modify audit events being written (#9181)
  web: fix application library list display length and capability (#9094)
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