spring-security

spring security AuthenticationManager vs AuthenticationProvider?

Can someone tell me different between an AuthenticationManager and an AuthenticationProvider in spring security? How are they used and how are they called. It is my understanding that a SecurityFilter will call the AuthenticationManager to authentication an Authentication object? But then where does the AuthenticationProvider come into ...

How to set up Spring security to authenticate signed requests?

Hi Does spring support authentication of signed requests? (like those provided by open social Signed authorization ,i.e open social makeRequest API) if so, how do you configure it? Best Regards Yaniv ...

Short-cut/Bypass Spring Security 2.0 authentication using custom AuthenticationManager

For an existing working app, I want to provide a secondary AuthenticationProvider, probably with a DaoAuthenticationProvider. Let's say it's for authenticating a "back up" password, or a prior password that was changed due to strict password policies and the user forgot the new password. ;-) For proof of concept, what would the implemen...

Google App Engine - Spring Security Issue (java.security.AccessControlException)

I'm currently getting the AccessControlException below when I deploy to app engine (I don't see it when I run in my local environment). I'm using GAE 1.3.1, Spring 3.0.1, and Spring Security 3.0.2. Any ideas how to get around this issue? It appears to be an issue with Spring Security trying to get the system class loader, but I'm not sur...

Spring Security in a distributed application.

We recently upgraded our application to Spring 3.0 and Spring Security 3.0. Apart of the additional work we want to do is to separate the backend from the front end for various reasons. We plan to use Spring's transparent RMI solution for exposing our services to our front end. However, the way things are designed today both the front an...

java getSession().setAttribute()

I have to make a litle change to an existing project(tomcat and java WebApplication). now, in loginForm, if users type correct login and password, it is Ok, to users wil be shown main page. But when any user types incorrect password, or may be his account is temporarily locked, so to user again wil be shown loginform, user can not know...

How do i use "Remember Me" autentication with Spring Security and LDAP?

Dear Sirs, I want to use a Spring Security's "Rememeber me" with LDAP autentication. LDAP autentication configuration is described here, I've just made a tiny changes. Could you explain me how can i add "Remember me" in that configuration? Or, may be, you can give me a sample which describe how can i do it. Thank you. ...

How to incorporate Spring security using open id into a GWT project

Well its simple, Basically I want to follow GWT's "One Page" paradigm and yet integrate Spring security into the application. What i understand that if the cookie is not found in the system, spring will redirect user to a Open id referrer page asking for login else it would simply send my server the user's open url id. This is what i tr...

Automatically authenticate a user in Sharepoint without showing the browser dialog box

I am developing a J2EE web application using spring. I need to integrate access to Sharepoint. I am able to list the folders and documents in a document library using the various webservices exposed by Sharepoint. I want to download a document directly from the Sharepoint Document Library using the URL of the document. When I try to do...

How to load roles from database for anonymous user in spring security 3 ?

Hello, I'm using Spring Security 3.0.2 and I can't find a way to load roles of anonymous user from database (I've got dynamic roles where roles can be given to everyone). I've tried to use a custom anonymousAuthenticationProvider but this provider is never called. Here is my config: <http auto-config="false"> <logout invalidate-se...

Grails and ACEGI security plugin - How to impede login from within security event listener?

I have the following event listener in SecurityConfig security { active = true useSecurityEventListener = true //... onInteractiveAuthenticationSuccessEvent = { e, appCtx -> // handle InteractiveAuthenticationSuccessEvent //how to cancel user login from here?? } } The question is, how to stop user from logging in f...

Cannot use Spring LDAP with Spring Security

Hi, I want to authenticate users against our AD so I understand that I need spring security and spring ldap. Here is what is in my POM: <groupId>org.springframework.security</groupId> <artifactId>org.springframework.security.core</artifactId> <version>3.0.0.RELEASE</version> </dependency> ... <dependency> <groupId>org.springframew...

Spring-Security 3/Spring MVC and the dreaded @Secured/RequestMapping

i had lots of problems adding Secured annotations to my Controllers. it turns out letting my Controller implement an InitializingBean was a bad idea. public class MyController implements InitializingBean { @Secured(value="ROLE_ADMIN") @RequestMapping(method = RequestMethod.GET, value = "/{id}/edit") public String getView(M...

How to authenticate a user using open Id after logging in the system

I am using Spring Security in our application My requirement intially was to allow a user to login to our application using open id. I was able to do so referring to online tutorials on using open id in Spring sercurity. eg: ... <http auto-config="false"> ... <openid-login authentication-failure-url="/FailurePage.jsp" ...

spring-security problem with loged user

Hi, i've got problem with my app, as usual.. I use Spring MVC [version: 2.5] and Security[version: 2.0.4]. My problem looks like that: First login into my app with UserA login and Password -> OK Logout UserA, UserB is login in. UserB login + password works fine, i'm in app and UserB ROLE is on. [no access for admin s...

Spring Security: autowire ProviderManager

I am trying to programatically validate a user login/pass using Spring Security, so I need to have access to the ProviderManager. I would like it to be automatically injected into my @Controller. My code looks like: import org.springframework.security.authentication.ProviderManager; ... @Controller public class MyController { @A...

Spring Security: Step by Step

Hi, I started on Spring a few months back and the Security topic seems the most complex to me. With Acegi moving into Spring I could not find a single tutorial that tells step by step way to add security to a Spring app. Please help me. My requirements are as follows: I have several roles in application, they are not hierarchical role...

How to manually query LDAP through Acegi's beans?

I have an application using Acegi (earlier version of Spring Security) and LDAP for logins. Now, a specific scenario requires me to discover user's LDAP groups at arbitrary time (not at login time). Is it possible to use already set up Acegi to handle this situation? I'm thinking of using the configured LdapAuthProvider (or LdapAut...

Bug with Spring Security 3.0.2 x Spring 3.0.1 - Proxies not being created

Friends, I have lost a few days searching the internet for an answer regarding my problem, and haven't found anything that could actually solve it. I have tried several different configurations, but still, to no avail. Here's my problem: I have an application that was working fine until I decided to add Spring Security. After I introd...

Grails Acegi: update username

Hi, I'm using the Acegi (AKA Sprign Security) plugin in my Grails app. InSecurityConfig.groovy I have added the line userName = 'email' such that the email field is used as the username. I find that if I change the email field and save the object, e.g. user.email = '[email protected]' user.save(failOnError: true) The save com...