jdbcrealm

How to configure JDBCRealm to obtain its DataSource from JNDI

百般思念 提交于 2019-12-02 22:48:42
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 credentials in my source tree (for obvious reasons) and would prefer to use a Context defined DataSource via JNDI as I have for every other RDBMS I have used for any other purpose in every other servlet project I have developed. How do you configure a Shiro JDBCRealm to obtain its DataSource from JNDI? Les Hazlewood Vrushank's answer was really

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

て烟熏妆下的殇ゞ 提交于 2019-11-30 10:52:01
问题 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 working fine, if I leave the digest algorithm as plain text. However when i try to use SHA-256 for digest algorithm, it stop working. What I did is specify in Glassfish - Security - Realm - jdbcRealm - digest that I want SHA-256 (I just type SHA-256

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

南笙酒味 提交于 2019-11-30 05:43:33
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 Glassfish 3.1.1. Thank you for your assitance also in advance. I was also looking for answers to my questions and found some useful examples which I put also at the bottom of the message. I tried to follow them so the present state of the configuration can contain details from these samples but they did not solve the problem. -File-based

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

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 22:40:06
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 working fine, if I leave the digest algorithm as plain text. However when i try to use SHA-256 for digest algorithm, it stop working. What I did is specify in Glassfish - Security - Realm - jdbcRealm - digest that I want SHA-256 (I just type SHA-256 inside digest field). Then I wrote a simple Java program to convert password text into SHA-256 hash. I

JDBC Realm Login Page

戏子无情 提交于 2019-11-28 13:01:12
i tried to create a login page using JDBC realm but did not works. My steps : Create database, user and group table Create connection pool and data source, custom realm. Add security roles mapping, login constraint, security constraint and security roles. Create login jsp and login servlet I can ping the connection pool during creation. What is the minimal configuration require to perform the above task ? My Code : create table login ( username varchar(128) NOT NULL CONSTRAINT usernamePk primary key, password varchar(128) NOT NULL ); insert into Login values('peterwkc', '1234'); create table

LoginException: Login failed: Security Exception

﹥>﹥吖頭↗ 提交于 2019-11-27 22:26:30
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: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception WARNING: Exception com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:394) at com.sun.enterprise.security.auth.login.LoginContextDriver.login

Accessing secure restful web services using jersey client

余生长醉 提交于 2019-11-27 19:11:17
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 mapped web.xml and sun-web.xml accordingly. My web services are secured successfully; as I access the web site I receive a security warning and then I am prompt to give username and password to access any content of the website. It is working fine when accessed via web browser. Now I have written a simple client based on jersey and tried to access the

Migration from glassfish 4.0 to Glassfish 4.1.1 - JDBC Realm issue

╄→гoц情女王★ 提交于 2019-11-27 09:49:42
I have this security configuration in Glassfish domain.xml which works for 4.0 but fail in 4.1.1 can someone help to identify what is wrong. The only difference is the class package "ee" GF 4.0 (with extra ee ) <auth-realm classname="com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm" name="authentication-realm"> <property name="jaas-context" value="jdbcRealm"></property> <property name="password-column" value="password"></property> <property name="datasource-jndi" value="jdbc/SomeDS"></property> <property name="group-table" value="v_user_role"></property> <property name="charset" value=

JDBC Realm Login Page

微笑、不失礼 提交于 2019-11-27 07:29:57
问题 i tried to create a login page using JDBC realm but did not works. My steps : Create database, user and group table Create connection pool and data source, custom realm. Add security roles mapping, login constraint, security constraint and security roles. Create login jsp and login servlet I can ping the connection pool during creation. What is the minimal configuration require to perform the above task ? My Code : create table login ( username varchar(128) NOT NULL CONSTRAINT usernamePk

LoginException: Login failed: Security Exception

我的梦境 提交于 2019-11-26 20:59:18
问题 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: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception WARNING: Exception com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception at com.sun.enterprise.security.auth.login.LoginContextDriver