summaryrefslogtreecommitdiff
path: root/tests/restrictive_idp_conf.py
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2012-05-23 18:56:51 +0200
committerRoland Hedberg <roland.hedberg@adm.umu.se>2012-05-23 18:56:51 +0200
commit1d7b2964d16b5c4443a3e7037d1bffe281726fc6 (patch)
treef191828115e6f89419cb8c2b34652546bab37889 /tests/restrictive_idp_conf.py
downloadpysaml2-1d7b2964d16b5c4443a3e7037d1bffe281726fc6.tar.gz
Initial add0.4.2
Diffstat (limited to 'tests/restrictive_idp_conf.py')
-rw-r--r--tests/restrictive_idp_conf.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/restrictive_idp_conf.py b/tests/restrictive_idp_conf.py
new file mode 100644
index 00000000..1df39b79
--- /dev/null
+++ b/tests/restrictive_idp_conf.py
@@ -0,0 +1,47 @@
+from saml2 import BINDING_SOAP, BINDING_HTTP_REDIRECT
+from saml2.saml import NAME_FORMAT_URI
+
+BASE = "http://localhost:8089/"
+
+try:
+ from xmlsec_location import xmlsec_path
+except ImportError:
+ xmlsec_path = '/opt/local/bin/xmlsec1'
+
+CONFIG = {
+ "entityid" : "urn:mace:example.com:saml:roland:idpr",
+ "name" : "Rolands restrictied IdP",
+ "service": {
+ "idp": {
+ "endpoints" : {
+ "single_sign_on_service" : [
+ (BASE+"sso", BINDING_HTTP_REDIRECT)],
+ "attribute_service" : [
+ (BASE+"aa", BINDING_SOAP)],
+ },
+ "policy": {
+ "default": {
+ "lifetime": {"minutes":15},
+ "name_form": NAME_FORMAT_URI
+ },
+ "urn:mace:example.com:saml:roland:sp": {
+ "lifetime": {"minutes": 5},
+ "attribute_restrictions":{
+ "givenName": None,
+ "surName": None,
+ "mail": [".*@example.com"],
+ "eduPersonAffiliation": ["(employee|staff|faculty)"],
+ }
+ }
+ },
+ "subject_data": "subject_data.db",
+ }
+ },
+ "key_file" : "test.key",
+ "cert_file" : "test.pem",
+ #"xmlsec_binary" : xmlsec_path,
+ "metadata": {
+ "local": ["sp_0.metadata"],
+ },
+ "attribute_map_dir" : "attributemaps",
+}