2011-06-24 35 views
0

如何禁用websphere 6.1中的基本身份驗證? 我已經寫例如小服務程序 在我的戰爭應用程序,我已經定義是這樣的:禁用基本身份驗證?

<user-data-constraint> 
      <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
     </user-data-constraint> 
    </security-constraint> 
    <login-config> 
     <auth-method>BASIC</auth-method> 
     <realm-name>Example login/realm-name> 
    </login-config> 



    <servlet-mapping> 
     <servlet-name>ExampleServelet</servlet-name> 
     <url-pattern>/*</url-pattern> 
    </servlet-mapping> 

現在從UI的任何一個與http://server/example/ *可以驗證,有不會是對基本身份驗證的註銷。

我該如何禁用這個避免這種情況?由於某種原因,我不能使用基於表單的身份驗證?

回答

2

@constantlearner:你的問題含糊不清。您是否想要禁用整個應用程序的身份驗證或僅針對特定的url模式。

對於特定的url-pattern:只是不要在web-resource-collection標籤中指定。 整個應用程序,你可以去WAS控制檯 - >安全管理 - >取消選中「啓用應用程序安全性」複選框,並重新啓動應用程序。

1

或者,如果你想更具體的與您的身份驗證你可以改變你的網址模式:

<url-pattern>/justServletNeedingAuthentication</url-pattern>