-
Notifications
You must be signed in to change notification settings - Fork 0
/
wayffunctionaltest_data.go
316 lines (310 loc) · 8.7 KB
/
wayffunctionaltest_data.go
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
package wayffunctionaltest
var (
testAttributes = map[string][]string{
"cn": {"Anton Banton Cantonsen"},
"displayName": {"Anton Banton Cantonsen"},
"eduPersonAffiliation": {"alum"},
"eduPersonAssurance": {"2"},
"eduPersonEntitlement": {"https://example.com/course101"},
"eduPersonPrimaryAffiliation": {"student"},
"eduPersonPrincipalName": {"[email protected]"},
"eduPersonScopedAffiliation": {"[email protected]", "[email protected]"},
"entryUUID": {"entryUUID"},
"gn": {`Anton Banton <SamlRequest id="abc">abc</SamlRequest>`},
"mail": {"[email protected]"},
"norEduPersonLIN": {"123456789"},
"norEduPersonNIN": {"2408586234"},
"organizationName": {"This Is Not A Valid IdP!"},
"preferredLanguage": {"da"},
"schacCountryOfCitizenship": {"dk"},
"schacHomeOrganizationType": {"abc"},
"schacPersonalUniqueID": {"urn:mace:terena.org:schac:personalUniqueID:dk:CPR:2408586234"},
"sn": {"Cantonsen"},
"isMemberOf": {"prefix.show", "show.suffix", "show.infix.show.infix.show", "just.at.lot.of.garbage"},
}
jwt2SAMLPreflight = `{
"AssertionConsumerServiceURL": [
"https://wayf.wayf.dk/module.php/saml/sp/saml2-acs.php/wayf.wayf.dk"
],
"ForceAuthn": null,
"IsPassive": null,
"Issuer": [
"https://wayf.wayf.dk"
],
"RequesterID": [
"https://wayfsp.wayf.dk"
],
"commonfederations": [
"true"
],
"hub": [
"true"
],
"idpfeds": [
"WAYF",
"HUBIDP",
"oes.dk"
],
"protocol": [
"AuthnRequest"
],
"spfeds": [
"WAYF"
]
} https://wayfsp.wayf.dk
`
modstAttributes = `eduPersonAssurance https://modst.dk/sso/claims/assurancelevel https://modst.dk/sso/claims
2
eduPersonPrincipalName http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name https://modst.dk/sso/claims
eduPersonPrincipalName https://modst.dk/sso/claims/userid https://modst.dk/sso/claims
entryUUID https://modst.dk/sso/claims/uniqueid https://modst.dk/sso/claims
entryUUID
gn https://modst.dk/sso/claims/givenname https://modst.dk/sso/claims
Anton Banton <SamlRequest id="abc">abc</SamlRequest>
mail https://modst.dk/sso/claims/email https://modst.dk/sso/claims
modstlogonmethod https://modst.dk/sso/claims/logonmethod https://modst.dk/sso/claims
username-password-protected-transport
oioCvrNumberIdentifier https://modst.dk/sso/claims/cvr https://modst.dk/sso/claims
12345678
sn https://modst.dk/sso/claims/surname https://modst.dk/sso/claims
Cantonsen
`
fullAttributeSet = `cn urn:oasis:names:tc:SAML:2.0:attrname-format:basic
Anton Banton Cantonsen
eduPersonAffiliation urn:oasis:names:tc:SAML:2.0:attrname-format:basic
alum
member
student
eduPersonAssurance urn:oasis:names:tc:SAML:2.0:attrname-format:basic
2
eduPersonEntitlement urn:oasis:names:tc:SAML:2.0:attrname-format:basic
https://example.com/course101
eduPersonPrimaryAffiliation urn:oasis:names:tc:SAML:2.0:attrname-format:basic
student
eduPersonPrincipalName urn:oasis:names:tc:SAML:2.0:attrname-format:basic
eduPersonScopedAffiliation urn:oasis:names:tc:SAML:2.0:attrname-format:basic
eduPersonTargetedID urn:oasis:names:tc:SAML:2.0:attrname-format:basic
{{.eptid}}
entryUUID urn:oasis:names:tc:SAML:2.0:attrname-format:basic
entryUUID
gn urn:oasis:names:tc:SAML:2.0:attrname-format:basic
Anton Banton <SamlRequest id="abc">abc</SamlRequest>
isMemberOf urn:oasis:names:tc:SAML:2.0:attrname-format:basic
prefix.show
show.infix.show.infix.show
show.suffix
mail urn:oasis:names:tc:SAML:2.0:attrname-format:basic
norEduPersonLIN urn:oasis:names:tc:SAML:2.0:attrname-format:basic
123456789
norEduPersonNIN urn:oasis:names:tc:SAML:2.0:attrname-format:basic
2408586234
organizationName urn:oasis:names:tc:SAML:2.0:attrname-format:basic
This Is Not A Valid IdP!
preferredLanguage urn:oasis:names:tc:SAML:2.0:attrname-format:basic
da
schacCountryOfCitizenship urn:oasis:names:tc:SAML:2.0:attrname-format:basic
dk
schacDateOfBirth urn:oasis:names:tc:SAML:2.0:attrname-format:basic
18580824
schacHomeOrganization urn:oasis:names:tc:SAML:2.0:attrname-format:basic
this.is.not.a.valid.idp
schacHomeOrganizationType urn:oasis:names:tc:SAML:2.0:attrname-format:basic
urn:mace:terena.org:schac:homeOrganizationType:int:other
schacPersonalUniqueID urn:oasis:names:tc:SAML:2.0:attrname-format:basic
urn:mace:terena.org:schac:personalUniqueID:dk:CPR:2408586234
schacYearOfBirth urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1858
sn NameStandIn urn:oasis:names:tc:SAML:2.0:attrname-format:basic
Cantonsen
sn urn:oasis:names:tc:SAML:2.0:attrname-format:basic
Cantonsen
`
fullAttributeSetJSON = `{
"NameStandIn": [
"Cantonsen"
],
"aud": "https://wayfsp.wayf.dk",
"cn": [
"Anton Banton Cantonsen"
],
"eduPersonAffiliation": [
"alum",
"student",
"member"
],
"eduPersonAssurance": [
"2"
],
"eduPersonEntitlement": [
"https://example.com/course101"
],
"eduPersonPrimaryAffiliation": [
"student"
],
"eduPersonPrincipalName": [
],
"eduPersonScopedAffiliation": [
],
"eduPersonTargetedID": [
"WAYF-DK-c52a92a5467ae336a2be77cd06719c645e72dfd2"
],
"entryUUID": [
"entryUUID"
],
"exp": "1234",
"gn": [
"Anton Banton \u003cSamlRequest id=\"abc\"\u003eabc\u003c/SamlRequest\u003e"
],
"iat": "1234",
"isMemberOf": [
"prefix.show",
"show.suffix",
"show.infix.show.infix.show"
],
"iss": "https://wayf.wayf.dk",
"mail": [
],
"nbf": "1234",
"norEduPersonLIN": [
"123456789"
],
"norEduPersonNIN": [
"2408586234"
],
"organizationName": [
"This Is Not A Valid IdP!"
],
"preferredLanguage": [
"da"
],
"saml:AuthenticatingAuthority": [
"https://this.is.not.a.valid.idp"
],
"schacCountryOfCitizenship": [
"dk"
],
"schacDateOfBirth": [
"18580824"
],
"schacHomeOrganization": [
"this.is.not.a.valid.idp"
],
"schacHomeOrganizationType": [
"urn:mace:terena.org:schac:homeOrganizationType:int:other"
],
"schacPersonalUniqueID": [
"urn:mace:terena.org:schac:personalUniqueID:dk:CPR:2408586234"
],
"schacYearOfBirth": [
"1858"
],
"sn": [
"Cantonsen"
]
}
`
fullInternalAttributeSet = `AuthnContextClassRef
Issuer
https://this.is.not.a.valid.idp
cn
Anton Banton Cantonsen
commonfederations
true
displayName
Anton Banton Cantonsen
eduPersonAffiliation
alum
member
student
eduPersonAssurance
2
eduPersonEntitlement
https://example.com/course101
eduPersonPrimaryAffiliation
student
eduPersonPrincipalName
eduPersonScopedAffiliation
eduPersonTargetedID
WAYF-DK-c52a92a5467ae336a2be77cd06719c645e72dfd2
entryUUID
entryUUID
gn
Anton Banton <SamlRequest id="abc">abc</SamlRequest>
hub
false
idpID
https://this.is.not.a.valid.idp
idpfeds
HUBIDP
WAYF
oes.dk
isMemberOf
just.at.lot.of.garbage
prefix.show
show.infix.show.infix.show
show.suffix
mail
modstlogonmethod
username-password-protected-transport
nemlogin
false
norEduPersonLIN
123456789
norEduPersonNIN
2408586234
oioCvrNumberIdentifier
12345678
organizationName
This Is Not A Valid IdP!
pairwise-id
persistent
preferredLanguage
da
schacCountryOfCitizenship
dk
schacDateOfBirth
18580824
schacHomeOrganization
this.is.not.a.valid.idp
schacHomeOrganizationType
urn:mace:terena.org:schac:homeOrganizationType:int:other
schacPersonalUniqueID
urn:mace:terena.org:schac:personalUniqueID:dk:CPR:2408586234
schacYearOfBirth
1858
securitydomain
this.is.not.a.valid.idp
sn
Cantonsen
spID
https://wayfsp.wayf.dk
spfeds
WAYF
nemlog-in.dk
qa.kmd.dk
test.nemlog-in.dk
test.wayf.dk
subsecuritydomain
this.is.not.a.valid.idp
uid
joe
`
)