Skip to content
Advertisement

Container based LDAP authentication with Jboss and Spring boot

I’ve a simple API that returns a string. My objective is to secure my API using LDAP authentication. I’ve my LDAP configured in my JBoss EAP 7.1 under the security-domain. I’ve defined my security constraint in the web.xml and the corresponding security-domain in my jboss-web.xml This is my first shot to integrate LDAP with REST API. Not sure what went wrong, but when I hit my API from browser, it keeps prompting for credentials 3 times and then gives below error.

JavaScript

If I hit from postman, it gives similar error in json format…

JavaScript

web.xml

JavaScript

jboss-web.xml

JavaScript

API

JavaScript

standalone-full-ha.xml configuration:

JavaScript

My dependencies in pom.xml are:

JavaScript

My question is, why the API prompts for credentials multiple times when accessed from browser? I confirm there is nothing wrong with the credentials that are given. Also, the json response suggests some unhandled exception. Not sure, where it is coming from. Any suggestions would be helpful.

The same configuration worked for SOAP based services. For REST, its not working. Does it make difference?

Advertisement

Answer

The spring security dependency adds additional security on top of my LDAP authentication. I removed the dependency and it worked.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement