Closed sabya14 closed 7 years ago
For signing, use your (SP's) keypair, as the name suggests.
The rest you have to t-shoot with your IdP. I suggest you use SAMLTracer Firefox extension and manually check each and every message that is exchanged between SP and IdP. It's good to get some understanding of the SAML standard first, so that you're able to catch incorrect behavior.
From your excerpt, I'd guess the issue is with incorrect NameID format - please check that your expectations on the SP side match those on IdP side.
Hi, I have configured my app according to the setting suggested and following is the code
SAML_CONFIG = { 'allow_create': True,
full path to the xmlsec1 binary programm
'xmlsec_binary': '/usr/bin/xmlsec1',
your entity id, usually your subdomain plus the url to the metadata view
'entityid': 'https://kotak.phrazor.com/saml2/metadata/',
directory with attribute mapping
'attribute_map_dir': path.join(BASEDIR, 'attribute-maps'), 'allow_unknown_attributes': True,
this block states what services we provide
'service': {
we are just a lonely SP
where the remote metadata is stored
'metadata': { 'local': [path.join(BASEDIR, 'remote_metadata.xml')], },
set to 1 to output debugging information
'debug': 1,
Signing
'key_file': path.join(BASEDIR, 'mycert.key'), # private part 'cert_file': path.join(BASEDIR, 'mycert.pem'), # public part
Encryption
'encryption_keypairs': [{
'key_file': path.join(BASEDIR, 'my_encryption_key.key'), # private part
'cert_file': path.join(BASEDIR, 'my_encryption_cert.pem'), # public part
}],
own metadata settings
'contact_person': [ {'given_name': 'Sabyasachi', 'sur_name': 'Nandy', 'company': 'Vphrase', 'email_address': 'sabyasachi.nandy@vphrase.com', 'contact_type': 'technical'}, ],
you can set multilanguage information here
'organization': { 'name': [('Vphrase', 'es'), ('Vphrase', 'en')], 'display_name': [('Vphrase', 'es'), ('Vphrase', 'en')], 'url': [('https://www.vphrase.com', 'es'), ('https://www.vphrase.com', 'en')], }, 'valid_for': 24, # how long is our metadata valid }
After running the app, we get directed to the IPD and get back the response , but the response cant be processed , and when i Checked the error log , we get the message saml2.response.StatusInvalidNameidPolicy: urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy from urn:oasis:names:tc:SAML:2.0:status:Requester, and this ultimately comes from the error certificate verification failed:err=20;msg=unable to get local issuer certificate.
Any help on this topic, Can you throw some more light about the keys used and their importance for the saml2? In the signing key, should we use your public key or the public key of the IDP ?