JDBCRealm is implementation of realm (a collection of usernames and passwords that identify valid users of a web application, plus an enumeration of the list of roles associated with each valid user) that works with JDBC supported databases.
Questions tagged [jdbcrealm]
207 questions
5
votes
1 answer
How to set up a JDBCRealm in Apache Tomcat 7?
I would like that the users (which are allowed to log on to my site) are loaded from a MySQL database. To do that I want to set up a JDBCRealm for my Apache Tomcat 7 application server.
I've read through the documentation and created a database…

Benny Code
- 51,456
- 28
- 233
- 198
4
votes
1 answer
Configuring jdbcRealm in context.xml

kinkajou
- 3,664
- 25
- 75
- 128
4
votes
1 answer
Programmatic Java EE 6 login: how to catch the LoginException?
I have implemented a login using a backing bean and request.login() function. It works fine but if the login fails it throws a nasty error. It's fine because I have caught a differnt error before hand(ServletException) and I am able to move to the…

Drew H
- 4,699
- 9
- 57
- 90
4
votes
3 answers
Java Application with Multiple JAAS Security Realms
I was wondering if it was possible to have a Java EE application with multiple JAAS security realms.
I'm currently developing an application in which some users need to be authenticated with data stored in a database, while other users need to be…

ufasoli
- 1,038
- 2
- 19
- 41
4
votes
2 answers
Removing the previous session, if it is already active (if a user forgot to log out) using JAAS
Let the following class be a session scoped CDI managed bean.
@Named
@SessionScoped
public class SessionUtils implements Serializable
{
private MapsessionMap;
private static final long serialVersionUID=1l;
public…

Tiny
- 27,221
- 105
- 339
- 599
4
votes
5 answers
how to programatically add users to tomcat UserDatabaseRealm?
I am having a simple Java web application with not more than 20-25 users who would be logged in. I am currently using tomcat server to host it and am using the UderDatabaseRealm for access control. I would like to add a feature to this application…

avimonk
- 173
- 2
- 11
4
votes
1 answer
Table schema for Shiro JdbcRealm Authorization?
I would like my app to use Apache Shiro for both authentication and authorization. I would like to start simple and have a relational database be the data source for both of these. This means I need to use the JdbcRealm.
After reading the docs, it…

smeeb
- 27,777
- 57
- 250
- 447
4
votes
3 answers
What is the difference between JAAS, SAML and Realm
I was trying to learn JAAS, then i came up with the terms SAML and Realm, and now I am confused.
In any of the basic tutorials of JAAS, we are pretty much configuring the basic that a normal Realm configuration is. If I read configuration of SAML…

PHP Avenger
- 1,744
- 6
- 37
- 66
4
votes
1 answer
Tomcat JDBC vs. DataSource Realm
For webapp testapp which has the following in its web.xml (among other things)
My JSP
*.secured
…

Cody S
- 4,744
- 8
- 33
- 64
4
votes
1 answer
Cannot get Tomcat JDBCRealm to use SHA2
I am using Tomcat 7 / JDBCRealm authentication in clear text (development/controlled environment). Now I want to upload the web app to my hosted environment so I need to digest the passwords.
I added 'digest="MD5"' to the realm section in…

adaj21
- 543
- 3
- 11
- 25
3
votes
0 answers
Glassfish Security - jdbcRealm: How to implement "remember-me"
I'm using jdbcRealm with Glassfish V3 and Java EE 6 and I want to implement a cookie based "Remember-Me".
But, it seems that I cannot set a filter before the JACC security checking. Any Ideas?

rock
- 31
- 2
3
votes
2 answers
how to get/set the salt for a JdbcRealm
I am attempting to use the Shiro JdbcRealm and SHA256 hashedcredentialsMatcher. I need to update a legacy database and assign the appropriate salt for each user (via a batch routine).
how do I get/set the salt for a given account using the Shiro…

Fred
- 335
- 1
- 6
- 22
3
votes
1 answer
Why is Realm setting required in Server.xml and not web.xml
I am working on a Java application for a while. I primarily work on .NET Platform. Although I feel lot of concepts are common between these two platforms but there are few areas where I am finding some issues related to the configuration.
I am…

Kunal
- 1,913
- 6
- 29
- 45
3
votes
1 answer
How to read/import the roles from an external IDP into Keycloak
I have a spring boot application secured with Keycloak 11.0.2, and my Keycloak setup is as follows:
A Realm named Central with a role CentralWebUser and a client SpringWeb. The client has
Access Type : public and only one flow enabled, namely…

dreamcrash
- 47,137
- 25
- 94
- 117
3
votes
1 answer
What is the difference between JDBCRealm and DataSourceRealm?
I read this comment: "don't use JDBCRealm at all: it does not scale at all since there is a single JDBC Connection object used for all database communication. You are better off using DataSourceRealm"
What does it mean in a greater detail?

The Bitman
- 1,279
- 1
- 11
- 25