-
Notifications
You must be signed in to change notification settings - Fork 933
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/auth: Check that
is_fine_grained
field is present
Signed-off-by: Gabriel Mougard <[email protected]>
- Loading branch information
1 parent
68170b4
commit 7462cae
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,8 @@ test_authorization() { | |
lxc auth identity list --format csv | grep -Fq "tls,Client certificate,test-user,${tls_identity_fingerprint},test-group" | ||
|
||
# Test `lxc auth identity info` | ||
expectedOIDCInfo='authentication_method: oidc | ||
expectedOIDCInfo='entitlements: [] | ||
authentication_method: oidc | ||
type: OIDC client | ||
id: [email protected] | ||
name: '"'"' '"'"' | ||
|
@@ -147,10 +148,13 @@ groups: | |
tls_certificate: "" | ||
effective_groups: | ||
- test-group | ||
effective_permissions: []' | ||
effective_permissions: [] | ||
is_fine_grained: true' | ||
|
||
[ "$(lxc auth identity info oidc:)" = "${expectedOIDCInfo}" ] | ||
|
||
expectedTLSInfo="authentication_method: tls | ||
expectedTLSInfo="entitlements: [] | ||
authentication_method: tls | ||
type: Client certificate | ||
id: ${tls_identity_fingerprint} | ||
name: test-user | ||
|
@@ -160,7 +164,9 @@ tls_certificate: | | |
$(awk '{printf " %s\n", $0}' "${LXD_CONF2}/client.crt") | ||
effective_groups: | ||
- test-group | ||
effective_permissions: []" | ||
effective_permissions: [] | ||
is_fine_grained: true" | ||
|
||
[ "$(LXD_CONF="${LXD_CONF2}" lxc auth identity info tls:)" = "${expectedTLSInfo}" ] | ||
|
||
|
||
|