-
Notifications
You must be signed in to change notification settings - Fork 639
Add -g option for custom group attribute #2395
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
Open
ankor2023
wants to merge
7
commits into
squid-cache:master
Choose a base branch
from
ankor2023:negotiate_kerberos_auth-add-group-annotation-variable-name-option
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
78d14c1
Update negotiate_kerberos.h
ankor2023 92b0049
Add files via upload
ankor2023 f6d7cca
Add files via upload
ankor2023 d8d5231
Add files via upload
ankor2023 94d93ab
Add files via upload
ankor2023 987a6dd
Add files via upload
ankor2023 34375ad
Update negotiate_kerberos_auth.cc
ankor2023 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing
group=g1 group=g2withgroup=g1,g2codifies comma as the delimiter for group values. AFAICT,Helper::Reply::parseResponseKeys()does not treat comma specially today. This raises many red flags, including:parseResponseKeys()treatsgroup=g1,g2annotation as a singlekey=valuepair, adding a singleNotePairs::Entry. Adding two groups via oneEntryviolates the spirit of NotePairs API that uses oneEntryper Squid-perceived annotation value.Helper::Reply::parseResponseKeys()method treats "quoted" values specially. If we codify the special meaning of commas, then that treatment would need to be adjusted to supportgroup=g1,"g2"and similar input.Please note that we should not assume that all helpers or even all connection authentication helpers are going to do exactly what shipped-with-Squid helpers are doing. We should define an interface and supply compliant implementation in Squid. If we change that interface, like this PR may be doing, we must evaluate whether that change may break existing helpers/deployments and whether the benefits of our changes outweigh that breakage (if any). If they do not outweigh, we may need to version helper output format, so that Squid can reject no-longer-compatible helpers.
I am not sure whether authentication code uses stored group values. I suspect that it does not! Please point me to group-using authentication code if that suspicion is wrong.
I know that general code (e.g.,
noteACL) lets an admin determine whether values can be delimited and what that delimiter is. A comma is usually the default for delimited values, but it is not the default that matters here. I believe the changes in this PR will break deployments that use a non-comma delimiter for group values becauseAcl::NoteCheck::matchNotes()callsNotePairs::expandListEntries()and the latter does not treat commas specially. For example, I speculate that, after this PR changes ,acl badGuys note -m: group badwill stop matching requests that belong toactiveandbadgroups because the new helper response --group=active,bad-- is not going to match while the old response --group=active group=bad-- did match.Similarly, I believe the changes in this PR will break deployments that do not use a delimiter for group values. For example, I speculate that
acl badGuys note group badwill stop matching requests that belong toactiveandbadgroups.