-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathconfig.saml.example.yaml
More file actions
195 lines (179 loc) · 7.53 KB
/
config.saml.example.yaml
File metadata and controls
195 lines (179 loc) · 7.53 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# SAML Configuration Example for VC Issuer
# This file demonstrates how to configure SAML authentication for credential issuance
#
# To issue credentials via the OID4VCI pipeline using SAML authentication,
# set auth_method: saml on the credential_constructor entry and ensure the
# credential_mappings key matches the credential_constructor key.
common:
credential_constructor:
# Example: issue PID credentials after SAML authentication
pid:
vctm_file_path: "/metadata/vctm_pid_arf_1_8.json"
auth_method: saml # <-- triggers SAML IdP redirect during OID4VCI flow
format: "dc+sd-jwt"
# Example: issue diplomas after SAML authentication
diploma:
vctm_file_path: "/metadata/vctm_diploma.json"
auth_method: saml
format: "dc+sd-jwt"
issuer:
identifier: "SUNET_v1"
api_server:
addr: :8080
grpc_server:
addr: vc_dev_issuer:8090
signing_key_path: "/private_ec256.pem"
issuer_url: "http://172.16.50.2:8080"
wallet_url: ""
jwt_attribute:
issuer: https://issuer.sunet.se
enable_not_before: true
valid_duration: 3600
verifiable_credential_type: "https://credential.sunet.se/identity_credential"
static_host: "http://vc_dev_portal:8080/statics"
# SAML Service Provider Configuration
saml:
# Enable or disable SAML authentication (default: false)
enable: true
# SAML Entity ID for this Service Provider
# This should be a unique identifier, typically a URL
entity_id: "https://issuer.sunet.se/saml/sp"
# MDQ (Metadata Query Protocol) server URL
# Used to dynamically fetch IdP metadata
# Example: Swedish SWAMID MDQ: https://mds.swamid.se/md
mdq_server: "https://mds.swamid.se/md"
# Path to X.509 certificate for SAML signing/encryption
certificate_path: "/pki/saml_sp.crt"
# Path to private key corresponding to the certificate
private_key_path: "/pki/saml_sp.key"
# Assertion Consumer Service (ACS) endpoint
# This is where the IdP will POST the SAML response
# Should match the public URL of your issuer + /saml/acs
acs_endpoint: "https://issuer.sunet.se/saml/acs"
# Session duration in seconds (default: 3600 = 1 hour)
session_duration: 300
# Metadata cache TTL in seconds (default: 86400 = 24 hours)
metadata_cache_ttl: 86400
# Credential mappings - defines how to issue different credential types via SAML
# Key: credential type identifier (used in API requests, matches credential_constructor key)
# Value: mapping configuration for that credential type
credential_mappings:
# Person Identification Data (PID)
pid:
credential_config_id: "urn:eudi:pid:1" # OpenID4VCI configuration ID
default_idp: "https://idp.swamid.se/idp"
attributes:
# Maps SAML attribute OIDs to credential claims
"urn:oid:2.5.4.42": # givenName
claim: "identity.given_name"
required: true
"urn:oid:2.5.4.4": # surname
claim: "identity.family_name"
required: true
"urn:oid:0.9.2342.19200300.100.1.3": # mail
claim: "identity.email_address"
required: false
transform: "lowercase"
"urn:oid:1.2.752.29.4.13": # Swedish personnummer
claim: "identity.personal_administrative_number"
required: false
"urn:oid:2.5.4.10": # organizationName
claim: "identity.resident_city"
required: false
"urn:oid:2.5.4.6": # country
claim: "identity.resident_country"
required: false
default: "SE"
# Education Diploma Credential
diploma:
credential_config_id: "urn:eudi:diploma:1"
default_idp: "https://idp.university.se/idp"
attributes:
"urn:oid:2.5.4.42": # givenName
claim: "credential_subject.given_name"
required: true
"urn:oid:2.5.4.4": # surname
claim: "credential_subject.family_name"
required: true
"urn:oid:1.3.6.1.4.1.5923.1.1.1.1": # eduPersonAffiliation
claim: "affiliation"
required: true
"urn:oid:1.3.6.1.4.1.5923.1.1.1.6": # eduPersonPrincipalName
claim: "principal_name"
required: false
"urn:oid:2.5.4.10": # organizationName
claim: "institution"
required: true
"urn:oid:1.3.6.1.4.1.25178.1.2.9": # schacHomeOrganization
claim: "home_organization"
required: false
"urn:oid:0.9.2342.19200300.100.1.3": # mail
claim: "email"
required: false
transform: "lowercase"
# European Health Insurance Card (EHIC)
ehic:
credential_config_id: "urn:eudi:ehic:1"
default_idp: "https://idp.healthprovider.se/idp"
attributes:
"urn:oid:2.5.4.42": # givenName
claim: "given_name"
required: true
"urn:oid:2.5.4.4": # surname
claim: "family_name"
required: true
"urn:oid:1.2.752.29.4.13": # Swedish personal identity number
claim: "personal_administrative_number"
required: true
"urn:oid:0.9.2342.19200300.100.1.3": # mail
claim: "email"
required: false
transform: "lowercase"
# Common SAML Attribute OIDs Reference:
# ------------------------------------------
# Identity Attributes:
# urn:oid:2.5.4.42 - givenName
# urn:oid:2.5.4.4 - surname (sn)
# urn:oid:2.5.4.3 - commonName (cn)
# urn:oid:0.9.2342.19200300.100.1.3 - mail
# urn:oid:2.16.840.1.113730.3.1.241 - displayName
#
# Organization Attributes:
# urn:oid:2.5.4.10 - organizationName (o)
# urn:oid:2.5.4.11 - organizationalUnitName (ou)
#
# eduPerson Attributes (SAML for education):
# urn:oid:1.3.6.1.4.1.5923.1.1.1.1 - eduPersonAffiliation
# urn:oid:1.3.6.1.4.1.5923.1.1.1.6 - eduPersonPrincipalName
# urn:oid:1.3.6.1.4.1.5923.1.1.1.9 - eduPersonScopedAffiliation
# urn:oid:1.3.6.1.4.1.5923.1.1.1.10 - eduPersonTargetedID
#
# SCHAC Attributes (European academic attributes):
# urn:oid:1.3.6.1.4.1.25178.1.2.9 - schacHomeOrganization
# urn:oid:1.3.6.1.4.1.25178.1.2.14 - schacPersonalUniqueCode
#
# Swedish Attributes:
# urn:oid:1.2.752.29.4.13 - personalIdentityNumber (Swedish personnummer)
# urn:oid:1.2.752.201.3.4 - norEduPersonNIN (Nordic personal identity number)
#
# Employment Attributes:
# urn:oid:2.16.840.1.113730.3.1.3 - employeeNumber
# urn:oid:2.16.840.1.113730.3.1.4 - employeeType
# MDQ Server Examples:
# ------------------------------------------
# - SWAMID (Swedish academic identity federation): https://mds.swamid.se/md
# - eduGAIN (Global academic identity federation): https://mdq.edugain.org
# - InCommon (US education/research): https://mdq.incommon.org
#
# MDQ Usage:
# To fetch IdP metadata, the system queries: {mdq_server}/{url_encoded_entity_id}
# Example: https://mds.swamid.se/md/https%3A%2F%2Fidp.example.se%2Fidp
# Testing with TestShib:
# ------------------------------------------
# For testing, you can use TestShib (https://www.testshib.org):
# entity_id: "https://your-issuer.example.com/saml/sp"
# mdq_server: Leave empty or use local metadata file
# IdP Entity ID: "https://idp.testshib.org/idp/shibboleth"
#
# Download TestShib IdP metadata from:
# https://www.testshib.org/metadata/testshib-providers.xml