Skip to content
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

test/suites: Check that a restricted client certificate cannot view server configuration #14580

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/suites/tls_restrictions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ test_tls_restrictions() {
# Apply restrictions
lxc config trust show "${FINGERPRINT}" | sed -e "s/restricted: false/restricted: true/" | lxc config trust edit "${FINGERPRINT}"

# Confirm client with restricted certificate cannot see server configuration.
lxc config set user.foo bar
[ "$(lxc_remote query localhost:/1.0 | jq '.config | length')" = 0 ]
[ "$(lxc_remote query localhost:/1.0 | jq -r '.config."user.foo"')" = "null" ]
lxc config unset user.foo

# Confirm no project visible when none listed
[ "$(lxc_remote project list localhost: --format csv | wc -l)" = 0 ]

Expand Down
Loading