Fix the filebucket read authorization test - #556
Open
silug wants to merge 1 commit into
Open
Conversation
The filebucket check in default_rules.rb asserted that an authenticated
request is refused a read, but curl_authenticated uses the primary's own
certificate, and that certificate carries the pp_cli_auth extension so
that the primary's CLI tooling can reach administrative endpoints:
1.3.6.1.4.1.34380.1.3.39:
..true
The auth.conf rule gates reads on exactly that extension, so the request
is allowed by design and the assertion could never pass. It failed on
every platform.
Assert instead that the primary's certificate is allowed through to the
endpoint, and generate an agent certificate, which does not carry the
extension, to cover the case the rule is meant to refuse. Also check that
the agent certificate may still issue 'head', so that the store path
stays open to agents while reads are restricted.
Verified against openvox-server 9.0.0~beta4 on el9:
primary cert HEAD -> 404 agent cert HEAD -> 404
primary cert GET -> 404 agent cert GET -> 403
no client cert GET -> 403
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
Draft
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.
Pull Request (PR) description
The filebucket check in default_rules.rb asserted that an authenticated request is refused a read, but curl_authenticated uses the primary's own certificate, and that certificate carries the pp_cli_auth extension so that the primary's CLI tooling can reach administrative endpoints:
The auth.conf rule gates reads on exactly that extension, so the request is allowed by design and the assertion could never pass. It failed on every platform.
Assert instead that the primary's certificate is allowed through to the endpoint, and generate an agent certificate, which does not carry the extension, to cover the case the rule is meant to refuse. Also check that the agent certificate may still issue 'head', so that the store path stays open to agents while reads are restricted.
Verified against openvox-server 9.0.0~beta4 on el9:
Generated by Claude Code
This Pull Request (PR) fixes the following issues
N/A