Apache Tomcatエージェントを設定したssoとしてopenam 12 warをインストールしようとしていましたが、50回以上試行しましたが、エラーのみが表示されています。
呼び出し中にamAdminからwebagentとしてプロパティ値以下に変更した場合Tomcat 2番目のインスタンスの保護されたアプリケーションは、何度も何度も同じページにリダイレクトしますが、例外は発生しませんでした。 amAdminは、openamコンソールの管理ユーザーです。
OpenSSOAgentBootstrap.properties/com.Sun.identity.agents.app.username =
Tomcatログの例外
Apr 16, 2015 5:41:10 PM org.Apache.Tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
Java.lang.ExceptionInInitializerError
at com.Sun.identity.agents.Arch.AgentConfiguration.bootStrapClientConfiguration(AgentConfiguration.Java:727)
at com.Sun.identity.agents.Arch.AgentConfiguration.initializeConfiguration(AgentConfiguration.Java:1140)
at com.Sun.identity.agents.Arch.AgentConfiguration.<clinit>(AgentConfiguration.Java:1579)
at com.Sun.identity.agents.Arch.Manager.<clinit>(Manager.Java:675)
at com.Sun.identity.agents.Tomcat.v6.AmTomcatRealm.<clinit>(AmTomcatRealm.Java:67)
at Sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at Sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.Java:57)
at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.Java:45)
at Java.lang.reflect.Constructor.newInstance(Constructor.Java:526)
at Java.lang.Class.newInstance(Class.Java:374)
at org.Apache.Tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.Java:145)
at org.Apache.Tomcat.util.digester.Digester.startElement(Digester.Java:1288)
at com.Sun.org.Apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.Java:509)
at com.Sun.org.Apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.Java:182)
at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.Java:1342)
at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.Java:2770)
at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.Java:606)
at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.Java:510)
at com.Sun.org.Apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.Java:848)
at com.Sun.org.Apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.Java:777)
at com.Sun.org.Apache.xerces.internal.parsers.XMLParser.parse(XMLParser.Java:141)
at com.Sun.org.Apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.Java:1213)
at com.Sun.org.Apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.Java:649)
at org.Apache.Tomcat.util.digester.Digester.parse(Digester.Java:1561)
at org.Apache.catalina.startup.Catalina.load(Catalina.Java:615)
at org.Apache.catalina.startup.Catalina.load(Catalina.Java:663)
at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:57)
at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
at Java.lang.reflect.Method.invoke(Method.Java:606)
at org.Apache.catalina.startup.Bootstrap.load(Bootstrap.Java:280)
at org.Apache.catalina.startup.Bootstrap.main(Bootstrap.Java:454)
Caused by: com.Sun.identity.security.AMSecurityPropertiesException: AdminTokenAction: FATAL ERROR: Cannot obtain Application SSO token.
Check AMConfig.properties for the following properties
com.Sun.identity.agents.app.username
com.iplanet.am.service.password
at com.Sun.identity.security.AdminTokenAction.run(AdminTokenAction.Java:272)
at com.Sun.identity.security.AdminTokenAction.run(AdminTokenAction.Java:76)
at Java.security.AccessController.doPrivileged(Native Method)
at com.Sun.identity.common.configuration.ConfigurationObserver.registerListeners(ConfigurationObserver.Java:89)
at com.Sun.identity.common.configuration.ConfigurationObserver.getInstance(ConfigurationObserver.Java:114)
at com.Sun.identity.common.DebugPropertiesObserver.<clinit>(DebugPropertiesObserver.Java:49)
... 32 more
ホストエントリ
127.0.0.1 org.sso.com test.openam.com
Apache-Tomcat-7.0.57からのTomcat 2つのインスタンス
**1, One for OpenAM.12.0.war running in port 8080
2, Another one for webagent(openam-Tomcat-v6-7-Agent-3.3.0.Zip) with my protected application running in port 7070**
OpenAM設定:
1, Default configuration amAdmin with password (password) and policy-agent with password(password1) created.
2, Login as amAdmin -->Access Control -- >OpenAMIDPRealm-->created
3, Access Control -- >OpenAMIDPRealm-->subject-->idpuser-->password(password)-->created
4, Access Control -- >OpenAMIDPRealm-->agent-->J2EE-->name(webagent)-->password(password)-->local-->agenturl(http://org.sso.com:7070/agentapp)-->created
5, Federation -- >Create Circle of Trust -- > OpenAMIDPCOT -->select realm (OpenAMIDPRealm) -->created
6, Common Tasks --> create hosted identity provider --> select realm (OpenAMIDPRealm) --> select Circle of Trust -- > OpenAMIDPCOT -->created
Webエージェント設定:
D:\Studies\sso\OpenAM-SP2IDP\webagent\j2ee_agents\Tomcat_v6_agent\bin>agentadmin --install
Please read the following License Agreement carefully:
[Press <Enter> to continue...] or [Enter n To Finish]
************************************************************************
Welcome to the OpenAM Policy Agent for Apache Tomcat 6.0 Servlet/JSP
Container
************************************************************************
Enter the complete path to the directory which is used by Tomcat Server to
store its configuration Files. This directory uniquely identifies the
Tomcat Server instance that is secured by this Agent.
[ ? : Help, ! : Exit ]
Enter the Tomcat Server Config Directory Path [C:/Program Files/Apache
Software Foundation/Tomcat 6.0/conf]: D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat
-SP\Apache-Tomcat-7.0.57\conf
Enter the URL where the OpenAM server is running. Please include the
deployment URI also as shown below:
(http://openam.sample.com:58080/openam)
[ ? : Help, < : Back, ! : Exit ]
OpenAM server URL: http://test.openam.com:8080/openam
$CATALINA_HOME environment variable is the root of the Tomcat
installation.
[ ? : Help, < : Back, ! : Exit ]
Enter the $CATALINA_HOME environment variable: D:\Studies\sso\OpenAM-SP2IDP\apac
he-Tomcat-SP\Apache-Tomcat-7.0.57
Choose yes to deploy the policy agent in the global web.xml file.
[ ? : Help, < : Back, ! : Exit ]
Install agent filter in global web.xml ? [true]: true
Enter the Agent URL. Please include the deployment URI also as shown below:
(http://agent1.sample.com:1234/agentapp)
[ ? : Help, < : Back, ! : Exit ]
Agent URL: http://org.sso.com:7070/agentapp
Enter the Agent profile name
[ ? : Help, < : Back, ! : Exit ]
Enter the Agent Profile name: webagent
Enter the path to a file that contains the password to be used for identifying
the Agent.
[ ? : Help, < : Back, ! : Exit ]
Enter the path to the password file: D:\Studies\sso\OpenAM-SP2IDP\password.txt
WARNING:
Agent profile/User: webagent does not exist in OpenAM server! Either "Hit
the Back button, and re-enter the correct agent profile name/user name", or
"Create this agent profile when asked(available only in custom-install)",
or "Continue without validating it because agent profile is in sub realm", or
"Continue without validating/creating it, and manually validate/create
it in OpenAM server after installation".
-----------------------------------------------
SUMMARY OF YOUR RESPONSES
-----------------------------------------------
Tomcat Server Config Directory :
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57\conf
OpenAM server URL : http://test.openam.com:8080/openam
$CATALINA_HOME environment variable :
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57
Tomcat global web.xml filter install : true
Agent URL : http://org.sso.com:7070/agentapp
Agent Profile name : webagent
Agent Profile Password file name :
D:\Studies\sso\OpenAM-SP2IDP\password.txt
Verify your settings above and decide from the choices below.
1. Continue with Installation
2. Back to the last interaction
3. Start Over
4. Exit
Please make your selection [1]: 1
Updating the
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57/bin/setenv.ba
t
script with the Agent configuration JVM option ...DONE.
DONE.
Creating directory layout and configuring Agent file for Agent_001
instance ...DONE.
Reading data from file D:\Studies\sso\OpenAM-SP2IDP\password.txt and
encrypting it ...DONE.
Generating audit log file name ...DONE.
Creating tag swapped OpenSSOAgentBootstrap.properties file for instance
Agent_001 ...DONE.
Creating a backup for file
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57\conf/server.x
ml
...DONE.
Creating a backup for file
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57\conf/web.xml
...DONE.
Adding OpenAM Tomcat Agent Realm to Server XML file :
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57\conf/server.x
ml
...DONE.
Adding filter to Global deployment descriptor file :
D:\Studies\sso\OpenAM-SP2IDP\Apache-Tomcat-SP\Apache-Tomcat-7.0.57\conf/web.xml
...DONE.
Adding OpenAM Tomcat Agent Filter and Form login authentication to selected
Web applications ...DONE.
SUMMARY OF AGENT INSTALLATION
-----------------------------
Agent instance name: Agent_001
Agent Bootstrap file location:
D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/Agent_001/conf
ig/OpenSSOAgentBootstrap.properties
Agent Configuration file location
D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/Agent_001/conf
ig/OpenSSOAgentConfiguration.properties
Agent Audit directory location:
D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/Agent_001/logs
/audit
Agent Debug directory location:
D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/Agent_001/logs
/debug
Install log file location:
D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/installer-logs
/audit/install.log
Thank you for using OpenAM Policy Agent
OpenSSOAgentBootstrap.properties
com.iplanet.am.naming.url=http://test.openam.com:8080/openam/namingservice
com.Sun.identity.agents.config.service.resolver = com.Sun.identity.agents.Tomcat.v6.AmTomcatAgentServiceResolver
com.Sun.identity.agents.app.username = webagent
com.iplanet.am.service.secret = AQIC91zdxfnLewLIWRJDohP4vdRaQ/7vpmBl
am.encryption.pwd = lZco703977UeM52+kT4ZdyIjLM2PMw3d
com.iplanet.services.debug.level=error
com.iplanet.services.debug.directory=D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/Agent_001/logs/debug
com.Sun.services.debug.mergeall=on
com.Sun.identity.agents.config.local.logfile = D:/Studies/sso/OpenAM-SP2IDP/webagent/j2ee_agents/Tomcat_v6_agent/Agent_001/logs/audit/amAgent_org_sso_com_7070.log
com.Sun.identity.agents.config.organization.name = /
com.Sun.identity.agents.config.lock.enable = false
com.Sun.identity.agents.config.profilename = webagent
com.iplanet.am.services.deploymentDescriptor=/openam
openam/WEB-INF/classes/AMConfig.properties
com.iplanet.am.server.Host=@SERVER_Host@
com.iplanet.security.SSLSocketFactoryImpl=com.Sun.identity.shared.ldap.factory.JSSESocketFactory
com.Sun.identity.sm.sms_object_class_name=com.Sun.identity.sm.@SMS_OBJECT_CLASS@
com.iplanet.services.configpath=@BASE_DIR@
com.iplanet.am.serverMode=true
com.iplanet.am.ldap.connection.ldap.error.codes.retries=80,81,91
com.iplanet.am.locale=@PLATFORM_LOCALE@
com.Sun.identity.urlconnection.useCache=false
opensso.protocol.handler.pkgs=
com.iplanet.am.server.protocol=@SERVER_PROTO@
com.iplanet.am.server.port=@SERVER_PORT@
com.iplanet.services.debug.level=error
com.Sun.embedded.replicationport=
com.Sun.identity.common.systemtimerpool.size=3
com.Sun.identity.overrideAMC=true
com.Sun.embedded.sync.servers=on
com.iplanet.am.service.secret=@ENCLDAPUSERPASSWD@
am.encryption.pwd=@AM_ENC_KEY@
com.Sun.identity.sm.enableDataStoreNotification=@DATASTORE_NOTIFICATION@
com.Sun.services.debug.mergeall=off
com.iplanet.am.services.deploymentDescriptor=/@SERVER_URI@
com.Sun.am.event.connection.disable.list=@DISABLE_PERSISTENT_SEARCH@
Agent_001/conf/OpenSSOAgentConfiguration.properties
com.Sun.identity.agents.config.filter.mode[manager]=J2EE_POLICY
com.Sun.identity.agents.config.filter.mode[Host-manager]=J2EE_POLICY
com.Sun.identity.agents.config.filter.mode = ALL
com.Sun.identity.agents.config.user.mapping.mode = USER_ID
com.Sun.identity.agents.config.user.attribute.name = employeenumber
com.Sun.identity.agents.config.user.principal = false
com.Sun.identity.agents.config.user.token = UserToken
com.Sun.identity.agents.config.client.ip.header =
com.Sun.identity.agents.config.client.hostname.header =
com.Sun.identity.agents.config.load.interval = 0
com.Sun.identity.agents.config.locale.language = en
com.Sun.identity.agents.config.locale.country = US
com.Sun.identity.agents.config.audit.accesstype = LOG_NONE
com.Sun.identity.agents.config.log.disposition = REMOTE
com.Sun.identity.agents.config.remote.logfile = amAgent_org_sso_com_7070.log
com.Sun.identity.agents.config.local.log.rotate = false
com.Sun.identity.agents.config.local.log.size = 52428800
com.Sun.identity.agents.config.webservice.enable = false
com.Sun.identity.agents.config.webservice.endpoint[0] =
com.Sun.identity.agents.config.webservice.process.get.enable = true
com.Sun.identity.agents.config.webservice.authenticator =
com.Sun.identity.agents.config.webservice.internalerror.content = WSInternalErrorContent.txt
com.Sun.identity.agents.config.webservice.autherror.content = WSAuthErrorContent.txt
com.Sun.identity.agents.config.webservice.responseprocessor =
com.Sun.identity.agents.config.access.denied.uri[] =
com.Sun.identity.agents.config.login.form[0] = /Host-manager/AMLogin.html
com.Sun.identity.agents.config.login.form[1] = /manager/AMLogin.html
com.Sun.identity.agents.config.login.error.uri[0] = /Host-manager/AMError.html
com.Sun.identity.agents.config.login.error.uri[1] = /manager/AMError.html
com.Sun.identity.agents.config.login.use.internal = true
com.Sun.identity.agents.config.login.content.file = FormLoginContent.txt
com.Sun.identity.agents.config.auth.handler[] =
com.Sun.identity.agents.config.logout.handler[] =
com.Sun.identity.agents.config.verification.handler[] =
com.Sun.identity.agents.config.httpsession.binding = true
com.Sun.identity.agents.config.redirect.param = goto
com.Sun.identity.agents.config.login.url[0] = http://test.openam.com:8080/openam/UI/Login
com.Sun.identity.agents.config.logout.url[0] = http://test.openam.com:8080/openam/UI/Logout
com.Sun.identity.agents.config.login.url.prioritized = true
com.Sun.identity.agents.config.login.url.probe.enabled = true
com.Sun.identity.agents.config.login.url.probe.timeout = 2000
com.Sun.identity.agents.config.logout.url.prioritized = true
com.Sun.identity.agents.config.logout.url.probe.enabled = true
com.Sun.identity.agents.config.logout.url.probe.timeout = 2000
com.Sun.identity.agents.config.agent.Host =
com.Sun.identity.agents.config.agent.port =
com.Sun.identity.agents.config.agent.protocol =
com.Sun.identity.agents.config.login.attempt.limit = 0
com.Sun.identity.agents.config.amsso.cache.enable = true
com.Sun.identity.agents.config.cookie.reset.enable = false
com.Sun.identity.agents.config.cookie.reset.name[0] =
com.Sun.identity.agents.config.cookie.reset.domain[] =
com.Sun.identity.agents.config.cookie.reset.path[] =
com.Sun.identity.agents.config.cdsso.enable = false
com.Sun.identity.agents.config.cdsso.redirect.uri = /agentapp/sunwCDSSORedirectURI
com.Sun.identity.agents.config.cdsso.cdcservlet.url[0] = http://test.openam.com:8080/openam/cdcservlet
com.Sun.identity.agents.config.cdsso.clock.skew = 0
com.Sun.identity.agents.config.cdsso.trusted.id.provider[0] = http://test.openam.com:8080/openam/cdcservlet
com.Sun.identity.agents.config.cdsso.secure.enable = false
com.Sun.identity.agents.config.logout.application.handler[] =
com.Sun.identity.agents.config.logout.uri[] =
com.Sun.identity.agents.config.logout.request.param[] =
com.Sun.identity.agents.config.logout.introspect.enabled = false
com.Sun.identity.agents.config.logout.entry.uri[] =
com.Sun.identity.agents.config.fqdn.check.enable = true
com.Sun.identity.agents.config.fqdn.default = org.sso.com
com.Sun.identity.agents.config.fqdn.mapping[] =
com.Sun.identity.agents.config.legacy.support.enable = false
com.Sun.identity.agents.config.legacy.user.agent[0] = Mozilla/4.7*
com.Sun.identity.agents.config.legacy.redirect.uri = /agentapp/sunwLegacySupportURI
com.Sun.identity.agents.config.response.header[] =
com.Sun.identity.agents.config.redirect.attempt.limit = 0
com.Sun.identity.agents.config.port.check.enable = false
com.Sun.identity.agents.config.port.check.file = PortCheckContent.txt
com.Sun.identity.agents.config.port.check.setting[7070] = http
com.Sun.identity.agents.config.notenforced.uri[0] =
com.Sun.identity.agents.config.notenforced.uri.invert = false
com.Sun.identity.agents.config.notenforced.uri.cache.enable = true
com.Sun.identity.agents.config.notenforced.uri.cache.size = 1000
com.Sun.identity.agents.config.notenforced.refresh.session.idletime = false
com.Sun.identity.agents.config.notenforced.ip[0] =
com.Sun.identity.agents.config.notenforced.ip.invert = false
com.Sun.identity.agents.config.notenforced.ip.cache.enable = true
com.Sun.identity.agents.config.notenforced.ip.cache.size = 1000
com.Sun.identity.agents.config.attribute.cookie.separator = |
com.Sun.identity.agents.config.attribute.date.format = EEE, d MMM yyyy hh:mm:ss z
com.Sun.identity.agents.config.attribute.cookie.encode = true
com.Sun.identity.agents.config.profile.attribute.fetch.mode = NONE
com.Sun.identity.agents.config.profile.attribute.mapping[] =
com.Sun.identity.agents.config.session.attribute.fetch.mode = NONE
com.Sun.identity.agents.config.session.attribute.mapping[] =
com.Sun.identity.agents.config.response.attribute.fetch.mode = NONE
com.Sun.identity.agents.config.response.attribute.mapping[] =
com.Sun.identity.agents.config.bypass.principal[0] =
com.Sun.identity.agents.config.default.privileged.attribute[0] = AUTHENTICATED_USERS
com.Sun.identity.agents.config.privileged.attribute.type[0] = Group
com.Sun.identity.agents.config.privileged.attribute.type[1] = Role
com.Sun.identity.agents.config.privileged.attribute.tolowercase[Group] = false
com.Sun.identity.agents.config.privileged.attribute.tolowercase[Role] = false
com.Sun.identity.agents.config.privileged.session.attribute[0] =
com.Sun.identity.agents.config.privileged.attribute.mapping.enable = true
com.Sun.identity.agents.config.privileged.attribute.mapping[] =
com.iplanet.am.cookie.name=iPlanetDirectoryPro
com.iplanet.am.session.client.polling.enable=false
com.iplanet.am.session.client.polling.period=180
com.iplanet.security.encryptor=com.iplanet.services.util.JCEEncryption
com.Sun.identity.idm.remote.notification.enabled=true
com.iplanet.am.sdk.remote.pollingTime=1
com.Sun.identity.sm.notification.enabled=true
com.Sun.identity.sm.cacheTime=1
com.iplanet.am.server.protocol=http
com.iplanet.am.server.Host=test.openam.com
com.iplanet.am.server.port=8080
com.Sun.identity.agents.notification.enabled=true
com.Sun.identity.agents.polling.interval=3
com.Sun.identity.policy.client.cacheMode=subtree
com.Sun.identity.policy.client.booleanActionValues=iPlanetAMWebAgentService|GET|allow|deny:iPlanetAMWebAgentService|POST|allow|deny
com.Sun.identity.policy.client.resourceComparators=serviceType=iPlanetAMWebAgentService|class=com.Sun.identity.policy.plugins.HttpURLResourceName|wildcard=*|delimiter=/|caseSensitive=false
com.Sun.identity.policy.client.clockSkew=10
com.Sun.identity.agents.config.policy.env.get.param[0]=
com.Sun.identity.agents.config.policy.env.post.param[0]=
com.Sun.identity.agents.config.policy.env.jsession.param[0]=
com.Sun.identity.client.notification.url=http://org.sso.com:7070/agentapp/notification
com.iplanet.services.debug.level=error
com.Sun.identity.agents.config.ignore.path.info = false
この問題を解決するために私を助けてください。事前に感謝します。
ユーザーがOpenAMログインを使用してログインした後、それ自体にリダイレクトするという、同様の問題が過去にありました。
問題はCookieドメインでした。 OpenAMは、認証時にセッショントークンでCookieを設定します。 Tomcatが別のドメインにある場合、Cookieを検索できません。
OpenAMコンソール->構成->システム->プラットフォームでドメインを確認することができます。
私のアプリはDrupalでしたが、Tomcatの設定は次のとおりです。
<Context sessionCookiePath="/something" sessionCookieDomain=".domain.tld" />
問題の解決策の1つは、com.iplanet.am.naming.map.site.to.server
このチュートリアルはあなたのためのものをカバーするはずです:) https://backstage.forgerock.com/#!/docs/openam/12.0.0/admin-guide
この種のエラーで私が観察した問題の1つは、Open AM 13がTomcat-8.5.12と互換性がない可能性があることです。 Open AMがTomcat-7.0.69にデプロイされているTomcatインストールを変更してください。これで問題が解決しました。