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

fix(ldap): add missing www-authenticate headers #11820

Merged

Conversation

nowNick
Copy link
Contributor

@nowNick nowNick commented Oct 23, 2023

Summary

When kong returns 401 Unauthorized response it should return WWW-Authenticate header with proper challenge. Ldap auth was missing this header on some responses.

Related PRs:

RFCs & Materials

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • N/A There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Full changelog

  • add WWW-Authenticate header to all ldap 401 response

Issue reference

@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch from 6b5f7fb to fd80cff Compare May 8, 2024 16:05
@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label May 8, 2024
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch from fd80cff to f5d4335 Compare May 8, 2024 16:48
@pull-request-size pull-request-size bot added size/L and removed size/M labels May 8, 2024
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch from f5d4335 to a8c28ff Compare May 9, 2024 09:36
@nowNick nowNick marked this pull request as ready for review May 9, 2024 09:53
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch 2 times, most recently from 2cba1f0 to 89c912e Compare May 9, 2024 12:54
@nowNick nowNick requested a review from hanshuebner May 14, 2024 07:26
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch from 89c912e to 678b603 Compare May 21, 2024 16:17
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch 2 times, most recently from 7bd0f83 to cd60cae Compare May 21, 2024 16:30
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch 2 times, most recently from 754bcd3 to 2b25048 Compare June 14, 2024 11:47
When server returns 401 Unauthorized response it should
return WWW-Authenticate header as well with proper challenge.
Not all ldap-auth 401 responses had this header.

Fix: #7772
KAG-321
@nowNick nowNick force-pushed the feat/implement-missing-www-authenticate-headers-ldap branch from 2b25048 to b399410 Compare June 14, 2024 12:45
@hanshuebner hanshuebner merged commit 7585007 into master Jun 14, 2024
27 checks passed
@hanshuebner hanshuebner deleted the feat/implement-missing-www-authenticate-headers-ldap branch June 14, 2024 13:08
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-11820-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-11820-to-master-to-upstream
git checkout -b cherry-pick-11820-to-master-to-upstream
ancref=$(git merge-base 50f5a37a41325f92a367f25bcdf6cd58fd399960 b399410e16ea478daa57f076de18b9f2a92e7cdb)
git cherry-pick -x $ancref..b399410e16ea478daa57f076de18b9f2a92e7cdb

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Jun 14, 2024
@nowNick nowNick removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WWW-Authenticate header not present when Kong and plugins return HTTP status 401
4 participants