summaryrefslogtreecommitdiff
path: root/tests/idp_conf_ec.py
blob: eef4d2c925f59339b0dc6c102def8d5bb328fff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from pathutils import full_path

from saml2 import BINDING_HTTP_POST
from saml2 import BINDING_HTTP_REDIRECT
from saml2 import BINDING_SOAP
from saml2.saml import NAME_FORMAT_URI
from saml2.sigver import get_xmlsec_binary


xmlsec_path = get_xmlsec_binary(["/opt/local/bin"])

BASE = "http://localhost:8088"

CONFIG = {
    "entityid": "urn:mace:example.com:saml:roland:idp",
    "name": "Rolands IdP",
    "service": {
        "idp": {
            "endpoints": {
                "single_sign_on_service": [(f"{BASE}/sso", BINDING_HTTP_REDIRECT)],
                "single_logout_service": [(f"{BASE}/slo", BINDING_SOAP), (f"{BASE}/slop", BINDING_HTTP_POST)],
            },
            "policy": {
                "default": {
                    "lifetime": {"minutes": 15},
                    "entity_categories": ["swamid", "edugain"],
                    "name_form": NAME_FORMAT_URI,
                }
            },
            "subject_data": full_path("subject_data.db"),
            # "domain": "umu.se",
            # "name_qualifier": ""
        },
    },
    "debug": 1,
    "key_file": full_path("test.key"),
    "cert_file": full_path("test.pem"),
    "xmlsec_binary": xmlsec_path,
    "metadata": [
        {
            "class": "saml2.mdstore.MetaDataFile",
            "metadata": [(full_path("metadata_sp_1.xml"),), (full_path("vo_metadata.xml"),)],
        }
    ],
    "attribute_map_dir": full_path("attributemaps"),
    "organization": {
        "name": "Exempel AB",
        "display_name": [("Exempel AB", "se"), ("Example Co.", "en")],
        "url": "http://www.example.com/roland",
    },
    "contact_person": [
        {
            "given_name": "John",
            "sur_name": "Smith",
            "email_address": ["john.smith@example.com"],
            "contact_type": "technical",
        },
    ],
}