context 1 « Security « Spring Q&A





1. Can I have multiple security contexts with spring security?    stackoverflow.com

I have one security context definition that uses PreAuthenticatedProcessingFilterEntryPoint for the flex part of my application. How can I have another definition that will use standard form login with html forms ...

2. Sharing Spring Security Configuration Between Applications    stackoverflow.com

I'm brand spanking new at Spring and have gotten a majority of the knowledge I do have from the Spring Recipes book from Apress. I've got LDAP authentication working with Spring Security ...

3. Spring Security Child Thread Context    stackoverflow.com

So I'm working on this Spring MVC application using Spring Security. I've been hitting a performance problem in some instances where my controller is taking way too long to respond. This ...

4. org.hibernate.HibernateException: No session currently bound to execution context    stackoverflow.com

I'm trying to integrate Spring Security with Hibernate. I'm new to both technologies so I'm almost certainly taking too many steps at once here, but I'm at the point where I ...

5. Spring application context : access web.xml context-params?    stackoverflow.com

Greetings , Is there any way to get values from web.xml context-param into Spring context? For example I define the value in web.xml as :

<context-param>
  <param-name>compass-index</param-name>
  <param-value>file:///home/compass/index</param-value>
</context-param>
And I want to ...

6. Comparing Struts 2 Iterator Objects with Spring Security Context    stackoverflow.com

Suppose that I am using the Struts 2 iterate tag on a list of objects. Each object has a property called creatorUserId. I would like to compare the creatorUserId with the Id ...

7. How to access sprint context in jUnit tests annotated with @RunWith and @ContextConfiguration?    stackoverflow.com

I have following test class

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"/services-test-config.xml"})
public class MySericeTest {

  @Autowired
  MyService service;
...

}
Is it possible to access services-test-config.xml programmatically in one of such methods? Like:
ApplicationContext ctx = somehowGetContext();

8. bean reference with two Spring config context XML files    stackoverflow.com

I always get it worked when reference to a bean in an other Spring context XML file but this time is doesn't work: springapp-servlet.xml:

 <!-- Spring Controllers -->
<b:bean id="loginSpringController" class="com.foo.bar.controllers.spring.LoginController"/>
<b:alias name="loginSpringController" alias="loginSprController"/> ...

9. Accesing spring context from jaas LoginModule    stackoverflow.com

I've implemented a Jaas Login Module, in order to perform authentication. I must access database to retrieve user/pass information within this module. In the same project, there exists some DAO bean's implemented, ...





10. How to set a local variable in application-context.xml to represent a repeating value?    stackoverflow.com

If the president changes, I would have to change the value of presidentName three times below in the application-context.xml:

<beans:property name="presidentName" value="Barack Obama" />
Is there a way to set variable once in ...

11. NullPointerException while accessing instance of application context in business logic. How to access an instance of application context?    stackoverflow.com

Looking out for your valuable suggestion/inputs. Below are the actual xml files - ApplicationContext and JobSchedulerServiceContext. --- ApplicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="applicationContextImpl" class="com. services.ApplicationContextImpl" scope="singleton">
<property name="dataAcquisitionService">
<ref bean="dataAcquisitionService" />
</property>
<property name="equipDataAcquisitionService">
<ref bean="equipDataAcquisitionService" ...

12. What is the meaning of Subject vs. User vs. Principal in a Security Context?    stackoverflow.com

In the context of security frameworks a few terms commonly occur Subject, User, Principal I have not been able to find a clear definition of the difference between Subject and User, ...

13. Spring security context using cookie    stackoverflow.com

I need to use the cookies instead of httpsession with spring security. Does anyone has idea that this is possible? If it is so pleas send me some resource. Exactly what i ...

14. Access Spring Web MVC Exception Resolver from Spring Security Context    stackoverflow.com

I have a Spring Web MVC configuration with a SimpleMappingExceptionResolver in it to handle some access exceptions:

<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver" p:defaultErrorView="uncaughtException">
    <property name="exceptionMappings">
        ...

