Skip to content

Commit

Permalink
test/suites: Check that a restricted client certificate cannot view s…
Browse files Browse the repository at this point in the history
…erver configuration.

Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Dec 4, 2024
1 parent cb1a3e0 commit a175679
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit a175679

Please sign in to comment.