IAM政策和角色审计员
probator-auditor-iam的Python项目详细描述
认证审计师IAM
请在Probator存储库中打开问题
说明
该审计师验证并应用AWS账户的IAM政策。
配置选项
Option name | Default Value | Type | Description |
---|---|---|---|
enabled | ^{ | bool | Enable the IAM roles and auditor |
interval | ^{ | int | How often the auditor executes, in minutes |
manage_roles | ^{ | bool | Enable management of IAM roles |
roles | ^{ | string | JSON document with roles to push to accounts. See below for example |
delete_inline_policies | ^{ | bool | Delete inline policies from existing roles |
hostname | None | string | Git server hostname |
repository | None | string | Path of the Git repository |
authentication_type | ^{ | string | Authentication type |
oauth_token | None | string | OAuth2 token. Required if ^{ |
username | None | string | Git username. Required if ^{ |
password | None | string | Git password./Required if ^{ |
max_session_duration | ^{ | string | IAM Assume Role MaxSessionDuration (in hours) |
disable_ssl_verify | ^{ | bool | Disable SSL certificate validation |
roles
配置
roles
设置允许您配置角色,以便在Probator中启用的所有帐户上创建和管理。json文档的结构如下
一个字典,顶级键是角色的名称,字典值有两个键;trust
和policies
trust
trust
设置必须是有效的IAM假定角色策略文档。如果trust
键是空对象({}
)、空或未设置,则默认信任
提供文件。
policies
policies
键包含要附加到角色的IAM策略名称列表。在运行审计师之前,这些政策必须存在于账户内。
最好是由审计人员创建。
示例文档
下面的示例演示如何管理Probator在监视和审核您的帐户时所扮演的角色
{"probator_role":{"trust":{"Version":"2012-10-17","Statement":[{"Sid":"","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:role/probator-instance-role","Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]},"policies":["ProbatorAccess"]}}
本项目基于Riot Games为Cloud Inquisitor所做的工作