Skip to content

Fix the filebucket read authorization test - #556

Open
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:fix-filebucket-auth-acceptance
Open

Fix the filebucket read authorization test#556
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:fix-filebucket-auth-acceptance

Conversation

@silug

@silug silug commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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:

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

Generated by Claude Code

This Pull Request (PR) fixes the following issues

N/A

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants