Git Product home page Git Product logo

pateluday07 / saml-sso-and-slo-demo-idp-azure-sp-springboot Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 27.0 518 KB

This project is to demonstrate how we can implement Single Sign-On (SSO) and Single Logout (SLO), by taking advantage of these resources: 1. Azure AD (Active Directory) as IDP 2. Springboot as SP 3. SAML (Security Assertion Markup Language) as SSO & SLO METHOD

Java 83.25% CSS 1.87% HTML 14.88%
azure-idp saml slo spring-boot sso

saml-sso-and-slo-demo-idp-azure-sp-springboot's People

Contributors

pateluday07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

saml-sso-and-slo-demo-idp-azure-sp-springboot's Issues

Azure AD iDP for external applications

I have this question for you:

Is it possible to use Azure AD as iDP for external application coming from the Gallery or even configured manually when you use AD Connect with ADFS On-Premises?

To make if clear, we do not use Password Hashes or passthrough with SSO but Federated services with our AD Connect On-Premises (no user data stored in the cloud).

Thanks in advance,

Kind Regards,

SSo time out issue saml/sso

Hi Uday,
Thank you for sharing the knowledge and sharing the code. I followed the instruction and able to run your code properly. But inactivity of the 2-hour request redirect to "http://localhost:8080/saml/SSO" ANd on the backend, I am getting this error:

authentication.CredentialsExpiredException: Authentication statement is too old to be used with value

I had tried some other sample codes as well but facing the same issue every time.

Can you please guide me on how to fix this problem?. All I want to re-log in user after the session is time out. I will really appreciate any help I can get. Thank you in advance.

Current authentication instance from security context is null

Hi, after I login successfully with SSO the application doesn't go forward to the landing page, but it loops on the discovery page because this instruction
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
returns always null.
Could you give me some ideas about what could be the cause of this behaviour ?
TIA
D.

Signature trust establishment failed for metadata entry

Hi Uday,
Thank you for sharing the knowledge and sharing the code. I followed the instruction and i am getting below error..
2021-07-21 15:32:45.494 ERROR 17584 --- [ main] o.o.s.m.p.SignatureValidationFilter : Signature trust establishment failed for metadata entry https://sts.windows.net/##################/
2021-07-21 15:32:45.495 ERROR 17584 --- [ main] .s.m.p.AbstractReloadingMetadataProvider : Error filtering metadata from https://login.microsoftonline.com/#########c9a/federationmetadata/2007-06/federationmetadata.xml?appid=#####################

org.opensaml.saml2.metadata.provider.FilterException: Signature trust establishment failed for metadata entry
at org.opensaml.saml2.metadata.provider.SignatureValidationFilter.verifySignature(SignatureValidationFilter.java:327) ~[opensaml-2.6.6.jar:?]

I have giver correct
service.provider.entity.id:

idp.metedata.url:

In application YAML file

Tests fail

From a clean copy of the repo, I enter some dummy values in application.yaml, then run:

mvn clean package

There are numerous test failures with IllegalArgumentException, such as:

Could not resolve placeholder 'service.provider.entity.id' in value "${service.provider.entity.id}"

I tried the following fixes:

  1. copying src/main/resources to src/test/resources

  2. adding the following clause to in pom.xml


    ${project.basedir}/src/test/resources
    true


    ${project.basedir}/src/main/resources
    true

but neither approach worked. Can you help?

AADSTS50011: The reply URL is not valid

Hey,

Where do I configure the reply URL in the application? As of now, we have configured the Reply URL as AD side and it works for localhost:8080 only.

The moment we deploy the app on the server and change the reply URL to https://servername/appname i keep getting the below error

image

In my application.properties this is all that I have specified

#SSO
service.provider.entity.id=AppName
idp.metedata.url=https://login.microsoftonline.com//federationmetadata/2007-06/federationmetadata.xml?appid=d0f386-7e70-49c1-b4f7-XXXXXXXX
saml.keystore.password= password
saml.private.key.alias= alias
saml.private.key.password: password
saml.keystore.file=classpath:/saml/dev/samlKeystore.jks

Spring boot version is 2.5.5

Thnks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.