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

sources/ldap: fix duplicate bind when authenticating user directly to… #5927

Merged
merged 1 commit into from Jun 12, 2023

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented Jun 11, 2023

… LDAP source

Details

closes #5920

Ensure we don't double bind to LDAP when authenticating user, add test to prevent regression

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)

… LDAP source

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu requested a review from a team as a code owner June 11, 2023 21:32
@netlify
Copy link

netlify bot commented Jun 11, 2023

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 31d811f
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/64863d5e01d29c0008cd2ca7

@codecov
Copy link

codecov bot commented Jun 11, 2023

Codecov Report

Patch coverage: 94.74% and project coverage change: +0.18 🎉

Comparison is base (ee33e2a) 92.42% compared to head (31d811f) 92.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5927      +/-   ##
==========================================
+ Coverage   92.42%   92.59%   +0.18%     
==========================================
  Files         549      549              
  Lines       26340    26355      +15     
==========================================
+ Hits        24343    24402      +59     
+ Misses       1997     1953      -44     
Flag Coverage Δ
e2e 51.94% <21.06%> (+0.84%) ⬆️
integration 26.46% <0.00%> (-0.01%) ⬇️
unit 89.42% <78.95%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
authentik/sources/ldap/models.py 84.62% <75.00%> (+19.45%) ⬆️
authentik/sources/ldap/auth.py 75.56% <100.00%> (+10.34%) ⬆️
authentik/sources/ldap/tests/test_auth.py 100.00% <100.00%> (ø)

... and 9 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-sources-ldap-fix-double-bind-1686519802-31d811f
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-sources-ldap-fix-double-bind-1686519802-31d811f-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-sources-ldap-fix-double-bind-1686519802-31d811f

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-sources-ldap-fix-double-bind-1686519802-31d811f-arm64

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

@BeryJu BeryJu merged commit 4741d8a into main Jun 12, 2023
62 checks passed
@BeryJu BeryJu deleted the sources/ldap/fix-double-bind branch June 12, 2023 08:24
kensternberg-authentik added a commit that referenced this pull request Jun 12, 2023
* main: (23 commits)
  web: bump API Client version (#5935)
  sources/ldap: add support for cert based auth (#5850)
  ci: replace status with state for auto-deployment
  ci: don't write CI status to file
  ci: add workflow to automatically update next branch (#5921)
  providers/ldap: fix Outpost provider listing excluding backchannel providers (#5933)
  root: revert to use secret_key for JWT signing (#5934)
  sources/ldap: fix duplicate bind when authenticating user directly to… (#5927)
  web: bump core-js from 3.30.2 to 3.31.0 in /web (#5928)
  core: bump pytest from 7.3.1 to 7.3.2 (#5929)
  web: bump @rollup/plugin-commonjs from 25.0.0 to 25.0.1 in /web (#5931)
  web: bump @formatjs/intl-listformat from 7.3.0 to 7.4.0 in /web (#5932)
  core: bump github.com/go-ldap/ldap/v3 from 3.4.4 to 3.4.5 (#5930)
  website/integrations: Fix header in dokuwiki instructions (#5926)
  providers/oauth2: launch url: if URL parsing fails, return no launch URL (#5918)
  web: bump @babel/core from 7.22.1 to 7.22.5 in /web (#5909)
  web: bump @babel/plugin-proposal-decorators from 7.22.3 to 7.22.5 in /web (#5910)
  web: bump @babel/preset-typescript from 7.21.5 to 7.22.5 in /web (#5912)
  web: bump @babel/preset-env from 7.22.4 to 7.22.5 in /web (#5915)
  core: bump requests-mock from 1.10.0 to 1.11.0 (#5911)
  ...
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.

LDAP Source Bind from Federation & Social login is Broken Since Commit 1ca8feb
1 participant