aaa: enforce per-list authorization for private lists (fail closed) - #331
Open
zeroscience wants to merge 1 commit into
Open
aaa: enforce per-list authorization for private lists (fail closed)#331zeroscience wants to merge 1 commit into
zeroscience wants to merge 1 commit into
Conversation
sebbASF
requested changes
Aug 28, 2026
| # authorized for. Anything else fails closed. | ||
| if not (session.credentials and session.credentials.authoritative): | ||
| return False | ||
| if not listid: |
Contributor
There was a problem hiding this comment.
This check should be first, as it is cheaper.
Though I wonder if listid should be optional here.
| owner/moderator/subscriber roster, or an explicit config ACL). Until a | ||
| membership model exists, only globally-configured admins are granted, and | ||
| everyone else is denied. Never grant a private list to every authoritative | ||
| user again. |
Contributor
There was a problem hiding this comment.
The last sentence (Never … again) does not belong in the code.
| """ | ||
| user = getattr(session.credentials, "email", None) or getattr( | ||
| session.credentials, "uid", None | ||
| ) |
Contributor
There was a problem hiding this comment.
The above check - and the rest of the code - makes assumptions about the permission scheme, and may not be appropriate in all cases.
It should be up to the installer to provide the necessary code
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Makes
authoritativenecessary but not sufficient incan_access_list(), adds a per-list authorization hook, and fails closed - so a single login can no longer read every private list. Reported first via security@apache.org and raised here at the PMC's request; see #330. Happy to iterate on where the per-list membership source should come from.Refs #330