zitadel / zitadel-go

ZITADEL Go - The official client library of ZITADEL for an easy integration into your Go project.
https://zitadel.com
Apache License 2.0
74 stars 30 forks source link

Added more v2beta endpoints #255

Closed kalebscholes closed 1 year ago

kalebscholes commented 1 year ago

Definition of Ready

kalebscholes commented 1 year ago

I'm having an issue testing the user endpoints because I keep getting the following error: rpc error: code = PermissionDenied desc = No matching permissions found (AUTH-AWfge)

Any ideas on which permission I may be missing?

hifabienne commented 1 year ago

@kalebscholes Can you give an example on which endpoints you have that problem? I am not sure, but I think on some endpoints the requesting user has to be the manipulated user, as its things that only the users theirself can do. E.g verifying passkey @stebenz @muhlemmer I that correct?

muhlemmer commented 1 year ago

For most user/v2beta calls user.write permission would work or the user itself.

user.write permission is currently set in defaults.yaml to the following Roles:

In a typical use case, one would set up a service user in an organization and give him ORG_OWNER or ORG_USER_MANAGER permissions on that organization. You can do this in the console.

A user is also allowed to change its own details. For this you need a session token from the session/v2beta API. Some endpoints, like the u2f config are only allowed by the user itself, because it wouldn't make sense for an API user to have access to the relevant hardware key.

If you have any more questions, I would recommend joining our discord at https://zitadel.com/chat. A PR is not the correct place to have this kind of discussion.