I want to use the AWS IAM type policy and use casbin for authentication. How to convert the AWS IAM policy into a casbin policy ? Is there a sdk that can be used for conversion? The iam policy like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::mybucket/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "192.168.1.0/24"
}
}
},
{
"Effect": "Deny",
"Action": [
"s3:*"
],
"Resource": "arn:aws:s3:::mybucket/secret/*"
}
]
}