Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

LDAP authentication and Database(JDBC) Authorization J2EE  RSS feed

Miguel Cárcamo
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing a web app where I have to login as an LDAP user (which works fine until now), but the thing is that for every user, I need some roles that aren't in LDAP but in my Database. I'm working with J2EE 7, Glassfish, and MySQL.

Anyone knows how to do this?


Example of the table user:

| uid | first name | last name | role |
| lceledon | Luis | Celedon | admin|

So I need that lceledon have the admin role and specific authorizations to some views. And yes, the user (uid) that are in the table are known, and also their roles. Anyone who is not in the table has the role "student"

I've seen this:][1]

Where there is a realm for Tomcat, but the thing is that I need the realm for Glassfish. I have the sample realm, but there are so many differences that I don't know what it has to be on it.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!