Je suis passé par d'autres questions de stackoverflow mais aucune ne semble résoudre mon problème de configuration de tomcat avec ldap pour l'accès au gestionnaire. Voici ce que j'ai faittomcat manager avec authentification ldap
- Configuré JNDIRealm avec ldap config.
- Application gestionnaire déployée sur tomcat.
Je suis en mesure de valider que l'authentification de l'utilisateur est réussie mais les journaux se plaignent de l'absence de rôle associé.
2017-04-25 14:17:54,644 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- Checking constraint 'SecurityConstraint[HTMLManger and Manager command]' against GET /html --> true
2017-04-25 14:17:54,644 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- Checking constraint 'SecurityConstraint[HTMLManger and Manager command]' against GET /html --> true
2017-04-25 14:17:54,644 [http-8080-1] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Calling hasUserDataPermission()
2017-04-25 14:17:54,644 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- User data constraint has no restrictions
2017-04-25 14:17:54,644 [http-8080-1] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Calling authenticate()
2017-04-25 14:17:54,648 [http-8080-1] DEBUG org.apache.catalina.realm.CombinedRealm- Attempting to authenticate user "manager" with realm "org.apache.catalina.realm.JNDIRealm/1.0"
2017-04-25 14:17:54,667 [http-8080-1] DEBUG org.apache.catalina.realm.CombinedRealm- Authenticated user "manager" with realm "org.apache.catalina.realm.JNDIRealm/1.0"
2017-04-25 14:17:54,667 [http-8080-1] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Authenticated 'manager' with type 'BASIC'
2017-04-25 14:17:54,667 [http-8080-1] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Calling accessControl()
2017-04-25 14:17:54,667 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- Checking roles GenericPrincipal[manager()]
2017-04-25 14:17:54,667 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- Different realm [email protected] [email protected]
2017-04-25 14:17:54,667 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- Username manager does NOT have role manager
2017-04-25 14:17:54,668 [http-8080-1] DEBUG org.apache.catalina.realm.RealmBase- No role found: manager
2017-04-25 14:17:54,668 [http-8080-1] DEBUG org.apache.catalina.authenticator.AuthenticatorBase- Failed accessControl() test
Note: J'ai validé ce rôle de gestionnaire existe dans le gestionnaire/WEB-INF/web.xml et aussi j'avoir un attribut ldap appelé tomcatRole = gestionnaire. J'ai userRoleName = "tomcatRole" dans server.xml pour la config JNDIRealm.
Quelle partie de la configuration me manque?
Version: tomcat6
LDAP: OUD
Merci.