Hi Richard,
Sorry for delayed reply !
I'll not be able to paste entire perl script, but here is a code snippet which adds attributes to SAML Service Provider.
Script ==>
$serviceprovider = $affdomain->CreateSAMLServiceProvider( \%spaffproperties );
foreach my $aref ( @spattrs )
{
print "Adding attribute: ".$aref->[0]."\t".$aref->[1]."\n";
$serviceprovider->AddAttribute( $aref->[1], $aref->[0], 0, SAMLSP_SSO );
}
It refers a property file to get required values for creation of Service Provider in SiteMinder and then add attributes by referring the Attribute property.
Property file -
IdPID XXXXXXXX
NetegrityAffiliateMinderAuthURL XXXXXXXX
DisableSignatureProcessing 0
RequireSignedAuthnRequests 0
Name XXXXXXXX
Attribute givenName=<%userattr="givenName"%> 2
Attribute telephoneNumber=<%userattr="telephoneNumber"%> 0
The debug logs tell that it's fetching out the attributes value correctly like Attribute to be added with Attribute Type. 0 means SAMLSP_UNSPECIFIED and 2 for SAMLSP_BASIC.
It also shows that's it added correctly, as it destroys the object later on -
Adding attribute: givenName=<%userattr="givenName"%> 2
DEBUG: destroying Netegrity::PolicyMgtSAMLSPAttr=SCALAR(0xc8c1688)
Adding attribute: telephoneNumber=<%userattr="telephoneNumber"%> 0
DEBUG: destroying Netegrity::PolicyMgtSAMLSPAttr=SCALAR(0xc8c1634)
I tried hardcoding the values in AddAttribute method but no luck. Then run XPSSweeper, Policy server restart option but nothing worked. Are we missing any libraries or JARS for this method to work?
Version in use -- R12.52 SP01 CR06
Perl CLI version -- 5.8.4
Appreciate if you can help with this.