Questions tagged [jdbcrealm]

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.

207 questions
16
votes
4 answers

How to configure JDBCRealm to obtain its DataSource from JNDI

How do you use a JDBCRealm to handle authenticating and authorizing users in servlets? The only example I can find is to create the DataSource in web.xml (such as Authentication against database using shiro 1.2.1). I do not want to include database…
Recurse
  • 3,467
  • 1
  • 20
  • 34
12
votes
1 answer

Apache Shiro - using database to read users, roles and permissions

Currently I've a Swing app and I wan't to integrate Apache Shiro in order to authenticate and delegate permissions to certain roles. I've already managed to read the users from the shiro.ini file that I've created for tests, it looks something like…
Abstract
  • 614
  • 1
  • 5
  • 15
11
votes
1 answer

Using JDBCRealm to authenticate user with Shiro

I am trying to authenticate a servlet running within Tomcat 6 using Shiro. I have the following shiro.ini file: [main] ps = org.apache.shiro.authc.credential.DefaultPasswordService pm =…
Recurse
  • 3,467
  • 1
  • 20
  • 34
10
votes
1 answer

Glassfish Security - jdbcRealm: How to configure login with SHA-256 digest

I use jdbcRealm for security in my glassfish v3.0.1 b22. It is set up so that it use the USER table inside my database for authentication by following this blog: http://blogs.oracle.com/foo/entry/mort_learns_jdbc_realm_authentication. I got it…
Thang Pham
  • 35,825
  • 73
  • 192
  • 279
10
votes
1 answer

Accessing secure restful web services using jersey client

I have created web services based on Jersey (auto generated via Netbeans). I have also created a user names “testClient” with password “secret” and created User group “Users” and used file Realm using glassfish 3.0.1 admin console. I have also…
Raza
  • 281
  • 1
  • 2
  • 9
8
votes
2 answers

jdbc realm with glassfish v3: Realm properties and configuration error

I have the following database schema (MySQL): My login is a form based authentication system, to which i am trying to create a jdbc realm. My web.xml: FORM emdJDBCRealm
ccot
  • 1,773
  • 3
  • 32
  • 53
8
votes
1 answer

Glassfish thinks jdbcRealm is actually fileRealm

I configured a new jdbcRealm in Glassfish 3.1.1 and turned on FINEST logging and I get the following when I try to login with a username and password. It complains that the realm my web app is mapped to is a fileRealm when it is truly a jdbcRealm.…
Adam
  • 3,860
  • 8
  • 42
  • 70
8
votes
1 answer

LoginException: Login failed: Security Exception

I am attempting to setup container managed security with GlassFish v3.1.1 Build 12 and JSF 2.1. I keep getting the following exception for some reason and I am unable to login. WARNING: WEB9102: Web Login Failed:…
Adam
  • 3,860
  • 8
  • 42
  • 70
7
votes
3 answers

Is there existing support in tomcat for a JDBCRealm that takes in a salt?

We are currently using tomcat 5.5 and would like to add a salt to our JDBCRealm authentication. I was wondering if there was any existing classes or do we need to extend JDBCRealm and write our own authentication class? We have the following in our…
Ben
  • 2,149
  • 4
  • 26
  • 41
7
votes
1 answer

Password Encryption Algorithm in Glassfish 4

I've recently updated Glassfish from 3.1.2 to 4.0 and wanted to set up a JDBCRealm that I used before on my app which uses FORM based authentication. The passwords are hashed with SHA-256 in the database (that is the default Digest Algorithm…
apcuk
  • 194
  • 1
  • 12
6
votes
2 answers

How to make each user access resources at a specific location according to their authority/role in JAAS?

I'm using GlassFish server 4.0 in which I have assigned different authorities/roles to different users. A user may have multiple authorities/roles. For example, an admin user may be associated with ROLE_ADMIN (to perform administrative tasks) and…
Tiny
  • 24,933
  • 92
  • 299
  • 571
6
votes
1 answer

Java EE declarative security, Cannot load group for JDBC realm user

It is my first post here. I would have two questions with regard to declarative Java EE security: (1) file-based authentication and (2) DB-based authentication. I enclosed the relevant parts of the configuration for both questions. I run the code on…
Tamas
  • 634
  • 1
  • 10
  • 24
5
votes
0 answers

javax.servlet.ServletException: UT010031: Login failed

I am trying to build up a JEE application using JAAS programmatic security with WildFly 10 and Postgres Database, however i never succeeded to login where i always get the error saying **javax.servlet.ServletException: UT010031: Login failed** and…
Mohammad Fneish
  • 477
  • 6
  • 13
5
votes
4 answers

Login not triggered for restricted page in glassfish jdbcrealm authentication

I'm very new to EJB security and GlassFish authentication, authorization mechanism. I have a jdbc realm and configured sun-web.xml and web.xml to map the roles and restrict access to a page. However, my problem is that when I restrict access to all…
cadii
  • 51
  • 1
  • 3
5
votes
2 answers

DatasourceRealm Tomcat 6 configuration: Name jdbc is not bound in this Context

I'm configuring a DatasourceRealm in Tomcat 6 configuring everything in META-INF/context.xml. web.xml seems to be configured correctly since login prompt is showing up. Can someone help? context.xml
J T
  • 71
  • 1
  • 6
1
2 3
13 14