On Tue, Oct 09, 2012 at 18:28:00 -0700, Dimitri Kartsonas wrote:
> Hello,
>
> We are trying to use SSP in our application as a SP and authenticate to a
> Windows STS IdP.
A warning first: The WS-Federation SP support in simpleSAMLphp is not
well maitained. It hasn't been updated to use the new authentication
framework, so it is a bit different than everything else that is
present. It should in theory work, but I have not tested it for a very
long time.
> Below is the modified metadata from their site.
>
> <EntityDescriptor ID="_123"
> entityID="
http://staging.xxxx.com"><RoleDescriptor
> xsi:type="fed:SecurityTokenServiceType"
> protocolSupportEnumeration="
http://docs.oasis-open.org/wsfed/federation/200706"
> ServiceDescription="Security Token Service.">
> <KeyDescriptor use="signing">
> <KeyInfo>
> <X509Data><X509Certificate>6iTAN
> </X509Certificate>
> </X509Data>
> </KeyInfo>
> </KeyDescriptor>
> <fed:TokenTypesOffered>
> <fed:TokenType Uri="urn:oasis:names:tc:SAML:2.0:assertion"/>
> </fed:TokenTypesOffered>
> <fed:ClaimTypesOffered>
> <auth:ClaimType
> Uri="
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
> Optional="true"><auth:DisplayName>Name</auth:DisplayName>
> <auth:Description>The name of the subject.</auth:Description>
> </auth:ClaimType><auth:ClaimType
> Uri="
http://schemas.microsoft.local/ws/2008/06/identity/claims/role"
> Optional="true">
> <auth:DisplayName>Role</auth:DisplayName><auth:Description>The role of the
> subject.</auth:Description>
> </fed:ClaimTypesOffered>
> <fed:SecurityTokenServiceEndpoint>
> <EndpointReference><Address>
http://staging.xxxxx.com/</Address>
> <Metadata><Metadata>
> <wsx:MetadataSection
> Dialect="
http://schemas.xmlsoap.org/ws/2004/09/mex"><wsx:MetadataReference>
> <Address>
http://staging.xxxxxx//mex</Address></wsx:MetadataReference></wsx:MetadataSection></Metadata></Metadata></EndpointReference></fed:SecurityTokenServiceEndpoint><fed:PassiveRequestorEndpoint><EndpointReference><Address>
http://staging.xxxx.com/</Address></EndpointReference></fed:PassiveRequestorEndpoint></RoleDescriptor><Organization><OrganizationName
> xml:lang="">xxx</OrganizationName><OrganizationDisplayName
> xml:lang="">xxx</OrganizationDisplayName></Organization><ContactPerson
> contactType="technical"><Company>xx</Company><GivenName>xxx</GivenName><SurName>xx</SurName><EmailAddress>xxxxx</EmailAddress><TelephoneNumber/></ContactPerson>
> </EntityDescriptor>
>
>
> In config.php
> we set enable.wsfed-sp => true
>
> and 'default-wsfed-idp' => 'remote',
>
> and
> 'logging.level' +>SimpleSAML_Logger::DEBUG,
> 'logging.handler' => 'file'
>
>
> In authsource.php
> 'default-sp' => array(
> 'saml:SP',
> 'privatekey' => 'Ourrsaprivkey.pem',
> 'certificate' => 'OurTest.cer'
That is for a SAML service provider. It is not used for WS-Federation.
> In wsfed-idp-remote.php
>
> $metadata['remote'] = array(
> 'prp' => '
https://staging.xxx.com',
> 'certificate' => 'their-token.cer'
> );
>
>
> We used the code from the www/example-simple/wsfed-example.php as the
> base code for our test application.
>
> We get redirected to the login page of the Windows STS and entered the
> login information but were not authenticated.
>
> I noticed the header request had the realm set to
> urn:federation:
oursite.com. (In the STS our URL is '
https://oursite.com)
> Is there a way to change the request?
This comes from metadata/wsfed-sp-hosted.php. To set a custom ID,
change __DYNAMIC:1__ to the ID you want to use.
> Also, what are we missing in the configuration / setup to get authenticated
> ?
What happens instead of getting authenticated?
> Once authenticated, how can we read the claim information?
$session = SimpleSAML_Session::getInstance();
$session->getAttributes();
> Any and all help is greatly appreciated!
I cannot really offer very much help with it -- I am not familiar with
WS-Federation, so I do not know much about how it is supposed to work.
Since ADFS 2.0 supports SAML 2.0 I guess most of the community is
moving to SAML 2.0 as well.
Best regards,
Olav Morken
UNINETT / Feide