本記述例では、次の環境を想定しています。ご使用の環境にあわせて変更してください。
リポジトリ作成時の公開ディレクトリを“ou=interstage,o=fujitsu,dc=com”としています。
ロール情報の場所を“ou=Role,ou=SSO ACI,ou=interstage,o=fujitsu,dc=com”としています。
roleNameには、ロール名をjava.lang.Stringで指定してください。
ctxは、共通の前処理で得られた結果を使用します。
【前処理】 : Attributes attrs = new BasicAttributes(); Attribute objectClass = new BasicAttribute("objectClass");
objectClass.add("top");
objectClass.add("ssoRole");
attrs.put(objectClass);
attrs.put("cn", roleName);
String dn = "cn=" + roleName + ",ou=Role,ou=SSO ACI,ou=interstage,o=fujitsu,dc=com";
ctx.createSubcontext(dn, attrs);
: 【後処理】 |