15. How can I access database from spring application context XML?    stackoverflow.com

I have some beans that need to use another bean that must be loaded from database. I use Hibernate and have a DAO annotated with @Repository. I managed to do it defining ...

16. Need to trust all the certificates during the development using Spring    stackoverflow.com

I read this very useful article about disabling all the https certificates programmatically. I need such approach only in the development. And I'm using Spring. So does anybody have ...





17. How to use the spring-security filters without an application context?    stackoverflow.com

I want to use the spring-security web-filters without a spring application-context (or spring container) straight from java code. Is this possible? Can I call the different spring live-cycle methods directly and if ...

18. How to set security context in session using Spring Security 3?    stackoverflow.com

In my application, I am setting the roles in my Spring Controller like the code given below

SecurityContext securityContext = SecurityContextHolder.getContext();   

List<GrantedAuthority> roles = new ArrayList<GrantedAuthority>(); 

roles.add(new GrantedAuthorityImpl(role));   ...

19. Recommended way to access Spring Context in a JMS Listener    stackoverflow.com

I am working in a Web Application running in JBoss that utilizes Spring and whenever requests come into the application our web layer gets access to the Spring ApplicationContext via

ApplicationContext ...

20. How to enable Spring Security Annotations not using app-Context.xml file?    stackoverflow.com

Hi I've implemented my Application using SecurityContextImpl as SecurityContext. anything works well (Authentication and Authorization). Now I want to use Spring Security Annotations (@Secured , ...) , I my searched result in a ...

21. Declaring Spring Bean in Parent Context vs Child Context    stackoverflow.com

I have a spring bean (dao) object which I instantiate in my ServletContext via the following xml:

<bean id="userDao" class="com.company.dao.impl.UserDaoImpl">
    <property name="sessionFactory" ref="sessionFactory" />
</bean>
This bean is declared inside my ...

22. Spring-Security.xml context file and '&' character in an Sql Query    stackoverflow.com

while trying to customize Spring Security queries , I'm in a need to use a query like this : Select ... from ... group by hex(conv(id,16,10) & 0x0fffffff) but I ...

23. Spring MVC, Spring Security and Hibernate cannot autowire properties between contexts    stackoverflow.com

I am using Spring MVC 3.0.6 and Spring security 3.0.7. I cannot @Autowire the RoleDao class to my user class when in the security context. my web.xml file:

    <context-param>
 ...

24. Exposing current user in @Publisher/@Payload context    forum.springsource.org

Hey there, I'm just starting out with spring integration and would like to use the AOP stuff to do some basic auditing. Is there a way to easily expose the user ...

25. Spring security proxying ALL beans in a context?    forum.springsource.org

Spring security proxying ALL beans in a context? We recently came across the issue where security wasn't working on our classes which implemented interfaces, where the method wasn't in the interface. ...

26. Mapping of roles in context.xml to users    forum.springsource.org

I'm working on using an LdapAuthenticationProvider to define a user's roles based on Ldap user groups. Which Spring security class actually does that mapping? Is it something that we can override? ...

27. Accessing username in application context    forum.springsource.org

Accessing username in application context I've got an audit object that is used to audit changes made to other objects. Within that audit object I'd like to have access to the ...

28. Spring security context using cookie    forum.springsource.org

Hi, I need to use the cookies instead of httpsession with spring security. Does anyone has idea that this is possible? If it is so pleas send me some resource. Exactly ...

29. security.context.rmi.ContextPropagatingRemoteInvoc ation with Jython    forum.springsource.org

security.context.rmi.ContextPropagatingRemoteInvoc ation with Jython Firstly, not sure if this is the right place to past this, forum admin please move if not right. Before I ask the question I will give ...

30. Issue with spring context loader detecting spring-security-web package on classpath    forum.springsource.org

May 14th, 2011, 05:01 PM #1 NKrypt View Profile View Forum Posts Private Message Junior Member Join Date Apr 2008 Posts 4 Issue with spring context loader detecting spring-security-web package on ...

