summaryrefslogtreecommitdiff
path: root/metadata/swamid-prod.fd
blob: cde286e1fce5dd15b4ef7fddd7a021770ca0e132 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
- when clean:
    - xslt:
       stylesheet: tidy.xsl
    - check_xml_namespaces
    - break
- when update:
    - load:
        - /opt/metadata/swamid-interfederations-2.0 as swamid-interfederations-dir cleanup clean
        - /opt/metadata/swamid-edugain as swamid-edugain-dir cleanup clean
        - /opt/metadata/swamid-2.0 as swamid-2.0-dir cleanup clean

    # Read dirs
    - fork:
        # swamid-2.0.xml
        - select as swamid-2.0:
            - swamid-edugain-dir
            - swamid-2.0-dir
            - swamid-interfederations-dir
    - fork:
        # swamid-edugain-1.0.xml
        - select as swamid-edugain-1.0:
            - swamid-edugain-dir
    - fork:
        # swamid-registered.xml swamid-discovery.xml
        - select as swamid-registered:
            - swamid-edugain-dir
            - swamid-2.0-dir
    - fork:
        # need a uniq name to avoid format problem
        # pyFF caches accept-type and requse selection :-(
        - select as ds-sp:
            - swamid-edugain-dir
            - swamid-2.0-dir
            - swamid-interfederations-dir
    # Read selectors
    - fork:
        # swamid-idp.xml
        - select as swamid-idp:
            - swamid-registered!//md:EntityDescriptor[md:IDPSSODescriptor]
    - fork:
        # swamid-idp-transitive.xml
        - select as swamid-idp-transitive:
            - swamid-2.0!//md:EntityDescriptor[md:IDPSSODescriptor]
    - fork:
        # swamid-sp.xml
        - select as swamid-sp:
            - swamid-registered!//md:EntityDescriptor[md:SPSSODescriptor]
    - fork:
        # swamid-sp-transitive.xml
        - select as swamid-sp-transitive:
            - swamid-2.0!//md:EntityDescriptor[md:SPSSODescriptor]

- when request:
    - select
    - pipe:
        - when accept application/samlmetadata+xml application/xml:
             - xslt:
                 stylesheet: tidy.xsl
             - pubinfo:
                 publisher: https://mds.swamid.se/
             - first
             - finalize:
                 baseURL: https://mds.swamid.se/
                 cacheDuration: PT5H
                 validUntil: P14D
             - sign:
                 key: http://pyff_luna_1:8000/swamidHA/swamid2
                 cert: /etc/credentials/md-signer2.crt
             - emit application/xml
             - break
        - when accept application/json:
             - discojson
             - emit application/json:
             - break
        - when accept application/json-sp:
             - discojson_sp
             - emit application/json:
             - break