8000 5 enable surrogate authentication in different ldap tree from principal by rbonatuvic · Pull Request #6846 · apereo/cas · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

5 enable surrogate authentication in different ldap tree from principal #6846

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rbonatuvic
Copy link
Contributor
@rbonatuvic rbonatuvic commented May 7, 2025

Please make sure you include the following:

  • Brief description of changes applied
  • Test cases for all modified changes, where applicable
  • [na] The same pull request targeted at the master branch, if applicable
  • [na] Any documentation on how to configure, test
  • [none] Any possible limitations, side effects, etc
  • [na] Reference any other pull requests that might be related
master: https://github.com/apereo/cas/pull/6846
8000

This change enables surrogate (impersonation) authentication where the principal and surrogate exist in different ldap search trees. It leverages the existing configuration array notation for surrogate.ldap search; that is, end user documentation and configuration remain as is.
This change was accomplished by separating the search for the principal and surrogate (i.e. two loops instead of one).
Functional test run: https://github.com/rbonatuvic/cas/actions/runs/14874450106
Unit test run: https://github.com/rbonatuvic/cas/actions/runs/14873390499

Copy link
gitguardian bot commented May 7, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@mmoayyed
Copy link
Member
mmoayyed commented May 8, 2025

Thank you @rbonatuvic. There are a few style violations. Can you please review those?

@rbonatuvic rbonatuvic force-pushed the 5-enable-surrogate-authentication-in-different-ldap-tree-from-principal branch from e5c1afc to 985d578 Compare May 8, 2025 19:09
@rbonatuvic
Copy link
Contributor Author

Code style updates have been committed.

@apereo apereo deleted a comment from mmoayyed May 9, 2025
@apereocas-bot apereocas-bot added CI and removed CI labels May 9, 2025
@mmoayyed
Copy link
Member
mmoayyed commented May 9, 2025

One point to raise here is that in the event that the principal and surrogate exist in the same ldap search trees, this will incur a performance cost, right?

@mmoayyed
Copy link
Member
mmoayyed commented May 9, 2025

In other words, assuming the performance cost is something of a concern, one possible idea would be to search the immediate connection factory first, and if that fails, then look at everything else (and exclude the one that was just searched).

@rbonatuvic
Copy link
Contributor Author

When I get 7.2 deployed (later this month), I will get back to performing load tests.
I will add this scenario.

@mmoayyed
Copy link
Member

Sounds good, thank you. Let's keep this WIP until then.

@mmoayyed mmoayyed marked this pull request as draft May 10, 2025 03:01
@mmoayyed mmoayyed modified the milestones: 7.3.0-RC2, 7.3.0-RC3 May 31, 2025
@mmoayyed mmoayyed modified the milestones: 7.3.0-RC3, 7.3.0-RC4 Jun 27, 2025
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.

3 participants
0