31. Swing client security context    forum.springsource.org

Swing client security context hi, i've got a problem with using spring security on a java swing client. there is a web server providing remote methods using Code: HttpInvokerServiceExporter . all ...

32. different type conversion for xml context files and user data    forum.springsource.org

different type conversion for xml context files and user data Hi I am playing with Spring Webfow and Type conversion. After thorough reading of reference guide , i defined my own ...

33. Sharing Security Context in EAR    forum.springsource.org

Sharing Security Context in EAR Hi all, Im using Spring Security 2.0.5, I have an ear file with four war files. I want to share a security context among mulitple web ...

34. Acegi, Spring Context / DispatcherServlet / authz.tld    forum.springsource.org

Acegi, Spring Context / DispatcherServlet / authz.tld Hi, I'm adding Acegi to an existing Spring MVC application. I have the user authenticating working (if I enter Valid/Invalid users/passwords it forwards to ...

35. Security Context problem with multiple threads    forum.springsource.org

Nov 24th, 2011, 10:50 AM #1 rc123 View Profile View Forum Posts Private Message Junior Member Join Date Jul 2011 Posts 17 Security Context problem with multiple threads Hi I am ...

36. Security Context Holder Jspx    forum.springsource.org

I assume you mean the name from the principal (there is not getName() on Authentication). You can use the Spring Security authentication tag to access properties on the Authentication object. For ...

37. SPRING_SECURITY_CONTEXT not stored in session until http response has been delivered    forum.springsource.org

SPRING_SECURITY_CONTEXT not stored in session until http response has been delivered Almost always our springsecurity 3.0.6 configuration works great. However, under some load, our tomcat-6/container instances acts strangely (incorrectly?) with springsecurity ...

38. How to hold the authentication in a centralized context    forum.springsource.org

How to hold the authentication in a centralized context Hi, I have the following challenge: - I want to secure several webapps. Each one must run in a different web browser, ...

39. Ermmm... database access? Context initialization failed    forum.springsource.org

Jul 19th, 2005, 12:42 AM #1 Ryders View Profile View Forum Posts Private Message Junior Member Join Date Jul 2005 Posts 1 Ermmm... database access? Context initialization failed G'day all! I ...

40. Updating another user's secure context    forum.springsource.org

Updating another user's secure context Hi, I've followed principles outlined in: http://forum.springframework.org/showthread.php?t=14039 for user self-service password changes. I do (1) update datastore (2) remove user from cache (3) update local contextholder. ...

41. Securing Context Config    forum.springsource.org

I'm interested in preventing a customer from overriding the wiring declared in the spring context config file ( bean definitions ). How do you typically deliver a spring based application and ...

42. How to access beans created in command-context.xml    forum.springsource.org

How to access beans created in command-context.xml I'm trying to configure toolbar commands (see this thread http://forum.springframework.org/showthread.php?t=17521) and I'm running into a dead end. How can I access the beans defined ...

43. /j_acegi_security_check & Context    forum.springsource.org

Is there a way to specify that the URLs such as /j_acegi_security_check are linked to the application's deployed context? My problem is that I wish to make a product that uses ...

44. Using ACEGI authorization outside of spring context (exposing as a service)    forum.springsource.org

Using ACEGI authorization outside of spring context (exposing as a service) I want to expose decision making as a service-tier feature of my system - so that any system could arbitrarily ...

45. Securing DB connection details in the app context    forum.springsource.org

Securing DB connection details in the app context hi all. I couldn't find a match here, so here's the question. Now the system, I am looking at has the following set-up: ...

46. User role context scenario    forum.springsource.org

User role context scenario Hi, I am looking for an elegant way of implementing with ACEGI a scenario like this: User J.Doe has got for ----Organisation_A the following roles --------ROLE_1 ----Organisation_B ...

47. Security Context Propogation    forum.springsource.org

Security Context Propogation I have seen many thread regarding this topic but I am still not clear on that. In our case we have a web application which makes an ejb ...

