-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use it #1
Comments
Hi, I managed to create a logout Post Request which works. Here is my code :
Be careful, this code should be changed to work with Redirect Logout, or if you have more than one Logout Service defined by the IdP and the first one is not a Post Logout... Regards, |
Hi @tmilos, I think wiki for this library is missing. Can you help regarding |
@fmarquis I managed to inject the SingleLogoutService in the metadata.xml. Until I find out the proper way to declare it, I'm overriding the lightsaml_sp.metadata:
path: /metadata.xml
defaults: { _controller: AcmeSecurityBundle:Security:metadata } class SecurityController extends Controller
{
public function metadataAction()
{
$router = $this->container->get('router');
/* @var $router RouterInterface */
$profile = $this->container->get('ligthsaml.profile.metadata');
/* @var $profile MetadataProfileBuilder */
$context = $profile->buildContext();
/* @var $context ProfileContext */
$spDescriptor = $context->getOwnEntityDescriptor()->getFirstSpSsoDescriptor();
$spDescriptor->addSingleLogoutService(
new SingleLogoutService(
$router->generate('lightsaml_sp.logout', [], RouterInterface::ABSOLUTE_URL),
SamlConstants::BINDING_SAML2_HTTP_REDIRECT
)
);
$action = $profile->buildAction();
/* @var $action CompositeAction */
$action->execute($context);
return $context->getHttpResponseContext()->getResponse();
}
} But then, I don't know what to do with this library to handle SLO (SP initiated logout and IdP initiated logout). Thanks. |
Hello, Regarding the metadata, see whole lightSAML symfony bridge configuration here. You can set the You can see how configuration is resolved in LightSamlSymfonyBridgeExtension. First the above mentioned |
It's working well now. Still waiting for a cleaner and bundled way to Sign Out 🙂 Great work 👍 |
@ntoniazzi can you commit your work somewhere so we can see how to integrate it? |
@mathielen Here are the main files involved in our SingleLogout process. I extracted them from a bundle so there could be something missing. |
Thanks @ntoniazzi ! I able to implement logout with your help. I also added signing as our IdP require it for LogoutRequest. The changes include getting own Entity ID and Signature. Get own Entity ID and Signature:
Set this in LogoutRequest:
Or in LogoutResponse:
I hope it will help somebody looking for it. As you mentioned, still looking for cleaner solution. |
@tmilos , I think @kaz231 implemented logout functionality at https://github.com/kaz231/SpBundle. Did you tested or have any plan to merge that code? |
@INSEAD-asim @kaz231 Yes! the implemented logout functionality worked perfectly! Helped me integrate it with OKTA. |
@INSEAD-asim |
I've managed to implement logout in the scenario where the is one service provider (SP), however do you have any examples of how to use this when you have multiple SP sessions? Specifically when it's SP initiated? My current set up is a SP sends a LogoutRequest to Identity Provider (IdP) this then loops through all the active sessions |
@gawpertron When the SP has terminated his logout process, it must return a LogoutResponse to the IdP, which can then call the next SP. |
@ntoniazzi Thanks, that was the guidance I needed. Using your SP implementation I was able to extrapolate an IdP logout service. |
Does anyone have an example of an implementation from the IdP side they could share? |
I opened up a PR to integrate the whole logout process in the lightSAML library and SpBundle : lightSAML/lightSAML#106 |
Is this project still usable? which is the correct way to make a saml single logout with lightSAML library? I tried @ntoniazzi gist, but I'm getting an error and also line #144 with It is all very, very much convoluted. This is not what a saml logout bundle experience should provide... It's a pity @axelvnk attempts to integrate this in lightSAML library were rejected. |
Hello, indeed the lightsaml projects are lethargic, if not dead. The gist you mention is a bit old. You could make it work by removing the direct calls to the container and instead inject the services in the constructor of the I'm still using the bundles, but I'm thinking on moving to another project. OneLoginSamlBundle seems promising, but I haven't tried it yet. |
Hello: Line 143 says: You need to add the 'saml.entity_id' parameter in your parameters file |
Hi,
thank you for your great work on LightSaml, it allowed me to implement SAML authentication on a Symfony 3 SP very easily !
The only problem I have concern the logout :
I understand that this functionality is not yet integrated in your sp-bundle, and tried to use the "lightSAML-logout" directly.
I managed to create a LogoutRequest that should allow the users to disconnect on the IdP, but I don't see how to use this object...
Is there somewhere a small example of code or documentation explaining how to create a logout request and send it in a symfony environment ?
Thanks in advance,
Franck
(and sorry if my english is not good !)
The text was updated successfully, but these errors were encountered: