ory / ladon

A SDK for access control policies: authorization for the microservice and IoT age. Inspired by AWS IAM policies. Written for Go.

Home Page:https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=ladon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `Name` field for Policy struct

Wang-Kai opened this issue · comments

commented

I'd like to build a IAM system using ory/ladon, but i meet some questions while writing code.

  • The ladon is inspired by AWS IAM policies, so do you think it is suitable to add Name field to Policy struct? In AWS IAM, the Name field is required while add a policy.

  • I has no idea that how to get the set of policies for different accounts, and i can't find a situation to use GetAll method. Do i need to save relationship of policies and users in DB ?

The ladon is inspired by AWS IAM policies, so do you think it is suitable to add Name field to Policy struct? In AWS IAM, the Name field is required while add a policy.

Up to you, you have to write your own storage method anyways so you can also add any fields you like. Metadata is not part of this library itself but of your use of it.

I has no idea that how to get the set of policies for different accounts, and i can't find a situation to use GetAll method. Do i need to save relationship of policies and users in DB ?

I can't help with conceptual questions or questions that related directly to your use case. You can try your luck in the chat though!

commented

Thanks so much for your answer. It is helpful to me to rethink my IAM system .