diff --git a/example/sp/nocert_sp_conf/sp.xml b/example/sp/nocert_sp_conf/sp.xml deleted file mode 100644 index 71bdb9d..0000000 --- a/example/sp/nocert_sp_conf/sp.xml +++ /dev/null @@ -1,2 +0,0 @@ - -http://www.geant.net/uri/dataprotection-code-of-conduct/v1http://www.swamid.se/category/research-and-educationhttp://www.swamid.se/category/hei-servicehttp://www.swamid.se/category/sfs-1993-1153http://www.swamid.se/category/nren-servicehttp://www.swamid.se/category/eu-adequate-protectionLokal test SP HansLokal test SP HansLokal test SP Hanshttp://130.239.200.146:8087 diff --git a/example/sp/nocert_sp_conf/sp_conf.py b/example/sp/nocert_sp_conf/sp_conf.py deleted file mode 100644 index 15ccd67..0000000 --- a/example/sp/nocert_sp_conf/sp_conf.py +++ /dev/null @@ -1,97 +0,0 @@ -from saml2 import BINDING_HTTP_REDIRECT -from saml2.extension.idpdisc import BINDING_DISCO -from saml2.saml import NAME_FORMAT_URI -from saml2.sigver import get_xmlsec_binary, CertHandlerExtra -from saml2.entity_category.edugain import COC -from saml2.entity_category.swamid import RESEARCH_AND_EDUCATION -from saml2.entity_category.swamid import HEI -from saml2.entity_category.swamid import SFS_1993_1153 -from saml2.entity_category.swamid import NREN -from saml2.entity_category.swamid import EU - - -#BASE= "http://130.239.200.146:8087" -BASE= "http://localhost:8087" -#BASE= "http://lingon.catalogix.se:8087" - - -class SpCertHandlerExtraClass(CertHandlerExtra): - - def use_generate_cert_func(self): - return True - - def generate_cert(self, generate_cert_info, ca_cert_string, ca_key_string): - print "Hello" - return (ca_cert_string, ca_key_string) - - def use_validate_cert_func(self): - return False - - def validate_cert(self, cert_str, ca_cert_string, ca_key_string): - pass - -CONFIG = { - "entityid": "%s/LocalTestSPHans.xml" % BASE, - "description": "Lokal test SP Hans", - "entity_category": [COC, RESEARCH_AND_EDUCATION, HEI, SFS_1993_1153, NREN, EU], - "only_use_keys_in_metadata": False, - "cert_handler_extra_class": None,#MyCertGeneration(), - "generate_cert_info": { - "cn": "localhost", - "country_code": "se", - "state": "ac", - "city": "Umea", - "organization": "ITS Umea University", - "organization_unit": "DIRG" - }, - "tmp_key_file": "pki/tmp_mykey.pem", - "tmp_cert_file": "pki/tmp_mycert.pem", - "validate_certificate": True, - "service": { - "sp": { - "authn_requests_signed": "true", #Will sign the request! - "want_assertions_signed": "true", #Demands that the assertion is signed. - "name": "LocalTestSPHans", - "endpoints": { - "assertion_consumer_service": [BASE], - "single_logout_service": [(BASE + "/slo", - BINDING_HTTP_REDIRECT)], - "discovery_response": [ - ("%s/disco" % BASE, BINDING_DISCO) - ] - }, - "required_attributes": ["surname", "givenname", - "edupersonaffiliation"], - "optional_attributes": ["title"], - } - }, - "debug": 1, - "key_file": "pki/localhost.ca.key", - "cert_file": "pki/localhost.ca.crt", - "attribute_map_dir": "./attributemaps", - "metadata": { - "local": ["../idp2/idp_nocert.xml"] - # #"remote": [{"url": "http://130.239.201.5/role/idp.xml", "cert": None}], - }, - #"metadata": {"local": ["/Users/haho0032/Develop/svn/trunk/pyOpSamlProxy/idp_nocert.xml"]}, - - # -- below used by make_metadata -- - "organization": { - "name": "Lokal test SP Hans", - "display_name": [("Lokal test SP Hans", "se"), ("Lokal test SP Hans", "en")], - "url": "http://130.239.200.146:8087", - }, - "contact_person": [ - ], - "xmlsec_binary": '/usr/local/bin/xmlsec1', - "name_form": NAME_FORMAT_URI, - "logger": { - "rotating": { - "filename": "sp.log", - "maxBytes": 100000, - "backupCount": 5, - }, - "loglevel": "debug", - } -} - diff --git a/example/sp/nocert_sp_conf/who.ini b/example/sp/nocert_sp_conf/who.ini deleted file mode 100644 index 1ed329f..0000000 --- a/example/sp/nocert_sp_conf/who.ini +++ /dev/null @@ -1,42 +0,0 @@ -[plugin:auth_tkt] -# identification -use = repoze.who.plugins.auth_tkt:make_plugin -secret = kasamark -cookie_name = pysaml2 -secure = False -include_ip = True -timeout = 3600 -reissue_time = 3000 - -# IDENTIFIER -# @param : -# - rememberer_name : name of the plugin for remembering (delegate) -[plugin:saml2auth] -use = s2repoze.plugins.sp:make_plugin -saml_conf = sp_conf -remember_name = auth_tkt -sid_store = outstanding -idp_query_param = IdPEntityId -discovery = http://130.239.201.5/role/idp.ds - -[general] -request_classifier = s2repoze.plugins.challenge_decider:my_request_classifier -challenge_decider = repoze.who.classifiers:default_challenge_decider -remote_user_key = REMOTE_USER - -[identifiers] -# plugin_name;classifier_name:.. or just plugin_name (good for any) -plugins = - saml2auth - auth_tkt - -[authenticators] -# plugin_name;classifier_name.. or just plugin_name (good for any) -plugins = saml2auth - -[challengers] -# plugin_name;classifier_name:.. or just plugin_name (good for any) -plugins = saml2auth - -[mdproviders] -plugins = saml2auth diff --git a/example/sp/sp_conf.py.example b/example/sp/sp_conf.py.example index a9e2fe3..5d244ac 100644 --- a/example/sp/sp_conf.py.example +++ b/example/sp/sp_conf.py.example @@ -1,64 +1,19 @@ from saml2 import BINDING_HTTP_REDIRECT -from saml2.extension.idpdisc import BINDING_DISCO from saml2.saml import NAME_FORMAT_URI -from saml2.sigver import get_xmlsec_binary, CertHandlerExtra -from saml2.entity_category.edugain import COC -from saml2.entity_category.swamid import RESEARCH_AND_EDUCATION -from saml2.entity_category.swamid import HEI -from saml2.entity_category.swamid import SFS_1993_1153 -from saml2.entity_category.swamid import NREN -from saml2.entity_category.swamid import EU - -#BASE= "http://130.239.200.146:8087" BASE= "http://localhost:8087" #BASE= "http://lingon.catalogix.se:8087" - -class SpCertHandlerExtraClass(CertHandlerExtra): - - def use_generate_cert_func(self): - return True - - def generate_cert(self, generate_cert_info, ca_cert_string, ca_key_string): - print "Hello" - return (ca_cert_string, ca_key_string) - - def use_validate_cert_func(self): - return False - - def validate_cert(self, cert_str, ca_cert_string, ca_key_string): - pass - CONFIG = { - "entityid": "%s/LocalTestSPHans.xml" % BASE, - "description": "Lokal test SP Hans", - "entity_category": [COC, RESEARCH_AND_EDUCATION, HEI, SFS_1993_1153, NREN, EU], - "only_use_keys_in_metadata": False, - "cert_handler_extra_class": None,#MyCertGeneration(), - "generate_cert_info": { - "cn": "localhost", - "country_code": "se", - "state": "ac", - "city": "Umea", - "organization": "ITS Umea University", - "organization_unit": "DIRG" - }, - "tmp_key_file": "pki/tmp_mykey.pem", - "tmp_cert_file": "pki/tmp_mycert.pem", - "validate_certificate": True, + "entityid": "%s/sp.xml" % BASE, + "description": "My SP", "service": { "sp": { - "authn_requests_signed": "true", #Will sign the request! - "want_assertions_signed": "true", #Demands that the assertion is signed. - "name": "LocalTestSPHans", + "name": "Rolands SP", "endpoints": { "assertion_consumer_service": [BASE], "single_logout_service": [(BASE + "/slo", BINDING_HTTP_REDIRECT)], - "discovery_response": [ - ("%s/disco" % BASE, BINDING_DISCO) - ] }, "required_attributes": ["surname", "givenname", "edupersonaffiliation"], @@ -66,25 +21,24 @@ CONFIG = { } }, "debug": 1, - "key_file": "pki/localhost.ca.key", - "cert_file": "pki/localhost.ca.crt", + "key_file": "pki/mykey.pem", + "cert_file": "pki/mycert.pem", "attribute_map_dir": "./attributemaps", - "metadata": { - #"local": ["../idp2/idp_nocert.xml"] - "local": ["/Users/haho0032/Develop/svn/trunk/pyOpSamlProxy/idp_nocert.xml"] - # #"remote": [{"url": "http://130.239.201.5/role/idp.xml", "cert": None}], - }, - #"metadata": {"local": ["/Users/haho0032/Develop/svn/trunk/pyOpSamlProxy/idp_nocert.xml"]}, - + "metadata": {"local": ["../idp2/idp.xml"]}, # -- below used by make_metadata -- "organization": { - "name": "Lokal test SP Hans", - "display_name": [("Lokal test SP Hans", "se"), ("Lokal test SP Hans", "en")], - "url": "http://130.239.200.146:8087", + "name": "Exempel AB", + "display_name": [("Exempel AB", "se"), ("Example Co.", "en")], + "url": "http://www.example.com/roland", }, - "contact_person": [ + "contact_person": [{ + "given_name":"John", + "sur_name": "Smith", + "email_address": ["john.smith@example.com"], + "contact_type": "technical", + }, ], - "xmlsec_binary": '/usr/local/bin/xmlsec1', + #"xmlsec_binary":"/opt/local/bin/xmlsec1", "name_form": NAME_FORMAT_URI, "logger": { "rotating": { @@ -94,5 +48,4 @@ CONFIG = { }, "loglevel": "debug", } -} - +} \ No newline at end of file diff --git a/example/sp/who.ini b/example/sp/who.ini index 1ed329f..ae65a67 100644 --- a/example/sp/who.ini +++ b/example/sp/who.ini @@ -17,7 +17,6 @@ saml_conf = sp_conf remember_name = auth_tkt sid_store = outstanding idp_query_param = IdPEntityId -discovery = http://130.239.201.5/role/idp.ds [general] request_classifier = s2repoze.plugins.challenge_decider:my_request_classifier