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

ziti edge update service-policy to empty/no posture checks fails #785

Closed
dovholuknf opened this issue Jul 8, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@dovholuknf
Copy link
Member

dovholuknf commented Jul 8, 2022

Issue:

ziti edge create service-policy test Dial -p "#test" --output-request-json

see the posture check role:

ziti edge list service-policies 'name contains "test"'
╭────────────┬──────┬──────────┬───────────────┬────────────────┬─────────────────────╮
│ ID         │ NAME │ SEMANTIC │ SERVICE ROLES │ IDENTITY ROLES │ POSTURE CHECK ROLES │
├────────────┼──────┼──────────┼───────────────┼────────────────┼─────────────────────┤
│ .iOx0fOlV1 │ test │ AllOf    │               │                │ #test               │
╰────────────┴──────┴──────────┴───────────────┴────────────────┴─────────────────────╯

issue and see postureCheckRoles: null:

ziti edge update service-policy test -p "" --output-request-json
PATCH to https://__controller__:18441/edge/management/v1//service-policies/.iOx0fOlV1
{
    "postureCheckRoles": null
}

get the token and issue curl, replacing null with []:

curl -k -X PATCH -H "Content-Type:application/json" -H "zt-session:42297671-7190-4023-ae6f-15c8a8f1a999" https://ec2-18-188-201-183.us-east-2.compute.amazonaws.com:18441/edge/management/v1/service-policies/.iOx0fOlV1 -d '{"postureCheckRoles": []}'
{"data":{},"meta":{}}

now check and posture checks are gone from the policy:

ziti edge list service-policies 'name contains "test"'
╭────────────┬──────┬──────────┬───────────────┬────────────────┬─────────────────────╮
│ ID         │ NAME │ SEMANTIC │ SERVICE ROLES │ IDENTITY ROLES │ POSTURE CHECK ROLES │
├────────────┼──────┼──────────┼───────────────┼────────────────┼─────────────────────┤
│ .iOx0fOlV1 │ test │ AllOf    │               │                │                     │
╰────────────┴──────┴──────────┴───────────────┴────────────────┴─────────────────────╯
@dovholuknf dovholuknf added the bug Something isn't working label Jul 8, 2022
plorenz added a commit that referenced this issue Jul 10, 2024
Also includes removal of an unused method
plorenz added a commit that referenced this issue Jul 10, 2024
Also includes removal of an unused method
plorenz added a commit that referenced this issue Jul 10, 2024
Also includes removal of an unused method
plorenz added a commit that referenced this issue Jul 11, 2024
Fix set of empty roles from CLI. Fixes #785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants