我想通過這些步驟來配置客戶端證書驗證我的自由服務器: http://www.ibm.com/support/knowledgecenter/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/twlp_sec_clientcert.htmlIBM自由女神客戶證書驗證
我的自由配置:
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>webProfile-7.0</feature>
<feature>restConnector-1.0</feature>
<feature>localConnector-1.0</feature>
<feature>monitor-1.0</feature>
<feature>jsp-2.3</feature>
<feature>adminCenter-1.0</feature>
<feature>ssl-1.0</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
httpPort="9081"
httpsPort="9444" />
<application id="Sample" name="Sample" type="war" location="Sample.war"/>
<keyStore id="defaultKeyStore" location="key.jks" type="JKS" password="{xor}EzY9Oi0rJg==" />
<keyStore id="defaultTrustStore" location="truststore.jks" type="JKS" password="{xor}EzY9Oi0rJg==" />
<ssl id="defaultSSLConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultTrustStore" clientAuthenticationSupported="true"/>
<webAppSecurity allowFailOverToBasicAuth="true" />
<auth-method>CLIENT-CERT</auth-method>
<basicRegistry id="basic">
<user identity="CN=Admin,O=myOrg,C=country" name="Admin" password="admin" />-->
</basicRegistry>
<administrator-role>
<user>Admin</user>
</administrator-role>
</server>
從Java客戶端,我得到: CWWKX0229E :提供的用戶憑據出現問題。服務器迴應代碼401和消息'未授權'
我想我的用戶映射是錯誤的。有人可以給我一個例子如何映射客戶端證書與自由用戶?
我從負荷消費要求使用認證。是的,它適用於基本認證。 使用客戶端證書身份驗證可以擁有管理員角色嗎? – VytautasN
如果您使用自己的Web應用程序進行客戶端證書登錄,則不需要管理員角色,而是您的應用程序定義的角色。如果您嘗試使用管理中心的證書登錄,我懷疑它會起作用。 –
但是,您可能需要通過設置clientAuthentication =「true」來進行客戶端身份驗證/相互SSL,在這種情況下,服務器會請求客戶端發送證書。但是,如果客戶機沒有證書,或者證書不受服務器信任,則握手不成功。在這種情況下,您仍然需要使用用戶名/密碼登錄。 –