Skip to content

refactor(plugins/ldap-auth): optimize the process of parsing and handling authentication headers #11780

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

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

sabertobihwy
Copy link
Contributor

@sabertobihwy sabertobihwy commented Oct 18, 2023

Summary

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
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Full changelog

  • use the ngx.re.find and ngx.re.match functions for more robust and efficient string matching operations.
  • adds error handling and logging for potential errors during authentication header parsing and credential decoding.
  • tweak the handling position for the case where proxy_authorization_value does not exist.

Issue reference

Fix FTI-5329

@sabertobihwy sabertobihwy force-pushed the FTI-5329 branch 2 times, most recently from d04dedd to 385e731 Compare October 18, 2023 04:12
@sabertobihwy sabertobihwy changed the title chore(plugins/ldap-auth): optimize the process of parsing and handling authentication headers refactor(plugins/ldap-auth): optimize the process of parsing and handling authentication headers Oct 18, 2023
@sabertobihwy sabertobihwy marked this pull request as ready for review October 18, 2023 08:11
@sabertobihwy sabertobihwy requested review from ms2008 and oowl October 18, 2023 09:39
Copy link
Member

@oowl oowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me!

…ling

authentication headers

1. use the `ngx.re.find` and `ngx.re.match` functions for more robust and
efficient string matching operations.
2. adds error handling and logging for potential errors during authentication
header parsing and credential decoding.
3. tweak the handling position for the case where `proxy_authorization_value`
does not exist.

Fix: [FTI-5329](https://konghq.atlassian.net/browse/FTI-5329)
Signed-off-by: sabertobihwy <[email protected]>
@team-eng-enablement team-eng-enablement added the author/community PRs from the open-source community (not Kong Inc) label Oct 19, 2023
@CLAassistant
Copy link

CLAassistant commented Oct 20, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant

This comment was marked as duplicate.

@windmgc windmgc merged commit 6ce55c4 into Kong:master Oct 23, 2023
@AndyZhang0707 AndyZhang0707 added this to the 3.5.0 milestone Oct 30, 2023
team-gateway-bot pushed a commit that referenced this pull request Oct 30, 2023
…ling authentication headers (#11780)

* refactor(plugins/ldap-auth): optimize the process of parsing and handling
authentication headers

1. use the `ngx.re.find` and `ngx.re.match` functions for more robust and
efficient string matching operations.
2. adds error handling and logging for potential errors during authentication
header parsing and credential decoding.
3. tweak the handling position for the case where `proxy_authorization_value`
does not exist.

Fix: [FTI-5329](https://konghq.atlassian.net/browse/FTI-5329)
Signed-off-by: sabertobihwy <[email protected]>

* update by comments

---------

Signed-off-by: sabertobihwy <[email protected]>
Co-authored-by: tzssangglass <[email protected]>
(cherry picked from commit 6ce55c4)
AndyZhang0707 pushed a commit that referenced this pull request Oct 30, 2023
…ling authentication headers (#11780) (#11887)

* refactor(plugins/ldap-auth): optimize the process of parsing and handling
authentication headers

1. use the `ngx.re.find` and `ngx.re.match` functions for more robust and
efficient string matching operations.
2. adds error handling and logging for potential errors during authentication
header parsing and credential decoding.
3. tweak the handling position for the case where `proxy_authorization_value`
does not exist.

Fix: [FTI-5329](https://konghq.atlassian.net/browse/FTI-5329)
Signed-off-by: sabertobihwy <[email protected]>

* update by comments

---------

Signed-off-by: sabertobihwy <[email protected]>
Co-authored-by: tzssangglass <[email protected]>
(cherry picked from commit 6ce55c4)

Co-authored-by: Kurt Tu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author/community PRs from the open-source community (not Kong Inc) plugins/ldap-auth size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants