You mean "generate SAML 2.0 assertion" or something like that, I assume?
> When the users then clicks within "Product A" we need to seamlessly
> transfer to "Product B".
>
> "Product B" then requests permission info from "Product A" using "SAML
> Request". Since the users were already validated in "Product A" we
> have seamless transition.
>
> Is this a good example at all?
It is not really how SAML 2.0 normally works. A way that it could work
is like the following:
A SAML 2.0 IdP is integrated with product A, so that it shares a user
session with that product. It can also retrieve information about the
user and permissions of the user from product A.
When the user clicks a link to product B from product A, the user is
sent to product B. Product B uses a SAML 2.0 SP to send an
authentication request to product A. Product A then authenticates the
user using the existing user session it has. It then sends an
authentication response back to product B. Product B then uses the data
from the authentication response to validate the user, and determine
the permissions of the user.
For an example of how a simpleSAMLphp IdP can be integrated into an
existing sites authentication session, you can take a look at the
source code and comments in the following files:
modules/exampleauth/lib/Auth/Source/External.php
modules/exampleauth/www/authpage.php
Regards,
Olav Morken
UNINETT / Feide
--
You received this message because you are subscribed to the Google Groups "simpleSAMLphp" group.
To post to this group, send email to simple...@googlegroups.com.
To unsubscribe from this group, send email to simplesamlph...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simplesamlphp?hl=en.
There is no real support for attribute queries in simpleSAMLphp. There
are some classes available that makes it possible to implement support
for it, but there is no support for it "out-of-the-box".
> I wanted to also find if it was possible to send user attributes along with
> other extra attributes along with the authen response?
Yes, you can add attributes through "authentication processing
filters". They run after authentication, before the response is sent,
and allows you to (amongst other things) add extra attributes to the
response. See:
http://simplesamlphp.org/docs/1.8/simplesamlphp-authproc
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="identifier_3"$as = new SimpleSAML_Auth_Omniture('example-external');
$as->isAuthenticated();
$state = array(
'ErrorURL' => 'https://test.url.com/SSO/module.php/core/authenticate.php?as=example-external',
'ReturnTo' => 'https://test.url.com/SSO/module.php/core/authenticate.php?as=example-external',
'SimpleSAML_Auth_State.restartURL' => 'https://test.url.com/SSO/module.php/core/as_login.php?AuthId=example-external',
'SimpleSAML_Auth_Default.id' => 'example-external',
..............
'SimpleSAML_Auth_State.id' => SimpleSAML_Utilities::generateID(),
);
SimpleSAML_Auth_Source::completeAuth($state);
SimpleSAML_Auth_Source::completeAuth($state);
You are aware that this identifier is not supposed identify the user,
but rather the message?
> The IdP
> uses the session_id to validate the user.
So the IdP uses the SP to authenticate the user through a
non-standardized method involving a session identifier sent in the
message identifier field in the authentication request? Now you are
moving way outside of the SAML 2.0 protocol. Why are you even trying to
use SAML 2.0?
> One of the things that I am
> confused about the simplesaml is that it sets up a cookie in
> SessionHandlerCookie file at line (SessionHandlerCookie.php:54). If I use
> external class to authenticate do I need use this cookie handling?
Running without a session cookie (and thus without a session) is not
supported by simpleSAMLphp.
[...]
> Is it possible to just redirect the user to regular product page because by
> the time "completeAuth" is called the user is already validated.
>
> Is the way I am approaching this a valid way of doing or am I completely
> going off the track?
Way off track. Have you looked at the "external authentication" example?
modules/exampleauth/lib/Auth/Source/External.php
modules/exampleauth/www/authpage.php
modules/exampleauth/www/resume.php
As far as I can tell, you are it the opposite direction of what that
one describes. Instead of trying to create a simpleSAMLphp session from
you external page, fetch the authentication session from within
simpleSAMLphp. You will then get support for both IdP initiated
authentication and SP initiated authentication for standard
SAML 2.0 SPs.
Regards,
Olav morken
UNINETT / Feide
Actually, it does, so long as you implement everything as described in
External.php.
> but I wanted to see if this is maybe one of the way we
> could authenticate.
If you create your own version of the "exampleauth:External"
authentication source, it is probably possible to tie it into your
site's existing authentication framework as described above.
What IdP page?
> I am using "example-auth:external" as the
> IdP. Is there anything I need to do to have IdP send the assertion to SP?
Are you triggering IdP-initiated SSO using SSOService.php? See:
http://simplesamlphp.org/docs/1.8/simplesamlphp-idp-more#section_4