1
1
from saml2 import BINDING_HTTP_REDIRECT
2
- from saml2.extension.idpdisc import BINDING_DISCO
3
2
from saml2.saml import NAME_FORMAT_URI
4
- from saml2.sigver import get_xmlsec_binary, CertHandlerExtra
5
- from saml2.entity_category.edugain import COC
6
- from saml2.entity_category.swamid import RESEARCH_AND_EDUCATION
7
- from saml2.entity_category.swamid import HEI
8
- from saml2.entity_category.swamid import SFS_1993_1153
9
- from saml2.entity_category.swamid import NREN
10
- from saml2.entity_category.swamid import EU
11
3
12
-
13
- #BASE= "http://130.239.200.146:8087"
14
4
BASE= "http://localhost:8087"
15
5
#BASE= "http://lingon.catalogix.se:8087"
16
6
17
-
18
- class SpCertHandlerExtraClass(CertHandlerExtra):
19
-
20
- def use_generate_cert_func(self):
21
- return True
22
-
23
- def generate_cert(self, generate_cert_info, ca_cert_string, ca_key_string):
24
- print "Hello"
25
- return (ca_cert_string, ca_key_string)
26
-
27
- def use_validate_cert_func(self):
28
- return False
29
-
30
- def validate_cert(self, cert_str, ca_cert_string, ca_key_string):
31
- pass
32
-
33
7
CONFIG = {
34
- "entityid": "%s/LocalTestSPHans.xml" % BASE,
35
- "description": "Lokal test SP Hans",
36
- "entity_category": [COC, RESEARCH_AND_EDUCATION, HEI, SFS_1993_1153, NREN, EU],
37
- "only_use_keys_in_metadata": False,
38
- "cert_handler_extra_class": None,#MyCertGeneration(),
39
- "generate_cert_info": {
40
- "cn": "localhost",
41
- "country_code": "se",
42
- "state": "ac",
43
- "city": "Umea",
44
- "organization": "ITS Umea University",
45
- "organization_unit": "DIRG"
46
- },
47
- "tmp_key_file": "pki/tmp_mykey.pem",
48
- "tmp_cert_file": "pki/tmp_mycert.pem",
49
- "validate_certificate": True,
8
+ "entityid": "%s/sp.xml" % BASE,
9
+ "description": "My SP",
50
10
"service": {
51
11
"sp": {
52
- "authn_requests_signed": "true", #Will sign the request!
53
- "want_assertions_signed": "true", #Demands that the assertion is signed.
54
- "name": "LocalTestSPHans",
12
+ "name": "Rolands SP",
55
13
"endpoints": {
56
14
"assertion_consumer_service": [BASE],
57
15
"single_logout_service": [(BASE + "/slo",
58
16
BINDING_HTTP_REDIRECT)],
59
- "discovery_response": [
60
- ("%s/disco" % BASE, BINDING_DISCO)
61
- ]
62
17
},
63
18
"required_attributes": ["surname", "givenname",
64
19
"edupersonaffiliation"],
65
20
"optional_attributes": ["title"],
66
21
}
67
22
},
68
23
"debug": 1,
69
- "key_file": "pki/localhost.ca.key ",
70
- "cert_file": "pki/localhost.ca.crt ",
24
+ "key_file": "pki/mykey.pem ",
25
+ "cert_file": "pki/mycert.pem ",
71
26
"attribute_map_dir": "./attributemaps",
72
- "metadata": {
73
- #"local": ["../idp2/idp_nocert.xml"]
74
- "local": ["/Users/haho0032/Develop/svn/trunk/pyOpSamlProxy/idp_nocert.xml"]
75
- # #"remote": [{"url": "http://130.239.201.5/role/idp.xml", "cert": None}],
76
- },
77
- #"metadata": {"local": ["/Users/haho0032/Develop/svn/trunk/pyOpSamlProxy/idp_nocert.xml"]},
78
-
27
+ "metadata": {"local": ["../idp2/idp.xml"]},
79
28
# -- below used by make_metadata --
80
29
"organization": {
81
- "name": "Lokal test SP Hans ",
82
- "display_name": [("Lokal test SP Hans ", "se"), ("Lokal test SP Hans ", "en")],
83
- "url": "http://130.239.200.146:8087 ",
30
+ "name": "Exempel AB ",
31
+ "display_name": [("Exempel AB ", "se"), ("Example Co. ", "en")],
32
+ "url": "http://www.example.com/roland ",
84
33
},
85
- "contact_person": [
34
+ "contact_person": [{
35
+ "given_name":"John",
36
+ "sur_name": "Smith",
37
+ "email_address": ["
[email protected] "],
38
+ "contact_type": "technical",
39
+ },
86
40
],
87
- "xmlsec_binary": '/usr /local/bin/xmlsec1' ,
41
+ # "xmlsec_binary":"/opt /local/bin/xmlsec1" ,
88
42
"name_form": NAME_FORMAT_URI,
89
43
"logger": {
90
44
"rotating": {
@@ -94,5 +48,4 @@ CONFIG = {
94
48
},
95
49
"loglevel": "debug",
96
50
}
97
- }
98
-
51
+ }
0 commit comments