jdbcrealm

Tomcat JDBC vs. DataSource Realm

梦想与她 提交于 2019-12-21 05:14:19
问题 For webapp testapp which has the following in its web.xml (among other things) <security-constraint> <web-resource-collection> <web-resource-name>My JSP</web-resource-name> <url-pattern>*.secured</url-pattern> <url-pattern>/login</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>mobileusers</role-name> </auth-constraint> <!-- <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user

Automatic JDBC Realm configuration

≡放荡痞女 提交于 2019-12-18 18:09:12
问题 I want to know if it's possible to create JDBC Realm configuration in Glassfish 3.1 without admin console, like creation of a Data Source with the glassfish-resources.xml . When developers download my GIT repository they don't like to configure Glassfish, it's configured in deployment time. Best regards Mounir 回答1: I'd create a shell script or batch file which runs the required asadmin commands. Here you can find a complete example: Creating JDBC Objects Using asadmin (Btw, DTD of GlassFish

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

拟墨画扇 提交于 2019-12-18 12:06:19
问题 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

Accessing secure restful web services using jersey client

不打扰是莪最后的温柔 提交于 2019-12-17 15:38:31
问题 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

Migration from glassfish 4.0 to Glassfish 4.1.1 - JDBC Realm issue

不羁的心 提交于 2019-12-17 10:09:50
问题 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"><

What is the difference between JDBCRealm and DataSourceRealm? [closed]

我是研究僧i 提交于 2019-12-11 10:39:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . 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? 回答1: Incase you don't know about why and

Tomcat 7.11 JDBCRealm and UserDatabaseRealm dont work together

南楼画角 提交于 2019-12-11 00:42:24
问题 I'm trying to set a container managerd security a realm for my web app (JSF 2.1 + hibernate). I have noticed that Tomcat 7 can only use one type of realm at a time. To use Tomcat in netbeans (7.0) i have to create an accout of manager-script role. In addition to work with Tomcat manager I also need another role. This is a big problem for me because the tables I'm using for JDBCRealm are viewes from actual tables that store users and roles and I would like not to store both of the roles in the

Configuring jdbcRealm in context.xml

[亡魂溺海] 提交于 2019-12-10 16:45:13
问题 <Context antiJARLocking="true" path="/NCellLive"> <Resource name="jdbc/Gis_WebApp" auth="Container" type="javax.sql.DataSource" username="uname" password="pword" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=Gis_WebApp;SelectMethod=cursor;" maxActive="8" /> <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver" connectionURL="jdbc:sqlserver://127.0.0.1:1433

Get instance of DataSourceRealm from a servlet

南笙酒味 提交于 2019-12-10 11:58:23
问题 I am using tomcat 8.0. I configured a realm element in the context.xml file which specifies that I will be implementing the DataSourceRealm. In addition, as per the tomcat 8 realm configuration instructions (https://tomcat.apache.org/tomcat-8.0-doc/realm-howto.html) I nested a CredentialHandler element in the realm element in order to specify attributes such as salt length and iterations. The relevant portion of the context.xml file is as follows: <Realm className="org.apache.catalina.realm

Accessing user details after logging in with Java EE Form authentication

孤街浪徒 提交于 2019-12-10 10:12:40
问题 I have implemented a Java EE security realm that redirects users to login.jsp if they try and access a protected resource. Say a user wants to go to a protected url - http://mywebapp/shopping_cart which is mapped to ShoppingCartServlet As they are not logged in Glassfish directs them to login.jsp They then enter their username and password and click Login and the information gets POSTed to http://mywebapp/j_security_check If they have entered the correct details they are then redirected to