Closed qrkourier closed 4 years ago
Need steps to reproduce, please? There's not quite enough information here. Just looking at this it seems correct, kenneth_bingham-laptop already exists. Seems fine
I was attempting to update the role attributes on this identity and sent the same value for the name
field as was already assigned. If I don't send the name
field the error is "name is required".
Before the PATCH
request shown, which attempts to replace current attributes with only sandbox
, the only role attribute on that identity shown in the list from ziti
CLI is defaultRouters
.
Try removing the name. I think in a patch you only send what changed
If I don't send the name field the error is "name is required".
Works with CLI v0.15.1 against the same controller where I observed the error.
❯ ziti edge list identities 'name="kenneth_bingham-laptop"'
id: c2b4dcd4-7295-4932-b293-5af06d2e0c14 name: kenneth_bingham-laptop type: Device role attributes: ["defaultRouters"]
results: 1-1 of 1
❯ ziti edge update identity kenneth_bingham-laptop --role-attributes sandbox
❯ ziti edge list identities 'name="kenneth_bingham-laptop"'
id: c2b4dcd4-7295-4932-b293-5af06d2e0c14 name: kenneth_bingham-laptop type: Device role attributes: ["sandbox"]
Chatted with Paul who tested it on 0.15.1 via the CLI and he reported no issue. I tested it against 0.15.1 via Postman and encountered no issue.
My personal tests were:
I am inclined to close this issue.
The problem was that I was unintentionally renaming the identity to a name that was not unique.
PATCH https://3.211.201.105:443/identities/1b7b2b9c-ea35-49eb-92b9-0371eaaffaf4
responded with status 400 BAD_REQUEST and response body
--