2012-03-15 4 views
7

Benim idari web uygulaması basic-auth kullanılarak sabitlenir:Tüm URL'ler için bir tomcat güvenlik rolü nasıl uygulanır, ancak bir?

<security-constraint> 
    <web-resource-collection> 
    <web-resource-name>myApp</web-resource-name> 
    <description> 
     Security constraint for 
     Admin resources 
    </description> 
    <url-pattern>/*</url-pattern> 
    <http-method>POST</http-method> 
    <http-method>GET</http-method> 
    </web-resource-collection> 
    <auth-constraint> 
    <description> 
     constraint 
    </description> 
    <role-name>myrolename</role-name> 
    </auth-constraint> 
    <user-data-constraint> 
    <description>SSL not required</description> 
    <transport-guarantee>NONE</transport-guarantee> 
    </user-data-constraint> 
</security-constraint> 
<login-config> 
    <auth-method>BASIC</auth-method> 
    <realm-name>Admin Login</realm-name> 
</login-config> 

Ancak, (diyelim /web uygulaması olup olmadığını kontrol otomatik hizmeti tarafından kullanılan/, kontrol tek bir URL için bir dışlama kurmaya gerek düzenli aralıklarla hâlâ açık.

Maalesef

ben bu hizmet için temel kimlik doğrulaması etkinleştiremezsiniz.

Bunu başarmak nasıl?

Çok teşekkürler.

cevap

7

<transport-guarantee>NONE</transport-guarantee> ile önce başka kısıtının eklenmesi sayesinde bu benim için çalıştı hile

<security-constraint> 
    <web-resource-collection> 
     <web-resource-name>Status page, accessed internally by application</web-resource-name> 
     <url-pattern>/status/</url-pattern> 
    </web-resource-collection> 
    <user-data-constraint> 
     <transport-guarantee>NONE</transport-guarantee> 
    </user-data-constraint> 
</security-constraint> 
+0

yaptı! –

İlgili konular