Any java application for Shibboleth Authentication?
Asked Answered
R

1

6

I want to use shibboleth authentication for my web application. Is there any sample java application which tell how to use shibboleth authentication step by step.

I have installed shibboleth but still didn't get idea how to use it.

Randolphrandom answered 1/4, 2014 at 9:20 Comment(2)
Demos : wiki.shibboleth.net/confluence/display/SHIB2/DemonstrationSitesAspergillosis
Its a demo! I want to see an example with code where I will login through some idp. Is there something like that?Randolphrandom
T
5

I assume you have to use Service Provider

Use testshib to test your app in an easy way.

Follow the steps

  1. download and instal sp on your machine
  2. include shibboleth's configuration into your apache 2.1. into httpd.conf file add include "PATH/opt/path/etc/apache22"(if version is apache2.2, otherwise appropriate)
  3. in apache22.config file add the location you want to secure - it would be /secure bydefault
  4. in your shibboleth2.xml file (in etc folder) put your entity id(application defaults element), ex https://mywebsite.com/shibboleth - this can be anything, not neccessary a real path
  5. put entity id of your idp in sso element, in case of testshib it would be https://idp.testshib.org/idp/shibboleth
  6. in the metadata provider put idp's metadata uri to your idp's metadata urn, incase testshib it would be http://www.testshib.org/metadata/testshib-providers.xml
  7. Download your metadata from https://mywebsitehost.com/Shibboleth.sso/Metadata - here mywebsitehost would be a real host and rest path will be automatically configured by shibboleth - this path will download your sp's metadata file
  8. Upload your metadata file to testshib via register

You are ready to go. Go to https://mywebsitehost.com/secure and you should be redirected to idp to authenticate.

NOTE: Make sure you have a domain name configured with ssl(https)

Trinomial answered 1/4, 2014 at 12:38 Comment(5)
I am getting this error: Something horrible happened. If the below message states that the SAML 2 SSO Profile is not configured for you, then either you haven't uploaded your metadata yet or your SP's entityID has not yet been properly configured. For more information, you can check out the IdP's error log. The Common Errors page for the IdP at the Shibboleth Wiki may help you debug the problem. Error Message: SAML 2 SSO profile is not configured for relying party 10.0.2.14/shibboleth....how to resolve it?Randolphrandom
I got the solution of the mentioned problem.Thanks.Randolphrandom
It still depends on apache. Is there any pure java solution?Filmy
I doubt (Not yet - In my knowledge). The only way they give in the software package is apache way - using files apacheX.config.Trinomial
I'm looking for a pure Java solution as well and asked over here: #30888117Continent

© 2022 - 2024 — McMap. All rights reserved.