From 2aa663f876596245f0573c40d62b8e367f307ac5 Mon Sep 17 00:00:00 2001 From: sunys Date: Fri, 10 Mar 2023 11:12:57 +0800 Subject: [PATCH] =?UTF-8?q?perf(=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96):=20?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=A4=9A=E7=94=A8=E6=88=B7=E7=BB=84=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 我是广州人工智能算力中心开发人员,目前使用了华为的私有云HCSO,在对接用户组时遇到多用户组兼容性问题,如下: 如果联邦用户需要在IAM中属于多个用户组,身份转换规则如下所示。 以下示例表示联邦用户在IAM中的用户名称为“remote”的第一个属性值+空格+第二个属性值,即FirstName LastName。所属用户组为“remote”的第三个属性值,即Groups。 ```json [ { "local": [ { "user": { "name": "{0} {1}" } }, { "groups": "{2}" } ], "remote": [ { "type": "FirstName" }, { "type": "LastName" }, { "type": "Groups" } ] } ] ``` 以上的结构无法满足接口调用的数据格式 --- .../com/huaweicloud/sdk/iam/v3/model/RulesLocal.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/iam/src/main/java/com/huaweicloud/sdk/iam/v3/model/RulesLocal.java b/services/iam/src/main/java/com/huaweicloud/sdk/iam/v3/model/RulesLocal.java index a87d0ead64..d49d884899 100755 --- a/services/iam/src/main/java/com/huaweicloud/sdk/iam/v3/model/RulesLocal.java +++ b/services/iam/src/main/java/com/huaweicloud/sdk/iam/v3/model/RulesLocal.java @@ -24,7 +24,7 @@ public class RulesLocal { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "groups") - private RulesLocalGroups groups; + private String groups; public RulesLocal withUser(RulesLocalUser user) { this.user = user; @@ -78,14 +78,14 @@ public void setGroup(RulesLocalGroup group) { this.group = group; } - public RulesLocal withGroups(RulesLocalGroups groups) { + public RulesLocal withGroups(String groups) { this.groups = groups; return this; } - public RulesLocal withGroups(Consumer groupsSetter) { + public RulesLocal withGroups(Consumer groupsSetter) { if (this.groups == null) { - this.groups = new RulesLocalGroups(); + this.groups = new String(); groupsSetter.accept(this.groups); } @@ -96,11 +96,11 @@ public RulesLocal withGroups(Consumer groupsSetter) { * Get groups * @return groups */ - public RulesLocalGroups getGroups() { + public String getGroups() { return groups; } - public void setGroups(RulesLocalGroups groups) { + public void setGroups(String groups) { this.groups = groups; }