将 IDP 元数据导入 websphere 应用程序服务器 8.5 时出错

Error in importing IDP metadata into websphere application server 8.5

我们正在

java.lang.Instantiation

将 IDP 元数据 xml 导入 websphere 应用程序服务器 8.5 时出现异常。 IDP 是 ADFS 3.0。我们正在按照 Websphere 8.5 saml setup.

中给出的步骤进行操作

wsadmin 中使用的命令是:

AdminTask.importSAMLIdpMetadata('-idpMetadataFileName "C:/federationmetadata.xml" -idpId 1 -ssoId 1 -signingCertAlias idpCert1')

命令提示符中的错误堆栈跟踪如下所示:

wsadmin>AdminTask.importSAMLIdpMetadata('-idpMetadataFileName "C:/federationmeta
data.xml" -idpId 1 -ssoId 1 -signingCertAlias idpCert1')
WASX7015E: Exception running command: "AdminTask.importSAMLIdpMetadata('-idpMeta
dataFileName "C:/federationmetadata.xml" -idpId 1 -ssoId 1 -signingCertAlias uma
ng')"; exception information:
com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<input>", line 1, in ?
com.ibm.ws.scripting.ScriptingException: java.lang.InstantiationError: java.lang
.InstantiationError: oasis.names.tc.saml._2_0.metadata.RoleDescriptorType

        at com.ibm.ws.scripting.adminCommand.AdminCmdController.executeCmd(Admin
CmdController.java:1914)
        at com.ibm.ws.scripting.adminCommand.AdminCmdController.processCmd(Admin
CmdController.java:318)
        at com.ibm.ws.scripting.adminCommand.AdminCmdProxyHandler.invoke(AdminCm
dProxyHandler.java:92)
        at com.ibm.ws.scripting.adminCommand.AdminCmdProxyBase.__method3(AdminCm
dProxyBase.java:53)
        at com.ibm.ws.scripting.adminCommand.AdminTask.importSAMLIdpMetadata(Unk
nown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java
)
        at org.python.core.PyMethod.__call__(PyMethod.java)
        at org.python.core.PyObject.__call__(PyObject.java)
        at org.python.core.PyInstance.invoke(PyInstance.java)
        at org.python.pycode._pyx56.f[=10=](<input>:1)
        at org.python.pycode._pyx56.call_function(<input>)
        at org.python.core.PyTableCode.call(PyTableCode.java)
        at org.python.core.PyCode.call(PyCode.java)
        at org.python.core.Py.runCode(Py.java)
        at org.python.core.Py.exec(Py.java)
        at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
        at com.ibm.bsf.engines.jython.JythonEngine$BSFPythonInterpreter.runcode(
Unknown Source)
        at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpret
er.java)
        at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpret
er.java)
        at com.ibm.bsf.engines.jython.JythonEngine.iexec(Unknown Source)
        at com.ibm.bsf.BSFManager.run(Unknown Source)
        at java.security.AccessController.doPrivileged(AccessController.java:417
)
        at com.ibm.bsf.BSFManager.iexec(Unknown Source)
        at com.ibm.ws.scripting.AbstractShell.interactive(AbstractShell.java:139
8)
        at com.ibm.ws.scripting.AbstractShell.run(AbstractShell.java:2298)
        at com.ibm.ws.scripting.WasxShell.main(WasxShell.java:1172)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
        at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
        at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithEx
ception(EclipseAppContainer.java:587)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandl
e.java:198)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppli
cation(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ec
lipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:369)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
        at org.eclipse.core.launcher.Main.run(Main.java:981)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.jav
a:400)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:163)

com.ibm.ws.scripting.ScriptingException: com.ibm.ws.scripting.ScriptingException
: java.lang.InstantiationError: java.lang.InstantiationError: oasis.names.tc.sam
l._2_0.metadata.RoleDescriptorType

有人知道这个错误吗?我们正在使用管理员 ID 运行 wsadmin。

我们真正需要知道的唯一信息是签署 SAML 的 ADFS 服务器证书。所以我们从ADFS服务器上获取了X509证书,手动导入到WAS的默认信任库(CellDefaultTrustStore)中。我们通过向拦截器属性添加以下属性来手动配置 IDP。我们现在可以连接到 ADFS。

sso_1.idp_1.entityID

sso_1.idp_1.certAlias

sso_1.idp_1.singleSignOnUrl