-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plugins): implement AliCloud RAM plugin #190
Conversation
…187) * feat(plugins,domain): Implement MVP for Alicloud IAM plugin * feat(plugins,domain): Implement MVP for Alicloud IAM plugin patch * feat(plugins,domain): Implement Alicloud IAM plugin to dummy branch patch 2 * feat(plugins,domain): Implement Alicloud IAM plugin to dummy branch patch 3 * feat(plugins,domain): Implement Alicloud IAM plugin to dummy branch patch 4 * feat(plugins,domain): Implement Alicloud IAM plugin to dummy branch patch 5 * feat(plugins,domain): Implement Alicloud IAM plugin to dummy branch patch 6 * feat(plugins,domain): Implement Alicloud IAM plugin to dummy branch patch 7
This occur because AliCloud SDK is using builder pattern when receiving and sending request to their own API. Because of this, we need to create a new client each time we invoking a request.
return nil | ||
} | ||
|
||
type Permission struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the list of permissions are going to be stored in the appeals
, and grants
db, this has to implement .String()
method as well, you can take reference from our existing tableau plugin here
guardian/plugins/providers/tableau/config.go
Lines 66 to 88 in df093f6
type Permission struct { | |
Name string `json:"name" mapstructure:"name" validate:"required"` | |
Type string `json:"type,omitempty" mapstructure:"type"` | |
} | |
func (p Permission) String() string { | |
str := p.Name | |
if p.Type != "" { | |
str += fmt.Sprintf("@%s", p.Type) | |
} | |
return str | |
} | |
func toPermission(s string) (p Permission) { | |
ss := strings.Split(s, "@") | |
if len(ss) > 0 { | |
p.Name = ss[0] | |
} | |
if len(ss) == 2 { | |
p.Type = ss[1] | |
} | |
return | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved: 6bd8fdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi pak @rahmatrhd .. After validating the changes using this method. I think String() is not triggered
// This image is example policy on my local
But when I using my old method it was working fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[TESTED] the String() string
is not triggered. So I will remove this function 🙏
Hi pak @rahmatrhd, I have already done working with the comments, please kindly help to review again. |
Testing
Ram Account
RAM Role
Requirements For Each Provider
Standalone RAM Account
Controller RAM Account
Role That Will Be Assumed by Controller RAM Account
Standard For Each Provider Creation
For Standalone Provider
For CROSS Provider
Example Requests
Create Appeal For RAM Account
Create Appeal For RAM Role