Comments (3)
GWA said:
It's true this is a little odd compare to all other authentication provider I know
Anyway, in the SAMLAuthenticationProvider there's a comment on the getPrincipal method that insist that the method can be override
In your project you can declare a provider like this one instead of the vanilla SAMLAuthenticationProvider. This will do exactly what you need.
public class PersonalSamlAuthenticationProvider extends SAMLAuthenticationProvider{
/**
*
* @param consumer
*/
public PersonalSamlAuthenticationProvider(WebSSOProfileConsumer consumer) {
super(consumer);
}
/* (non-Javadoc)
* @see org.springframework.security.saml.SAMLAuthenticationProvider#getPrincipal(org.springframework.security.saml.SAMLCredential, java.lang.Object)
*/
@Override
protected Object getPrincipal(SAMLCredential credential, Object userDetail) {
if (userDetail!=null){
return userDetail;
}
return super.getPrincipal(credential, userDetail);
}
}
from spring-security-saml.
Mandus Elfving said:
I am aware that you can always override the authentication provider, but it seems a bit odd that the SAML extension behaves in a way that isn't consistent with the other authentication methods.Therefore I think it should be considered to change the SAML extension to behave as the others do.
from spring-security-saml.
Vladimir Schäfer said:
Behavior of principal field is now identical to AbstractUserDetailsAuthenticationProvider. By default userDetail object is now put to the principal field of the Authentication object. Previous behavior can be enabled by setting property forcePrincipalAsString to true on the SAMLAuthenticationProvider.
from spring-security-saml.
Related Issues (20)
- Apache HttpClient3.1 has a security vulnerability while using SAML2 authentication in Grails4 HOT 1
- Depenedencies can not be loaded since repo.spring.io got restricted HOT 1
- java 11 compatability HOT 1
- wrongly setting empty to a null Set<String> HOT 1
- Upgrade to secure version of Apache Velocity HOT 3
- VelocityFactory sets invalid properties
- Update Venocity for CVE-2021-29425 Mitigation
- how to handle URL encoding in SAML response HOT 1
- spring-security-saml2 opensaml v.2 dependency conflict with opensaml v.3 HOT 1
- SAMLDefaultLogger logs warning errors on INFO level HOT 1
- Dependency cycle with SAMLEntryPoint HOT 2
- org.springframework.security.saml2.provider.service.authentication.Saml2RedirectAuthenticationRequest is not serializable HOT 1
- login sometimes is only possible at the second click HOT 1
- Compatibility with Spring 6 HOT 5
- CSP issue velocityTemplateId on HTTPPostBinding
- Update esapi version for vulernability CVE-2022-23437 to 2.2.3.0 or greater
- EmptyStorageFactory Questions for Replay Prevention HOT 1
- Update esapi version for CVE-2022-23457 HOT 3
- MetadataManager returns random idp from the list of registered
- Why is the Subject of the Assertion required?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-security-saml.