Shibboleth Testshib IDP is not logging out When i browse "https://www.testshib.org/Shibboleth.sso/Logout" - shibboleth

I have installed Shibboleth SP in local. I am trying to test it with TestShib IDP. Ii was succeded to regiter with Testshib and able to login.
When i am trying to Logout from testshib IDP(https://www.testshib.org/Shibboleth.sso/Logout). It is giving Status of Local Logout: Logout completed successfully.
But when i am trying to login again it is not asking for Login page it is automatically logging the user.
Can you please tell me solution.

Well unfortunately there is no solution to this flow.
It is not in SP's hand to get user logged out. Shibboleth may keep session on or it is possible for idP to keep the session on.
So it is safe to keep in mind that it will never be logged out manually.

Related

Not able to configure SLO in Okta

I am trying to implement Single LogOut from my Service Provider using Okta.
I have the app configured in Okta. The SSO is working fine. Just that when I am logging out of the application it is not logging me out of Okta as a result if I re login it is just logging me with the same user name without taking me to the log in page.
I have configured the SLO settings as seen in the picture.
Also I am using the Url from the IDP Metadata in the SP.
And I have updated the same Signature Certificate as provided by Okta as seen in the picture:
Requirements:
When I log out, it should log me out of the current application as well as Okta.
When I re log in, It should ask for credentials.
I tried looking into https://help.okta.com/en-us/Content/Topics/Apps/Apps_Single_Logout.htm
But could not understand what the actual issue was.

Laravel Session - detect the improper session handling by impersonate the user by submitting the token

i want to ask below question related about session. there is a test about my web and got below result about session.
detect the improper session handling by impersonate the user by submitting the token to the web server for any sensitive transactions. To handle sessions properly, ensure that application code creates, maintains, and destroys session tokens properly over the life-cycle of a user’s session.
i try to googling but still can't figure it out. for the login i just using login code from laravel auth itself.
anyone know how to solve this? and how to test improper session? is it mean i should allow, only a user can login at the same time?
thank you

Spring Saml Force IDP Reauthentication when Assertion Age Expires

We have a Spring SAML SP service set up that allows our customers to use SAML to login to our applications. Our Spring SAML app has a max assertion age configured as 12 hours and users have their assertion ages expired often. Currently when they try to login with a session older then the max assertion they get an error. They then have to logout of their IDP, then login and try again.
They are able to get around expired sessions by setting a max assertion age in the configuration of our SP on the IDP side to something less then our 12 hours max. Then their IDP correctly prompts for reauth. I'd like to force reauth when their assertion is expired from our SP side. Is there a way to do that? I know using SAMLEntry point you can force auth all of the time, but we want to only reauth when we need them to.
this statement:
Currently when they try to login with a session older then the max
assertion they get an error. They then have to logout of their IDP,
then login and try again.
indicates that there's a problem on the IdP side (that is, they are killing their sessions early, or something similar), not yours. If you send a user with a standard SP-init AuthnRequest, the IdP should honor it. If the user has to log out of their IdP, that's the IdP's issue to resolve, not yours.
If you're not using the standard SP-init/AuthnRequest mechanism, then you need to update your question, and explain exactly your process.

Keycloak not logging out the Identity provider after calling the /logout endpoint

I'm trying to use Keycloak (13.0.1) as an identity broker. I have an iOS app that uses keycloak to log in via an OIDC identity provider, and then use the token to access a spring-boot backend.
My issue is that I simply can't get the keycloak logout to also log the user out of the Identity Provider session.
I've spent days googling this and looking at both stackoverflow and the keycloak discourse page and git repo, but I couldn't find an answer to my specific issue.
Using the postman to test, the first time I click "Get New Access Token":
It successfully redirects me to the identity provider login page (I use the keycloak hint to bypass the initial keycloak login page). Pressing the button again will skip the IDP login and give me the token directly. How convenient, or so I thought...
The problem is that when I use keycloak's /logout endpoint to invalidate the refresh token:
And it successfully returns 204, when I click "Get new access token" again, it skips the login form and gives me the token directly, so there is effectively no way to logout the user and then login with a different user. The only way to bypass this is to manually click the "clear all cookies" button.
Here is my IDP configuration:
Also note that, in the keycloak admin guied it is specified that keycloak should be logging out of the IDPs when a logout is triggered, so it doesn't seem like I should be making any special configs:
https://www.keycloak.org/docs/latest/server_admin/#identity-broker-logout
IMPORTANT EDIT:
I marked this question as solved and the solution is correct, but I also needed to turn off the IDP "backchannel logout", because our corporate SSO doesn't like it. Keycloak seems to be able to log out regardless.
It successfully redirects me to the identity provider login page
That redirect is the key. It opens a browser, where Keycloak cookie is created - that is your IdP session. You have to open Keycloak /logout endpoint in the same browser, so Keycloak can clear own Keycloak cookies.
Summary: you have to open/redirect (API call doesn't work) user to the same browser to the logout endpoint (API call doesn't work) as you have used for the login. Of course this may not be case for some special flows, but it should be working for standard Authorization Code (with/without PKCE).

Spring SAML SSO do not share session

I have configured WSO2 Identity Server as IDP and have two applications configured as SP. All working fine, except few things:
when I logged out from one application, another application don't see, that I was logged out
when I login into one application, another application don't see, that I was logged in
IMHO, there is main principles of SSO and SLO.
When I check SecurityContextHolder.getContext().getAuthentication() there is no changes after logout or login in another app.
Maybe I should call WSO2 page /samlsso before every load url?
What can I do wrong? How to retrieve from another app, that user logged out/logged in?
EDIT:
For example, WSO2 API Manager Store have such mechanism:
when I logged out from my application and reload Store page, then going redirection to main not logged page in Store. Same with login.
UPDATE:
I found problem in class org.springframework.security.saml.websso.SingleLogoutProfileImpl. When logout request is coming from WSO2 IS, than objects Authentication and SAMLCredential are nulls and error No user is logged in is occured, but for real user still logged in in Spring SAML application.
Same discussion was here, but with no effect :\
You have to verify whether both apps are calling Identity Server (IS) using the same host name. E.g. https://is.blahblah.com/samlsso.
IS session is based on cookies ('commonAuthId' and 'samlssoTokenId' cookies to be specific). If apps are calling IS using two different host names, there will be two different sessions created at the IS side. For SSO and SLO to happen both apps must share a single IS session.
We are using travelocity.com and avis.com web app for test SAML2 sso. You can found the more details here[1]. Further you can checked this documentation[2] Registering the two service providers in the Identity Server and followed the 1 to 8 steps.
[1] https://docs.wso2.com/display/IS500/Configuring+Single+Sign-On+with+SAML+2.0
[2] https://docs.wso2.com/display/IS500/Customizing+Login+Pages

Resources