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: don't update internal service accounts unless needed #7611

Merged
merged 5 commits into from Nov 18, 2023

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented Nov 17, 2023

Details

Since #7597 the event log gets spammed by Model Updated events, mostly due to the /api/v3/outposts/instances/ endpoint triggering at least one user update.

With this we use some better logic to only update the user when needed, and also further prevent any updates to internal service accounts


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)

@BeryJu BeryJu requested review from a team as code owners November 17, 2023 23:35
Copy link

netlify bot commented Nov 17, 2023

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 3ff282e
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/6557fcb546850e0008e7142b
😎 Deploy Preview https://deploy-preview-7611--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.

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
…uired

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (aecd4b5) 92.61% compared to head (3ff282e) 92.60%.

Files Patch % Lines
authentik/core/api/users.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7611      +/-   ##
==========================================
- Coverage   92.61%   92.60%   -0.01%     
==========================================
  Files         587      587              
  Lines       29046    29057      +11     
==========================================
+ Hits        26900    26909       +9     
- Misses       2146     2148       +2     
Flag Coverage Δ
e2e 50.83% <81.25%> (-0.08%) ⬇️
integration 25.99% <75.00%> (+0.01%) ⬆️
unit 89.67% <93.75%> (+<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.

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu merged commit 98a07cd into main Nov 18, 2023
63 checks passed
@BeryJu BeryJu deleted the events/stop-spam branch November 18, 2023 00:46
@BeryJu BeryJu changed the title events: stop spam events: don't update internal service accounts unless needed Nov 20, 2023
@BeryJu
Copy link
Member Author

BeryJu commented Nov 20, 2023

/cherry-pick version-2023.10

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Nov 20, 2023
* events: don't log updates to internal service accounts

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* dont log reputation updates

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* don't actually ignore things, stop updating outpost user when not required

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* prevent updating internal service account users

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix setattr call

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
kensternberg-authentik added a commit that referenced this pull request Nov 20, 2023
* main: (125 commits)
  sources/ldap: clean-up certs written from db (#7617)
  web: bump the eslint group in /tests/wdio with 1 update (#7635)
  core: compile backend translations (#7637)
  core: bump psycopg from 3.1.12 to 3.1.13 (#7625)
  core: bump ruff from 0.1.5 to 0.1.6 (#7626)
  core: bump twilio from 8.10.1 to 8.10.2 (#7627)
  web: bump the eslint group in /web with 1 update (#7629)
  web: bump the esbuild group in /web with 2 updates (#7630)
  web: bump rollup from 4.4.1 to 4.5.0 in /web (#7631)
  web: bump core-js from 3.33.2 to 3.33.3 in /web (#7633)
  core: bump goauthentik.io/api/v3 from 3.2023103.3 to 3.2023103.4 (#7634)
  web: bump the wdio group in /tests/wdio with 4 updates (#7636)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_TW (#7628)
  root: specify node and python versions in respective config files, deduplicate in CI (#7620)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7619)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7618)
  tests: better per-test timeouts (#7612)
  web: bump API Client version (#7613)
  stages/identification: add option to pretend user exists (#7610)
  events: stop spam (#7611)
  ...
kensternberg-authentik added a commit that referenced this pull request Nov 20, 2023
* main: (157 commits)
  sources/ldap: clean-up certs written from db (#7617)
  web: bump the eslint group in /tests/wdio with 1 update (#7635)
  core: compile backend translations (#7637)
  core: bump psycopg from 3.1.12 to 3.1.13 (#7625)
  core: bump ruff from 0.1.5 to 0.1.6 (#7626)
  core: bump twilio from 8.10.1 to 8.10.2 (#7627)
  web: bump the eslint group in /web with 1 update (#7629)
  web: bump the esbuild group in /web with 2 updates (#7630)
  web: bump rollup from 4.4.1 to 4.5.0 in /web (#7631)
  web: bump core-js from 3.33.2 to 3.33.3 in /web (#7633)
  core: bump goauthentik.io/api/v3 from 3.2023103.3 to 3.2023103.4 (#7634)
  web: bump the wdio group in /tests/wdio with 4 updates (#7636)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_TW (#7628)
  root: specify node and python versions in respective config files, deduplicate in CI (#7620)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7619)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7618)
  tests: better per-test timeouts (#7612)
  web: bump API Client version (#7613)
  stages/identification: add option to pretend user exists (#7610)
  events: stop spam (#7611)
  ...
kensternberg-authentik added a commit that referenced this pull request Nov 21, 2023
* main: (63 commits)
  sources/ldap: clean-up certs written from db (#7617)
  web: bump the eslint group in /tests/wdio with 1 update (#7635)
  core: compile backend translations (#7637)
  core: bump psycopg from 3.1.12 to 3.1.13 (#7625)
  core: bump ruff from 0.1.5 to 0.1.6 (#7626)
  core: bump twilio from 8.10.1 to 8.10.2 (#7627)
  web: bump the eslint group in /web with 1 update (#7629)
  web: bump the esbuild group in /web with 2 updates (#7630)
  web: bump rollup from 4.4.1 to 4.5.0 in /web (#7631)
  web: bump core-js from 3.33.2 to 3.33.3 in /web (#7633)
  core: bump goauthentik.io/api/v3 from 3.2023103.3 to 3.2023103.4 (#7634)
  web: bump the wdio group in /tests/wdio with 4 updates (#7636)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_TW (#7628)
  root: specify node and python versions in respective config files, deduplicate in CI (#7620)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7619)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7618)
  tests: better per-test timeouts (#7612)
  web: bump API Client version (#7613)
  stages/identification: add option to pretend user exists (#7610)
  events: stop spam (#7611)
  ...
globin pushed a commit to mayflower/authentik that referenced this pull request Nov 22, 2023
…pick goauthentik#7611) (goauthentik#7640)

events: stop spam (goauthentik#7611)

* events: don't log updates to internal service accounts



* dont log reputation updates



* don't actually ignore things, stop updating outpost user when not required



* prevent updating internal service account users



* fix setattr call



---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L <jens@goauthentik.io>
kensternberg-authentik added a commit that referenced this pull request Nov 27, 2023
* dev: (21 commits)
  sources/ldap: clean-up certs written from db (#7617)
  web: bump the eslint group in /tests/wdio with 1 update (#7635)
  core: compile backend translations (#7637)
  core: bump psycopg from 3.1.12 to 3.1.13 (#7625)
  core: bump ruff from 0.1.5 to 0.1.6 (#7626)
  core: bump twilio from 8.10.1 to 8.10.2 (#7627)
  web: bump the eslint group in /web with 1 update (#7629)
  web: bump the esbuild group in /web with 2 updates (#7630)
  web: bump rollup from 4.4.1 to 4.5.0 in /web (#7631)
  web: bump core-js from 3.33.2 to 3.33.3 in /web (#7633)
  core: bump goauthentik.io/api/v3 from 3.2023103.3 to 3.2023103.4 (#7634)
  web: bump the wdio group in /tests/wdio with 4 updates (#7636)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_TW (#7628)
  root: specify node and python versions in respective config files, deduplicate in CI (#7620)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7619)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7618)
  tests: better per-test timeouts (#7612)
  web: bump API Client version (#7613)
  stages/identification: add option to pretend user exists (#7610)
  events: stop spam (#7611)
  ...
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.

None yet

1 participant