48. Acegi and Context initialization failed with Error creating bean    forum.springsource.org

May 23rd, 2006, 07:22 AM #1 shavash View Profile View Forum Posts Private Message Junior Member Join Date May 2006 Posts 3 Acegi and Context initialization failed with Error creating bean ...

49. Access application context from code without servlet context    forum.springsource.org

Access application context from code without servlet context Hi I'm designing a pretty straight-forward web application. As we'll have approx. 40-50 business classes and around 50 DAO implementation classes, I'd like ...

50. Context initialization failed - new user    forum.springsource.org

Jun 5th, 2006, 07:51 PM #1 ewulff View Profile View Forum Posts Private Message Junior Member Join Date Jun 2006 Posts 5 Context initialization failed - new user win XP tomcat ...

51. Security context null after logging out and logging in    forum.springsource.org

Security context null after logging out and logging in I have a class that implements HttpSessionBindingListener so that when I log out, I can just invalidate the session, then within the ...

52. Setting Security Context in Multi Threaded application    forum.springsource.org

Setting Security Context in Multi Threaded application Hello All, I m fairly new to Acegi Framework and currently working on a user management module of a spring based application. This module ...

53. access context files in jar    forum.springsource.org

Do you plan to allow to choose context files that are in dependent jars ? I am in this case. The context of my project need some context files that are ...

54. How to access Spring context from EJB?    forum.springsource.org

I have an EJB and need access the user info which is available only in Spring context. Can anyone tell me which object/method in Spring that I can use to get ...

55. Acegi/Tomcat Error : Error listenerStart. Context startup failed due to previous err    forum.springsource.org

Hello guys i am a rookie about acegi , and i did a research in this forum and i found this excelent link with 2 examples - one for web and ...

56. ROLE_ bean not found in app context...    forum.springsource.org

ROLE_ bean not found in app context... Well... probably an easy one for the ones that know... Code: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ROLE_USER' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:368) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:741) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) ...

57. How to access application context from a filter ?    forum.springsource.org

In the init() method you get a FilterConfig object as parameter which you can query for the ServletContext. That in turn can be passed into the WebApplicationContextUtils#getWebApplicationContex t() method which yields ...

58. ACEGI_SECURITY_CONTEXT and Struts    forum.springsource.org

Hello to everybody, How I can get UserDetails through Struts. I'm using but I can't get properties such as username or even principal Can anybody help me? ...

59. How to access DispatcherServlet's context from another Servlet?    forum.springsource.org

How to access DispatcherServlet's context from another Servlet? Basically what I'm trying to do is to add Spring-based services into an existing servlet application. I'm not really happy about the idea ...

60. Multiple security contexts?    forum.springsource.org

Multiple security contexts? I am writing a web application, which is secured by Acegi, that gets some of its data from a client/server app that my teammate wrote which is also ...

61. Static Access to non-root Application Context    forum.springsource.org

Static Access to non-root Application Context Hi, The WebApplicationContextUtils class has a convenient method for accessing the root application context: public static WebApplicationContext getWebApplicationContext(ServletContext sc) This is nice, but is there ...

62. how to access objects from application context    forum.springsource.org

I m new to spring. trying to create a webapplication. configured the contextloader lister and contextconfig location in the web.xml. i do have applicationcontext.xml with bean definitions. if some one could ...

63. Authorisation handling in other webapp if no secure context?    forum.springsource.org

Authorisation handling in other webapp if no secure context? Hi all, If time was no concern, I would just try to think of a solution myself, but I'm on a tight ...

64. Security Context Shared between two web applications    forum.springsource.org

Security Context Shared between two web applications we have two web applications (login.war and members.war) in one ear file deployed. When the user types in /members/index.jsp the user is redirected to ...

65. Access to Application Context from non spring managed beans    forum.springsource.org

Access to Application Context from non spring managed beans Hey folks, I'm in the process of adding Spring into a two year old (and still in development) application. Due to the ...

