1

我正在关注本指南https://dev.solace.com/integration-guides/hermes-jms/

使用 hermesJMS(通过 SOAPUI 下载)与安慰。

在我们的组织中,我们只使用 kerberos 身份验证来获得安慰,所以我的问题是如何使用 hermesjms 设置 kerberos 身份验证?

我们有效的示例订阅者代码如下所示:

    final JCSMPProperties properties = new JCSMPProperties();
    properties.setProperty(JCSMPProperties.HOST, "hostname:5432");
    properties.setProperty(JCSMPProperties.VPN_NAME, "vpn_name"); 
    properties.setProperty(JCSMPProperties.USERNAME, "username");

    System.setProperty("java.security.krb5.conf", "C:\\Solace\\kerberos.conf"); 
    System.setProperty("java.security.auth.login.config", "C:\Solace\\app.conf"); // this references a keytab file and sets principal and realm etc


    properties.setProperty(JCSMPProperties.AUTHENTICATION_SCHEME, JCSMPProperties.AUTHENTICATION_SCHEME_GSS_KRB);
    properties.setProperty(JCSMPProperties.KRB_SERVICE_NAME, "XXX");

    final JCSMPSession session = JCSMPFactory.onlyInstance().createSession(properties);
    .....

谢谢

4

0 回答 0