跳到主内容

AWS IAM同步器

AWS IAM 同步器使用 AWS IAM API 将 AWS 账户中的用户和组导入 Casdoor。

配置

Casdoor字段AWS IAM值
主机AWS区域(例如 us-east-1
用户AWS访问密钥ID
密码AWS秘密访问密钥

IAM 凭据必须至少具备以下权限:

  • iam:ListUsers
  • iam:ListUserTags
  • iam:ListGroups

字段映射

IAM 字段Casdoor字段备注
UserIdId稳定唯一标识符
UserNameNameDisplayName
创建日期创建时间
标签 邮箱 / email邮箱
Tag Phone / phonePhone
Tag DisplayName / displayNameDisplayNameOverrides UserName if set
Tag FirstName / firstNameFirstName
Tag LastName / lastNameLastName
Tag Title / titleTitle
Tag Department / departmentAffiliation
Other tagsProperties原样存储

其他用户属性从IAM用户标签中读取。 任何未在上文列出的标签都将存储在用户的Properties映射中。

状态映射

IAM用户默认为激活状态。 要在Casdoor中将用户标记为禁止访问,请在IAM用户上添加以下其中一个标签:

  • Status = Inactive or Disabled
  • Active = false, False, or 0

Group sync

The syncer fetches all IAM groups and creates corresponding Casdoor groups. Group membership sync is a known limitation: the AWS IAM API identifies groups by user name, while Casdoor's syncer interface works with user IDs. As a result, users are imported correctly but are not automatically placed in their IAM groups.

Notes

  • The syncer is read-only. It only pulls data from AWS; it does not create or modify IAM users.
  • All API calls use a 60-second timeout for list operations and a 10-second timeout for per-user tag lookups.
  • Pagination is handled automatically via IAM's marker-based paging, so there is no limit on the number of users.