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

providers/scim: default to None for fields instead of empty list #5642

Merged
merged 3 commits into from May 16, 2023

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented May 16, 2023

Details

Currently we default to empty lists for fields without values in the SCIM user mapping (email and photos). With this PR, default to None when no emails or photos are given. In the SCIM provider, none-values are removed from the dict

closes #5640

Changes

New Features

  • Adds feature which does x, y, and z.

Breaking Changes

  • Adds breaking change which causes <issue>.

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 May 16, 2023 20:39
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

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

Comparison is base (5eba598) 92.60% compared to head (58a7e16) 92.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5642      +/-   ##
==========================================
+ Coverage   92.60%   92.64%   +0.04%     
==========================================
  Files         546      546              
  Lines       26188    26188              
==========================================
+ Hits        24250    24260      +10     
+ Misses       1938     1928      -10     
Flag Coverage Δ
e2e 51.95% <71.43%> (+0.09%) ⬆️
integration 26.39% <57.15%> (ø)
unit 89.51% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
authentik/providers/scim/tests/test_membership.py 100.00% <ø> (ø)
authentik/providers/scim/tests/test_user.py 100.00% <ø> (ø)
authentik/core/sources/flow_manager.py 94.24% <100.00%> (ø)
authentik/policies/utils.py 100.00% <100.00%> (ø)
authentik/providers/scim/clients/group.py 68.97% <100.00%> (ø)
authentik/providers/scim/clients/user.py 81.36% <100.00%> (+3.39%) ⬆️
authentik/sources/saml/processors/response.py 79.42% <100.00%> (ø)

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@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-providers-scim-default-none-for-fields-1684274816-58a7e16
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-providers-scim-default-none-for-fields-1684274816-58a7e16-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-providers-scim-default-none-for-fields-1684274816-58a7e16

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-providers-scim-default-none-for-fields-1684274816-58a7e16-arm64

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

@BeryJu BeryJu merged commit f4b0d6e into main May 16, 2023
57 checks passed
@BeryJu BeryJu deleted the providers/scim/default-none-for-fields branch May 16, 2023 22:25
kensternberg-authentik added a commit that referenced this pull request May 17, 2023
* main:
  web: bump API Client version (#5664)
  web: bump @lingui/core from 4.1.0 to 4.1.2 in /web (#5658)
  providers/radius: add warning message when radius provider is not used with outpost (#5656)
  providers/SCIM: improve backchannel signalling (#5657)
  sources/ldap: improve error message (#5653)
  web/admin: fix radius provider page (#5651)
  ci: bump helm/kind-action from 1.5.0 to 1.6.0 (#5646)
  core: bump github.com/sirupsen/logrus from 1.9.0 to 1.9.1 (#5648)
  core: bump goauthentik.io/api/v3 from 3.2023041.12 to 3.2023050.1 (#5647)
  providers/scim: default to None for fields instead of empty list (#5642)
  web/flows: fix authenticator_validate device select not sent to backend (#5638)
  web/flows: update flow background (#5639)
  lib: fix fallback_names migration not working when multiple objects n… (#5637)
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.

AWS SCIM Rejects user when the 'photos' attribute is set.
1 participant