66. sequence of Acegi + MVC context loading    forum.springsource.org

I am using acegi in combination with spring mvc. Now I would like to introduce a reference from the acegi spring context to the mvc context. This isn't working (BeanCreationException: ... ...

67. Acegi + remoting, context propagation    forum.springsource.org

Acegi + remoting, context propagation Hi, i am using acegi 1.0.4. And i have a server applicacion and a client applicacion. Both java applicacion. I the server i export two services, ...

68. Security context propagation using Http Invoker    forum.springsource.org

Security context propagation using Http Invoker Hi all and thanks in advance, I export my remote services using http-invoker. I'm able to login successfully using Acegi, however later requests throw AccessDeniedException. ...

69. J2EE security context to Acegi context    forum.springsource.org

Aug 9th, 2007, 11:45 AM #1 filot View Profile View Forum Posts Private Message Member Join Date Aug 2007 Posts 42 J2EE security context to Acegi context Hello all, I want ...

70. Security based on dynamic context    forum.springsource.org

Security based on dynamic context Hi, I am working on a little project for myself to learn about frameworks such as Spring and Hibernate. Now I am at a point where ...

71. ws + acegi + context propagation    forum.springsource.org

ws + acegi + context propagation Hi i am using axis2 for webservices implementation in spring, and acegi security (in the server side) for authentication and authorization. I export some services ...

72. Problem in Security Context    forum.springsource.org

Problem in Security Context Hi, We are facing a strange problem in our application. I am describing the scenario below ... 1. Login Page we have a link called "Register" where ...

73. How to access spring application context from another servlet(not in spring context)?    forum.springsource.org

How to access spring application context from another servlet(not in spring context)? Hi, I need write a simple servlet which needs access some beans in spring application context/web app context. Since ...

74. Acegi_security_context_key    forum.springsource.org

Hi, I have a webapp which contains a "legacy" part (Servlets, Filters etc) and a spring part (Controllers). For authentication the spring part uses FilterToBeanProxy and the legacy part uses a ...

75. Configuring the Acegi Application Context file    forum.springsource.org

Configuring the Acegi Application Context file I've got some issues according to configure the Acegi application context file properly. For some reason, when I type "http://localhost:8080/ReiseloggSpring2/search.do" or "http://localhost:8080/ReiseloggSpring2/regMenu.do"in the address window ...

76. Authorizing access to domain objects in an AbstractMarshallingPayloadEndpoint context    forum.springsource.org

Authorizing access to domain objects in an AbstractMarshallingPayloadEndpoint context I have a use case where a user should only have access to certain domain objects. The user has already been authenticated ...

77. can't start app context without internet access    forum.springsource.org

can't start app context without internet access I would like to use the core spring framework within our desktop application. I have started to integrate the application context into our app, ...

78. Access property placeholder across context files    forum.springsource.org

BeanFactoryPostProcessor work only on the beans in the same ApplicationContext. It does not operate on beans defined in child contexts. So nothing mysterious about it it is actually intended behavior, which ...

79. webstart. application cannot be started in secure context    forum.springsource.org

