Is it possible to create user groups in kratos? an...
# talk-kratos
e
Is it possible to create user groups in kratos? and also have user roles for it? For example i create a group A and add users to it, and add relevant roles to A that is shared by all the users in it. I could not find anything similar to this in documentation, if there is any information please let me know
m
Ory provides another service for that called
keto
that you can use for doing groups/roles and more: https://www.ory.sh/docs/keto/ you can also manage it by yourself with
metadata
attributes on top of each identity using the
public_metadata
or
private_metadata
using the admin Identity API: https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata
e
Awesome i'll have a look at keto. I wanted to restrict the user signup for a specific company depending on the tier, for example if company A is in pro tier, only 4 users from that company can signup (they give the company id while signing up for us to identify which company they belong) and if they are in premium tier they can onboard 8 users. I was thinking how to restrict them. I want to do it via ory, if such thing is possible
m
to my knowledge Kratos does not support a such use case, if you have your own backend then you can implement it fairly easily and just use the admin API for creating the users with your business rules and just block the registration flow from kratos
e
understood! thanks for helping