42

I am beginner to the SAML v2.0 technology and I get the theory knowledge but I didn't find any examples on Google. Can anybody provide me with a step by step example for simple "SAML for v2.0".

  1. Upto now I've gone through the theory part,i.e.., it support Single sign on and
    also I understood about the Service provider and Identity Provider .
  2. Presently I am working on Linux Environment
  3. I need basic example in step by step manner how the request is moving from user -> Identity Provider->Service Provider and how to configure the environment .
  4. Is it possible to execute the example for the SAML v2.0
  5. Is their any chance to execute SAML example in Java language,If it possible you can
    provide the example on Java also.
mavis
  • 3,100
  • 3
  • 24
  • 32
user2779075
  • 421
  • 1
  • 4
  • 4
  • 3
    You should provide more details. What language/platform, what have you tried so far, what elements of the theory you know already. The question is likely to be closed if you don't put more effort into it. – Wiktor Zychla Sep 14 '13 at 11:44
  • I think this question shows a lot of effort – danday74 Apr 28 '17 at 13:16

3 Answers3

31

Typical SSO with SAML is something called Web SSO Profile. There are many products supporting this on the market for example OpenAM, Shibboleth, OpenSAML and Oracle Identity Federation. The specific configuration is dependant on what product you choose to use. A working example of OpenSAML that I use in my book is availible here.

On a SAML level, the SP and IDP exchanges Metadata which contain configuration information on how the SP and IDP want to communicate.

SSO is then done in four steps:

  1. SP sees that the user does not have an authenticated session.
  2. The SP redirects the user to IDP with a SAML AutnRequest as an URL parameter.
  3. The IDP authenticates the user and redirects it back to the SP with an artifact in URL parameter.
  4. The SP exchanges the Artifact for an Assertion over SOAP using a ArtifactResolveRequest to the IDP.

If you want to code this yourself in Java, you can use OpenSAML. On my blog I have many examples on how to use it.

In my book, A Guide To OpenSAML, I write alot about this

EDIT New edition of the book is out, covering OpenSAML v3

Stefan Rasmusson
  • 5,445
  • 3
  • 21
  • 48
  • 1
    Hi,thank you for your response..Can any one provide step by step example of saml with its configuration. – user2779075 Sep 16 '13 at 04:01
  • To use SAML you use some king of software that uses the SAML protocol. Are you using any software like that? – Stefan Rasmusson Jan 23 '14 at 14:29
  • Even i am looking for similar thing. I want to built my own IDP using openSAML , @Stefan can your book help me in that direction? – Sohan Apr 01 '15 at 11:47
  • The book gives an introduction to the library and shows lots of things that is common for IDP and Sp. But the book focuses more on Sp. I'm sure my book will be of help to you. – Stefan Rasmusson Apr 01 '15 at 22:55
  • @StefanRasmusson any example pertaining to android – Aniruddha K.M Jun 16 '16 at 12:41
  • Not specifically, no – Stefan Rasmusson Jun 16 '16 at 17:56
  • A new edition of the book is out, covering OpenSAML v3 https://gumroad.com/l/a-guide-to-opensaml-v3 – Stefan Rasmusson Jul 01 '16 at 07:52
  • @Stefan Link to your blog is currently broken. I am completely new to this can I get a step by step instruction to implement this using java – Jerry Oct 14 '16 at 13:13
  • I tried the link and it seems fine, if you still cant reach is try http://blog.samlsecurity.com/. It has much helpful posts. My book provides detailed and coherent instruction on how to build a service provider using OpenSAML – Stefan Rasmusson Oct 14 '16 at 18:15
  • I'm missing in the answer a real world example of how to make an SP-IDP SSO flow, which is, if I understand correctly, what the asker asked for... – AlikElzin-kilaka Oct 23 '18 at 18:27
  • Problem is that most configuration is very dependant on what software you use. However I added a brief decsription of SAML metadata used for configuration and a working example of OpenSAML which I use in my book – Stefan Rasmusson Nov 19 '18 at 07:47
6

You can simply follow steps in this manual, which will help you create a simple SAML 2.0 federation between a local Service Provider and a public Identity Provider.

Once you set this up you can use it to follow messages sent between IDP/SP and also as an example of a SAML component built with Java + OpenSAML + Spring.

There are also many other good sources of information on SAML, like the Stefan's blog mentioned above.

Vladimír Schäfer
  • 15,375
  • 2
  • 51
  • 71
0

enter image description here

What is Single Sign-On:

Single Sign-On is a standardized concept that allows an end-user to access multiple, related but independent, software applications using a single point of entry. It means that an end-user can log into a system only once and then access multiple applications without logging in again. The authentication process can be merged into a single component, which acts as a gateway for every other application. It basically manages the identity of end-users in an effective and secure way.

For more information Read more