webstart. application cannot be started in secure context Hi I have a problem starting my client in a secure context when I use spring. Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError at org.springframework.util.ClassUtils.(Class ...

80. How to Access Spring Application Context from within Bundle    forum.springsource.org

How to Access Spring Application Context from within Bundle Hi, According to my understanding of Spring Dynamic Modules, the extender bundle will instantiate a Spring application context for my "Spring-powered bundle". ...

81. Access application context from another application (EAR)    forum.springsource.org

Access application context from another application (EAR) I have two applications installed on WAS. let's say that A.ear and B.ear. Each application has three layers: Communication, Service and DAO. DAO layer ...

82. Spring Security Howto Update Context    forum.springsource.org

Hi, when i for example delete the current user which is logged in i'm still able to do everything until i logout and retry to login. How can i update the ...

83. How to Access Bean bean exist in another context file(XML file)    forum.springsource.org

I suggest you read the reference guide regarding ApplicationContext hierarchy. In short, if you have a parent and child relation ship the child can see the beans in the parent, but ...

84. Sharing Security Context between multiple web applications    forum.springsource.org

Sharing Security Context between multiple web applications Is there anyway to share a security context among mulitple web applications? I have multiple web applications running in the Spring DM environment and ...

85. Access spring context in log4j appender    forum.springsource.org

Hi all, Apologies if this is a novice question. I've some custom log4j appenders in my application & i need access to the spring context in them so that i can ...

86. MVC: Display Message to User When Event is Published to Context    forum.springsource.org

MVC: Display Message to User When Event is Published to Context Hello all, I am trying to solve what I first thought was a trivial problem but it seems a bit ...

87. How to add Custom AuthorizationDao to Security Context?    forum.springsource.org

How to add Custom AuthorizationDao to Security Context? Hi, I though of modifying the org.springframework.security.userdetails.jdbc.Jdbc DaoImpl so that I can include additional user data like company,email. But I couldn't find a ...

88. Security config in parent context    forum.springsource.org

Security config in parent context We have a project where the modules are layered in different contexts in a hierarchical fashion much like an "extended" version of the blog.springsource.com/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-spring-application/ strategy (add ...

89. Problem with "multi-threaded" security context    forum.springsource.org

Problem with "multi-threaded" security context We have a Web Services project which utilises services exposed by separately deployed application. The services are accessed via httpinvoker, and it works a treat. Authentication ...

90. Security Context Propogation    forum.springsource.org

Security Context Propogation Hi I am currently running a web service client using Wss4jSecurityInterceptor (Spring-ws 2.5.6). This requires me to store a username / password in the Spring file and set ...

91. propagating j2ee security context    forum.springsource.org

I'm trying to use spring-integration in a spring-webmvc application, which uses out-of-the-box j2ee security (form login configured in web.xml). The backend is EJB3, with methods secured via annotations. When a secured ...

92. SAX Parse exception when loading security context    forum.springsource.org

SAX Parse exception when loading security context I am just trying to do a simple test using the sample tutorial. I cannot get past this error, I am using the security ...

93. Re-use HTTP Basic authentication in another context?    forum.springsource.org

Re-use HTTP Basic authentication in another context? Hello! We do have 2 WEB applications: 1) the "/" one, which is protected by Acegi and uses FORM authentication 2) the "/admin" one, ...

94. Access servlet context in config    forum.springsource.org

Access servlet context in config Hello springers, I am trying to configure a service that extends JdbcDaoSupport from within the xxxx-servlet.xml configuration file. The service needs to know the URL of ...

95. Access application Context in quartz Job    forum.springsource.org

Access application Context in quartz Job Hi, I am using MethodInvokingJobDetailFactoryBean to create a job details on a bean managed by spring. How do I access application Context in my bean ...

96. "remember-me" doesn't put SPRING_SECURITY_CONTEXT into the session    forum.springsource.org

Hi all. I use such EL expressions to put user information on my JSPs: Code: ${SPRING_SECURITY_CONTEXT.authentication.principal.username} and I got the following trouble (steps to reproduce): I am logging in with a ...

97. Cleared security context due to UsernameNotFoundException    forum.springsource.org

Cleared security context due to UsernameNotFoundException Greetings, I'm new in the Spring world and I'm having a hard time to get the grasp on the Acegi security features. After taking some ...

98. Forwarding security context    forum.springsource.org

Forwarding security context Hi, I'm trying to find out how I can forward the security context (with authenticated user credential) to another server: - Server A receive a request from a ...

99. How do i get the principal object that is in the security context from freemarker?    forum.springsource.org

How do i get the principal object that is in the security context from freemarker? How do i get the principal object that is in the security context from freemarker? I ...

100. Maintaining Security Context Between Multiple Processes    forum.springsource.org

Maintaining Security Context Between Multiple Processes I am working on a large distributed application which over time has had a number of different applications merged with it. Most of the components ...