end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

ldap に登録の OpenAM 設定は、ldapsearch で export できますが、肝心な部分は暗号化

大量にある OpenAMの設定は、 ssoadm コマンドで export できます。

「OpenAMの設定は、ldap に登録されている為、ldapsearch コマンドで export できるのでは?」 と考え、試しに実行しましたが、肝心な部分は暗号化されており、NG でした。

そりゃそうですね。

以下は、試しに ldapsearch した結果の抜粋です。

$ /usr/bin/ldapsearch -x -h localhost -p 50389  \
    -D "cn=Directory Manager" -w ないしょ \
    -b "dc=openam,dc=forgerock,dc=org" \
    "*" | less

# extended LDIF
#
# LDAPv3
# base <dc=openam,dc=forgerock,dc=org> with scope subtree
# filter: (objectclass=*)
# requesting: * 
#

# openam.forgerock.org
dn: dc=openam,dc=forgerock,dc=org
objectClass: top
objectClass: domain
dc: openam

# people, openam.forgerock.org
dn: ou=people,dc=openam,dc=forgerock,dc=org
objectClass: top
objectClass: organizationalUnit
ou: People

<略>

# tokens, openam.forgerock.org
dn: ou=tokens,dc=openam,dc=forgerock,dc=org
objectClass: top
objectClass: organizationalUnit
ou: tokens

# services, openam.forgerock.org
dn: ou=services,dc=openam,dc=forgerock,dc=org
objectClass: top
objectClass: organizationalunit
objectClass: sunServiceComponent
sunKeyValue: sunidentityrepositoryservice-sunOrganizationStatus=Active
ou: services
sunxmlKeyValue: sunidentityrepositoryservice-sunOrganizationAliases=openam
sunxmlKeyValue: sunidentityrepositoryservice-sunOrganizationAliases=test-navi-
 sso13.end0tknr.com

# dashboardService, services, openam.forgerock.org
dn: ou=dashboardService,ou=services,dc=openam,dc=forgerock,dc=org
objectClass: sunService
objectClass: top
ou: dashboardService

# 1.0, dashboardService, services, openam.forgerock.org
dn: ou=1.0,ou=dashboardService,ou=services,dc=openam,dc=forgerock,dc=org
objectClass: sunService
objectClass: top
sunServiceSchema:: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KCjxTZXJ
 2aWNlc0NvbmZpZ3V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