Ciao a tutti,
ho qualche problema nell'autenticare la mia applicazione web tramite un realm LDAP (uso OpenLDAP).
Ho configurato un realm LDAP su un Sun Application Server (GlassFish vs2) e creato la mia LDAP directory con le mie entries per gli utenti.
dopodichè, ho inserito i vincoli di sicurezza nel mio descrittore web.xml:
senza definire una mappature dei ruoli sul sun-web.xml.codice:<security-role> <role-name>USER</role-name> </security-role> <security-constraint> <display-name>ConstraintLogin</display-name> <web-resource-collection> <web-resource-name>Pagine protette</web-resource-name> <url-pattern>/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> <http-method>HEAD</http-method> <http-method>PUT</http-method> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> <http-method>DELETE</http-method> </web-resource-collection> <auth-constraint> <role-name>USER</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>LdapRealm</realm-name> </login-config>
Al momento della login, mi sono correttamente richieste le credenziali ed il sistema le verifica sulla directory LDAP, poi però sembra che provi a verificare qualcos'altro (il role?) ed ottengo l'errore
HTTP Status 403 - Access to the requested resource has been denied
messageAccess to the requested resource has been denied
descriptionAccess to the specified resource (Access to the requested resource has been denied) has been forbidden.
ho praticamente seguito alla lettera quanto indicato al seguente link:
http://blogs.sun.com/pblaha/entry/ld...un_application
cosa c'è che non va?
avete suggerimenti?