-
Notifications
You must be signed in to change notification settings - Fork 0
/
gss-browserid.html
682 lines (668 loc) · 119 KB
/
gss-browserid.html
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en"><head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>A SASL and GSS-API Mechanism for the BrowserID Authentication Protocol</title><style type="text/css" title="Xml2Rfc (sans serif)">
a {
text-decoration: none;
}
a.smpl {
color: black;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
address {
margin-top: 1em;
margin-left: 2em;
font-style: normal;
}
body {
color: black;
font-family: verdana, helvetica, arial, sans-serif;
font-size: 10pt;
margin-right: 2em;
}
cite {
font-style: normal;
}
dl {
margin-left: 2em;
}
ul.empty {
list-style-type: none;
}
ul.empty li {
margin-top: .5em;
}
dl p {
margin-left: 0em;
}
dt {
margin-top: .5em;
}
h1 {
font-size: 14pt;
line-height: 21pt;
page-break-after: avoid;
}
h1.np {
page-break-before: always;
}
h1 a {
color: #333333;
}
h2 {
font-size: 12pt;
line-height: 15pt;
page-break-after: avoid;
}
h3, h4, h5, h6 {
font-size: 10pt;
page-break-after: avoid;
}
h2 a, h3 a, h4 a, h5 a, h6 a {
color: black;
}
img {
margin-left: 3em;
}
li {
margin-left: 2em;
}
ol {
margin-left: 2em;
}
ol.la {
list-style-type: lower-alpha;
}
ol.ua {
list-style-type: upper-alpha;
}
ol p {
margin-left: 0em;
}
p {
margin-left: 2em;
}
pre {
margin-left: 3em;
background-color: lightyellow;
padding: .25em;
page-break-inside: avoid;
}
pre.text2 {
border-style: dotted;
border-width: 1px;
background-color: #f0f0f0;
width: 69em;
}
pre.inline {
background-color: white;
padding: 0em;
}
pre.text {
border-style: dotted;
border-width: 1px;
background-color: #f8f8f8;
width: 69em;
}
pre.drawing {
border-style: solid;
border-width: 1px;
background-color: #f8f8f8;
padding: 2em;
}
table {
margin-left: 2em;
}
table.tt {
vertical-align: top;
}
table.full {
border-style: outset;
border-width: 1px;
}
table.headers {
border-style: outset;
border-width: 1px;
}
table.tt td {
vertical-align: top;
}
table.full td {
border-style: inset;
border-width: 1px;
}
table.tt th {
vertical-align: top;
}
table.full th {
border-style: inset;
border-width: 1px;
}
table.headers th {
border-style: none none inset none;
border-width: 1px;
}
table.left {
margin-right: auto;
}
table.right {
margin-left: auto;
}
table.center {
margin-left: auto;
margin-right: auto;
}
caption {
caption-side: bottom;
font-weight: bold;
font-size: 9pt;
margin-top: .5em;
}
table.header {
border-spacing: 1px;
width: 95%;
font-size: 10pt;
color: white;
}
td.top {
vertical-align: top;
}
td.topnowrap {
vertical-align: top;
white-space: nowrap;
}
table.header td {
background-color: gray;
width: 50%;
}
table.header a {
color: white;
}
td.reference {
vertical-align: top;
white-space: nowrap;
padding-right: 1em;
}
thead {
display:table-header-group;
}
ul.toc, ul.toc ul {
list-style: none;
margin-left: 1.5em;
padding-left: 0em;
}
ul.toc li {
line-height: 150%;
font-weight: bold;
font-size: 10pt;
margin-left: 0em;
}
ul.toc li li {
line-height: normal;
font-weight: normal;
font-size: 9pt;
margin-left: 0em;
}
li.excluded {
font-size: 0pt;
}
ul p {
margin-left: 0em;
}
.comment {
background-color: yellow;
}
.center {
text-align: center;
}
.error {
color: red;
font-style: italic;
font-weight: bold;
}
.figure {
font-weight: bold;
text-align: center;
font-size: 9pt;
}
.filename {
color: #333333;
font-weight: bold;
font-size: 12pt;
line-height: 21pt;
text-align: center;
}
.fn {
font-weight: bold;
}
.hidden {
display: none;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
.title {
color: #990000;
font-size: 18pt;
line-height: 18pt;
font-weight: bold;
text-align: center;
margin-top: 36pt;
}
.vcardline {
display: block;
}
.warning {
font-size: 14pt;
background-color: yellow;
}
@media print {
.noprint {
display: none;
}
a {
color: black;
text-decoration: none;
}
table.header {
width: 90%;
}
td.header {
width: 50%;
color: black;
background-color: white;
vertical-align: top;
font-size: 12pt;
}
ul.toc a::after {
content: leader('.') target-counter(attr(href), page);
}
ul.ind li li a {
content: target-counter(attr(href), page);
}
.print2col {
column-count: 2;
-moz-column-count: 2;
column-fill: auto;
}
}
@page {
@top-left {
content: "Internet-Draft";
}
@top-right {
content: "December 2013";
}
@top-center {
content: "BrowserID SASL & GSS-API";
}
@bottom-left {
content: "Howard & Williams";
}
@bottom-center {
content: "Expires June 12, 2014";
}
@bottom-right {
content: "[Page " counter(page) "]";
}
}
@page:first {
@top-left {
content: normal;
}
@top-right {
content: normal;
}
@top-center {
content: normal;
}
}
</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Requirements notation" href="#rfc.section.2"><link rel="Chapter" title="3 Naming" href="#rfc.section.3"><link rel="Chapter" title="4 Context tokens" href="#rfc.section.4"><link rel="Chapter" title="5 Validation" href="#rfc.section.5"><link rel="Chapter" title="6 Assertion claims" href="#rfc.section.6"><link rel="Chapter" title="7 Key derivation" href="#rfc.section.7"><link rel="Chapter" title="8 Example" href="#rfc.section.8"><link rel="Chapter" title="9 Security Considerations" href="#rfc.section.9"><link rel="Chapter" title="10 IANA Considerations" href="#rfc.section.10"><link rel="Chapter" href="#rfc.section.11" title="11 References"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.580, 2012-06-03 11:18:18, XSLT vendor: SAXON 9.1.0.8 from Saxonica http://www.saxonica.com/"><meta name="keywords" content="Internet-Draft"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Howard, L."><meta name="dct.creator" content="Williams, N."><meta name="dct.identifier" content="urn:ietf:id:draft-howard-gss-browserid-07.txt"><meta name="dct.issued" scheme="ISO8601" content="2013-12-09"><meta name="dct.abstract" content="This document defines protocols, procedures and conventions for a Generic Security Service Application Program Interface (GSS-API) security mechanism based on the BrowserID authentication mechanism. Through the GS2 family of mechanisms defined in RFC 5801, these protocols also define how Simple Authentication and Security Layer (SASL, RFC 4422) applications may use BrowserID."><meta name="description" content="This document defines protocols, procedures and conventions for a Generic Security Service Application Program Interface (GSS-API) security mechanism based on the BrowserID authentication mechanism. Through the GS2 family of mechanisms defined in RFC 5801, these protocols also define how Simple Authentication and Security Layer (SASL, RFC 4422) applications may use BrowserID."></head><body><table class="header"><tbody><tr><td class="left">Network Working Group</td><td class="right">L. Howard</td></tr><tr><td class="left">Internet-Draft</td><td class="right">PADL</td></tr><tr><td class="left">Intended status: Experimental</td><td class="right">N. Williams</td></tr><tr><td class="left">Expires: June 12, 2014</td><td class="right">Cryptonector</td></tr><tr><td class="left"></td><td class="right">December 9, 2013</td></tr></tbody></table><p class="title">A SASL and GSS-API Mechanism for the BrowserID Authentication Protocol<br><span class="filename">draft-howard-gss-browserid-07.txt</span></p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1><p>This document defines protocols, procedures and conventions for a Generic Security Service Application Program Interface (GSS-API) security mechanism based on the BrowserID authentication mechanism. Through the GS2 family of mechanisms defined in RFC 5801, these protocols also define how Simple Authentication and Security Layer (SASL, RFC 4422) applications may use BrowserID.</p><h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1><p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p><p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href="http://datatracker.ietf.org/drafts/current/">http://datatracker.ietf.org/drafts/current/</a>.</p><p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress”.</p><p>This Internet-Draft will expire on June 12, 2014.</p><h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright © 2013 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p><hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li>1. <a href="#d1e817">Introduction</a><ul><li>1.1 <a href="#d1e885">Discovery and Negotiation</a></li><li>1.2 <a href="#d1e909">Authentication</a></li><li>1.3 <a href="#d1e925">Message protection services</a></li></ul></li><li>2. <a href="#d1e953">Requirements notation</a></li><li>3. <a href="#d1e971">Naming</a><ul><li>3.1 <a href="#d1e986">GSS name types</a><ul><li>3.1.1 <a href="#sub_GSS_C_NT_BROWSERID_PRINCIPAL">GSS_C_NT_BROWSERID_PRINCIPAL</a></li><li>3.1.2 <a href="#d1e1022">GSS_C_NT_USER_NAME</a></li><li>3.1.3 <a href="#d1e1031">GSS_C_NT_HOSTBASED_SERVICE</a></li><li>3.1.4 <a href="#d1e1040">GSS_C_NT_DOMAINBASED_SERVICE</a></li><li>3.1.5 <a href="#d1e1066">GSS_C_NT_ANONYMOUS</a></li></ul></li><li>3.2 <a href="#d1e1075">Name canonicalization</a></li><li>3.3 <a href="#d1e1084">Exported name token format</a></li><li>3.4 <a href="#d1e1102">Naming extensions</a></li></ul></li><li>4. <a href="#d1e1124">Context tokens</a><ul><li>4.1 <a href="#d1e1276">Base protocol</a><ul><li>4.1.1 <a href="#sub_Initial_context_token">Initial context token</a></li><li>4.1.2 <a href="#sub_Acceptor_context_token">Acceptor context token</a></li><li>4.1.3 <a href="#sub_Initiator_context_completion">Initiator context completion</a></li></ul></li><li>4.2 <a href="#sub_Extensions_for_mutual">Mutual authentication</a><ul><li>4.2.1 <a href="#d1e1441">Initiator mutual authentication context token</a></li><li>4.2.2 <a href="#d1e1456">Acceptor mutual authentication context token</a></li><li>4.2.3 <a href="#d1e1478">Initiator mutual authentication context completion</a></li><li>4.2.4 <a href="#sub_NegoEx">Acceptor certificate advertisement</a></li></ul></li><li>4.3 <a href="#sub_Fast_re_authentication">Fast re-authentication</a><ul><li>4.3.1 <a href="#d1e1608">Ticket generation</a></li><li>4.3.2 <a href="#d1e1639">Initiator re-authentication context token</a></li><li>4.3.3 <a href="#d1e1690">Acceptor re-authentication context token</a></li><li>4.3.4 <a href="#d1e1727">Interaction with mutual authentication</a></li><li>4.3.5 <a href="#d1e1739">Ticket renewal</a></li></ul></li><li>4.4 <a href="#sub_XRT_option">Extra round-trip (XRT) option</a><ul><li>4.4.1 <a href="#d1e1766">Initiator XRT advertisement</a></li><li>4.4.2 <a href="#d1e1784">Acceptor XRT advertisement</a></li><li>4.4.3 <a href="#d1e1796">Initiator XRT context token</a></li><li>4.4.4 <a href="#d1e1808">Acceptor XRT context token validation</a></li><li>4.4.5 <a href="#d1e1820">Interaction with message protection services</a></li></ul></li></ul></li><li>5. <a href="#d1e1839">Validation</a><ul><li>5.1 <a href="#d1e1845">Expiry times</a></li><li>5.2 <a href="#d1e1863">Audience</a></li><li>5.3 <a href="#d1e1875">Channel bindings</a></li><li>5.4 <a href="#d1e1888">Key agreement</a></li><li>5.5 <a href="#d1e1909">Signatures</a></li><li>5.6 <a href="#sub_Replay_detection">Replay detection</a></li><li>5.7 <a href="#d1e1929">Return flags</a></li></ul></li><li>6. <a href="#d1e1986">Assertion claims</a><ul><li>6.1 <a href="#d1e1992">Request (initiator/UA) assertion</a><ul><li>6.1.1 <a href="#sub_request_aud">“aud” (Audience)</a></li><li>6.1.2 <a href="#sub_request_exp">“exp” (Expiry time)</a></li><li>6.1.3 <a href="#sub_request_iat">“iat” (Issued at time)</a></li><li>6.1.4 <a href="#sub_request_nbf">”nbf” (Not before time)</a></li><li>6.1.5 <a href="#sub_request_ecdh">"epk" (Ephemeral Public Key)</a></li><li>6.1.6 <a href="#sub_request_cbt">“cb” (Channel binding)</a></li><li>6.1.7 <a href="#sub_request_nonce">"nonce" (Mutual authentication nonce)</a></li><li>6.1.8 <a href="#sub_request_tkt">“tkt” (Ticket)</a></li><li>6.1.9 <a href="#sub_request_opts">”opts” (Options)</a></li></ul></li><li>6.2 <a href="#d1e2226">Response (acceptor/RP) assertion</a><ul><li>6.2.1 <a href="#sub_response_iat">“iat” (Issued at time)</a></li><li>6.2.2 <a href="#sub_response_ecdh">“epk” (Ephemeral Public Key)</a></li><li>6.2.3 <a href="#sub_response_exp">“exp” (Expiry time)</a></li><li>6.2.4 <a href="#sub_response_nonce">“nonce” (Mutual authentication nonce)</a></li><li>6.2.5 <a href="#sub_response_tkt">“tkt” (Ticket)</a></li><li>6.2.6 <a href="#sub_response_jti">”jti” (JWT ID)</a></li></ul></li><li>6.3 <a href="#d1e2345">Error (acceptor/RP) assertion</a><ul><li>6.3.1 <a href="#sub_response_gss_maj">“gss-maj” (GSS major status code)</a></li><li>6.3.2 <a href="#sub_response_gss_min">“gss-min” (GSS minor status code)</a></li></ul></li><li>6.4 <a href="#d1e3083">XRT assertion</a></li></ul></li><li>7. <a href="#d1e3092">Key derivation</a><ul><li>7.1 <a href="#sub_kd_DHK">Diffie-Hellman Key (DHK)</a></li><li>7.2 <a href="#sub_kd_CMK">Context Master Key (CMK)</a></li><li>7.3 <a href="#sub_kd_RRK">RP Response Key (RRK)</a></li><li>7.4 <a href="#sub_kd_CRK">Context Root Key (CRK)</a></li><li>7.5 <a href="#sub_kd_ARK">Authenticator Root Key (ARK)</a></li><li>7.6 <a href="#sub_kd_ASK">Authenticator Session Key (ASK)</a><ul><li>7.6.1 <a href="#sub_kd_XRTK">Extra Round Trip Key (XRTK)</a></li></ul></li><li>7.7 <a href="#sub_GSS_PRF">GSS Pseudo-Random Function (PRF)</a></li></ul></li><li>8. <a href="#d1e3252">Example</a></li><li>9. <a href="#d1e3332">Security Considerations</a><ul><li>9.1 <a href="#d1e3378">Host certificates for mutual authentication</a></li><li>9.2 <a href="#d1e3387">Error statuses</a></li></ul></li><li>10. <a href="#d1e3399">IANA Considerations</a><ul><li>10.1 <a href="#sub_OID_Registry">OID Registry</a></li><li>10.2 <a href="#d1e3667">SASL Registry</a></li></ul></li><li>11. <a href="#rfc.references">References</a><ul><li>11.1 <a href="#rfc.references.1">Normative References</a></li><li>11.2 <a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#rfc.authors">Authors' Addresses</a></li></ul><ul class="toc"><li>Figures
<ul><li><a href="#rfc.figure.1">Figure 1: Interworking Architecture</a></li></ul></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> <a id="d1e817" href="#d1e817">Introduction</a></h1><p id="rfc.section.1.p.1"><a href="#BrowserID"><cite title="BrowserID Specification">[BrowserID]</cite></a> is a web-based three-party security protocol by which user agents can present to a Relying Party (RP) a signed assertion of e-mail address ownership. BrowserID was intended to be used for web authentication. We find BrowserID to be useful in general, therefore we define herein how to use it in many more applications.</p><p id="rfc.section.1.p.2">The Simple Authentication and Security Layer (SASL) <a href="#RFC4422"><cite title="Simple Authentication and Security Layer (SASL)">[RFC4422]</cite></a> is a framework for providing authentication and message protection services via pluggable mechanisms. Protocols that support it include IMAP, SMTP, and XMPP.</p><p id="rfc.section.1.p.3">The Generic Security Service Application Program Interface (GSS-API) <a href="#RFC2743"><cite title="Generic Security Service Application Program Interface Version 2, Update 1">[RFC2743]</cite></a> provides a framework for authentication and message protection services through a common programming interface. This document conforms to the SASL and GSS-API bridge specified in <a href="#RFC5801"><cite title="Using Generic Security Service Application Program Interface (GSS-API) Mechanisms in Simple Authentication and Security Layer (SASL): The GS2 Mechanism Family">[RFC5801]</cite></a>, so it defines both a SASL and GSS-API mechanism.</p><p id="rfc.section.1.p.4">The BrowserID mechanism described in this document reuses the existing web-based BrowserID protocol, but profiles it for use in applications that support SASL or GSS-API, adding features such as key agreement, mutual authentication, and fast re-authentication.</p><p id="rfc.section.1.p.5">The following diagram illustrates the interactions between the three parties in the GSS BrowserID protocol. Note that the terms client, initiator and user agent (UA) are used interchangeably in this document, as are server, acceptor and relying party (RP).</p><p id="rfc.section.1.p.7"> </p><div id="magicparlabel-175"></div><div id="rfc.figure.1"></div><pre>
+------------+
| BrowserID |
| identity |
| provider |
+------------+
// \\
// \\
// \\
// \\
make signed // \\ fetch IdP public
certificate // \\ key over HTTPS
for user's // \\ (RP may cache)
public key // \\
// \\
// \\
// \\
|/ \|
+-------------+ +-------------+
| SASL or GSS | GSS BrowserID | SASL or GSS |
| client/UA |<------------------->| server/RP |
| (initiator) | | (acceptor) |
+-------------+ +-------------+
</pre><p class="figure">Figure 1: Interworking Architecture</p><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> <a id="d1e885" href="#d1e885">Discovery and Negotiation</a></h2><p id="rfc.section.1.1.p.1">The means of discovering GSS-API peers and their supported mechanisms is out of this specification's scope. They may use SASL <a href="#RFC4422"><cite title="Simple Authentication and Security Layer (SASL)">[RFC4422]</cite></a> or the Simple and Protected Negotiation mechanism (SPNEGO) <a href="#RFC4178"><cite title="The Simple and Protected Generic Security Service Application Program Interface (GSS-API) Negotiation Mechanism">[RFC4178]</cite></a>.</p><p id="rfc.section.1.1.p.2">Discovery of a BrowserID identity provider (IdP) for a user is described in the BrowserID specification. A domain publishes a document containing their public key and URIs for authenticating and provisioning users, or pointer to an authority containing such a document.</p><h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a> <a id="d1e909" href="#d1e909">Authentication</a></h2><p id="rfc.section.1.2.p.1">The GSS-API protocol involves a client, known as the initiator, sending an initial security context token of a chosen GSS-API security mechanism to a peer, known as the acceptor. The two peers subsequently exchange, synchronously, as many security context tokens as necessary to complete the authentication or fail. The specific number of context tokens exchanged varies by security mechanism: in the case of the BrowserID mechanism, it is typically two (i.e. a single round trip), however it can be more in some cases. Once authentication is complete, the initiator and acceptor share a security context which identifies the peers and can optionally be used for integrity or confidentiality protecting subsequent application messages.</p><p id="rfc.section.1.2.p.2">The original BrowserID protocol, as defined outside this document, specifies a bearer token authentication protocol for web applications. The user agent generates a short-term key pair, the public key of which is signed by the user's IdP. (The user must have already authenticated to the IdP; how this is done is not specified by BrowserID, but forms-based authentication is common.) The IdP returns a certificate for the user which may be cached by the user's browser. When authenticating to a Relying Party (RP), the browser generates an identity assertion containing the RP domain and an expiration time. The user agent signs this and presents both the assertion and certificate to the RP. (The combination of an assertion and zero or more certificates is termed a “backed assertion”.) The RP fetches the public key for the IdP, validates the user's certificate (and those of any intermediate certifying parties) and then verifies the assertion.</p><p id="rfc.section.1.2.p.3">The GSS BrowserID protocol extends this by having the RP always send back a response to the user agent, which at a minimum provides key confirmation (this is needed for some key agreement methods) and indicates the lifetime of the established security context. The key confirmation token is also required for mutual authentication, when the initiator application requests that feature.</p><h2 id="rfc.section.1.3"><a href="#rfc.section.1.3">1.3</a> <a id="d1e925" href="#d1e925">Message protection services</a></h2><p id="rfc.section.1.3.p.1">GSS-API provides a number of a message protection services:</p><p id="rfc.section.1.3.p.2"> </p><dl><dt>GSS_Wrap()</dt><dd>integrity and optional confidentiality for a message</dd><dt>GSS_GetMIC()</dt><dd>integrity for a message sent separately</dd><dt>GSS_Pseudo_random()</dt><dd>shared key derivation (e.g., for keying external confidentiality+integrity layers)</dd></dl><p id="rfc.section.1.3.p.3">These services may be used with security contexts that have a shared session key, to protect application-layer messages.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> <a id="d1e953" href="#d1e953">Requirements notation</a></h1><p id="rfc.section.2.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.</p><p id="rfc.section.2.p.2">The reader is assumed to be familiar with the terms used in the BrowserID specification.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> <a id="d1e971" href="#d1e971">Naming</a></h1><p id="rfc.section.3.p.1">The GSS-API provides a rich security principal naming model. At its most basic the query forms of names consist of a user-entered/displayable string and a “name-type”. Name-types are constants with names prefixed with “GSS_C_NT_” in the GSS-API. Names may also have attributes <a href="#RFC6680"><cite title="Generic Security Service Application Programming Interface (GSS-API) Naming Extensions">[RFC6680]</cite></a>.</p><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> <a id="d1e986" href="#d1e986">GSS name types</a></h2><h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a> <a id="sub_GSS_C_NT_BROWSERID_PRINCIPAL" href="#sub_GSS_C_NT_BROWSERID_PRINCIPAL">GSS_C_NT_BROWSERID_PRINCIPAL</a></h3><p id="rfc.section.3.1.1.p.1">This name may contain an e-mail address, or a service principal name identifying an acceptor. The encoding of service principal names is intended to be somewhat compatible with the Kerberos <a href="#RFC4120"><cite title="The Kerberos Network Authentication Service (V5)">[RFC4120]</cite></a> security protocol (without the realm name).</p><p id="rfc.section.3.1.1.p.2">The following ABNF defines the 'name' rule that names of this type must match.</p><p id="rfc.section.3.1.1.p.3"> <span class="comment" id="rfc.comment.1">[<a href="#rfc.comment.1" class="smpl">rfc.comment.1</a>: Should we reference RFC2822 here? The Mozilla BrowserID docs sure don't.]</span> </p><p id="rfc.section.3.1.1.p.5"> </p><div id="rfc.figure.u.1"></div><pre> char-normal = %x00-2E/%x30-3F/%x41-5B/%x5D-FF
char-escaped = "\" %x2F / "\" %x40 / "\" %x5C
name-char = char-normal / char-escaped
name-string = 1*name-char
user = name-string
domain = name-string
email = user "@" domain
service-name = name-string
service-host = name-string
service-specific = name-string
service-specifics = service-specific 0*("/" service-specifics)
spn = service-name ["/" service-host [ "/" service-specifics]]
name = email / spn</pre><h3 id="rfc.section.3.1.2"><a href="#rfc.section.3.1.2">3.1.2</a> <a id="d1e1022" href="#d1e1022">GSS_C_NT_USER_NAME</a></h3><p id="rfc.section.3.1.2.p.1">This name is implicitly converted to a GSS_C_NT_BROWSERID_PRINCIPAL. A default domain may be appended when importing names of this type.</p><h3 id="rfc.section.3.1.3"><a href="#rfc.section.3.1.3">3.1.3</a> <a id="d1e1031" href="#d1e1031">GSS_C_NT_HOSTBASED_SERVICE</a></h3><p id="rfc.section.3.1.3.p.1">This name is transformed by replacing the “@” symbol with a “/”, and then implicitly converted to a GSS_C_NT_BROWSERID_PRINCIPAL.</p><h3 id="rfc.section.3.1.4"><a href="#rfc.section.3.1.4">3.1.4</a> <a id="d1e1040" href="#d1e1040">GSS_C_NT_DOMAINBASED_SERVICE</a></h3><p id="rfc.section.3.1.4.p.1"><a href="#RFC5178"><cite title="Generic Security Service Application Program Interface (GSS-API) Internationalization and Domain-Based Service Names and Name Type">[RFC5178]</cite></a> domain-based service names are transformed into a GSS_C_NT_BROWSERID_PRINCIPAL as follows:</p><p id="rfc.section.3.1.4.p.2"> </p><ul><li>the <service> name becomes the first component of the BrowserID principal name (service-name in ABNF)</li><li>the <hostname> becomes the second component (service-host)</li><li>the <domain> name becomes the third component (service-specific)</li></ul><h3 id="rfc.section.3.1.5"><a href="#rfc.section.3.1.5">3.1.5</a> <a id="d1e1066" href="#d1e1066">GSS_C_NT_ANONYMOUS</a></h3><p id="rfc.section.3.1.5.p.1">If the initiator principal's leaf certificate does not contain a “principal” claim, then the initiator name has this name type.</p><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="d1e1075" href="#d1e1075">Name canonicalization</a></h2><p id="rfc.section.3.2.p.1">The BrowserID GSS-API mechanism performs no name canonicalization. The mechanism's GSS_Canonicalize_name() returns an MN whose display form is the same as the query form. Of course, the principal named obtained from a CREDENTIAL HANDLE may be canonical in that the IdP might only issue credentials for canonical names, but credential acquisition is out of scope here.</p><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="d1e1084" href="#d1e1084">Exported name token format</a></h2><p id="rfc.section.3.3.p.1">The exported name token format for the BrowserID GSS-API mechanism is the same as the query form, plus the standard exported name token format header mandated by the GSS-API <a href="#RFC2743"><cite title="Generic Security Service Application Program Interface Version 2, Update 1">[RFC2743]</cite></a>.</p><p id="rfc.section.3.3.p.2"> <span class="comment" id="rfc.comment.2">[<a href="#rfc.comment.2" class="smpl">rfc.comment.2</a>: Do we wish to say anything about the exported composite name token format? It should be an encoding of the initiator's leaf certificate.]</span> </p><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> <a id="d1e1102" href="#d1e1102">Naming extensions</a></h2><p id="rfc.section.3.4.p.1">The acceptor MAY surface attributes from the assertion and any certificates using GSS_Get_name_attribute() (see <a href="#RFC6680"><cite title="Generic Security Service Application Programming Interface (GSS-API) Naming Extensions">[RFC6680]</cite></a>). The URN prefix is "urn:<TBD>:params:gss:jwt". If a SAML assertion is present in the "saml" parameter of the leaf certificate, it may be surfaced using the URN prefix "urn:<TBD>:params:gss:federated-saml-attribute".</p><p id="rfc.section.3.4.p.2">Attributes from the assertion MUST be marked as unauthenticated unless otherwise validated by the acceptor (e.g. the audience).</p><p id="rfc.section.3.4.p.3">Attributes from certificates SHOULD be marked as authenticated.</p><hr class="noprint"><h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> <a id="d1e1124" href="#d1e1124">Context tokens</a></h1><p id="rfc.section.4.p.1">All context tokens include a two-byte token identifier followed by a backed BrowserID assertion. This document defines the following token IDs:</p><div id="rfc.table.u.1"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="center">Section</th><th class="center">Token ID</th><th class="center">ASCII</th><th class="center">Description</th></tr></thead><tbody><tr><td class="center">4.1.1</td><td class="center">0x632C</td><td class="center">c,</td><td class="center">Initiator context token</td></tr><tr><td class="center">4.1.2</td><td class="center">0x432C</td><td class="center">C,</td><td class="center">Acceptor context token</td></tr><tr><td class="center"></td><td class="center">0x442C</td><td class="center">D,</td><td class="center">Context deletion token</td></tr><tr><td class="center">4.2.4</td><td class="center">0x6D2C</td><td class="center">m,</td><td class="center">Initiator metadata token</td></tr><tr><td class="center">4.2.4</td><td class="center">0x4D2C</td><td class="center">M,</td><td class="center">Acceptor metadata token</td></tr></tbody></table></div><p id="rfc.section.4.p.2">The token ID has a human-readable ASCII encoding for the benefit of pure SASL implementations of this mechanism.</p><h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> <a id="d1e1276" href="#d1e1276">Base protocol</a></h2><h3 id="rfc.section.4.1.1"><a href="#rfc.section.4.1.1">4.1.1</a> <a id="sub_Initial_context_token" href="#sub_Initial_context_token">Initial context token</a></h3><p id="rfc.section.4.1.1.p.1">The initial context token is framed per Section 1 of <a href="#RFC2743"><cite title="Generic Security Service Application Program Interface Version 2, Update 1">[RFC2743]</cite></a>:</p><p id="rfc.section.4.1.1.p.3"> </p><div id="rfc.figure.u.2"></div><pre> GSS-API DEFINITIONS ::=
BEGIN
MechType ::= OBJECT IDENTIFIER
-- representing BrowserID mechanism
GSSAPI-Token ::=
[APPLICATION 0] IMPLICIT SEQUENCE {
thisMech MechType,
innerToken ANY DEFINED BY thisMech
-- token ID and backed assertion
}
END</pre><p id="rfc.section.4.1.1.p.4">Unlike many other GSS-API mechanisms such as Kerberos, this token framing is not used by subsequent context or by <a href="#I-D.zhu-negoex"><cite title="SPNEGO Extended Negotiation (NEGOEX) Security Mechanism">[I-D.zhu-negoex]</cite></a> metadata tokens. As such, pure SASL implementations of this mechanism do not need to deal with DER encoding the mechanism object identifier.</p><p id="rfc.section.4.1.1.p.5">GSS BrowserID is a family of mechanisms, where the last element in the OID arc indicates the <a href="#RFC4121"><cite title="The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2">[RFC4121]</cite></a> encryption type supported for message protection services. The OID prefix is 1.3.6.1.4.1.5322.24.1. The NULL encryption type is valid, in which case services that require a key are not available.</p><p id="rfc.section.4.1.1.p.6">The innerToken consists of the initiator context token ID concatenated with a backed assertion for the audience corresponding to the target name passed into GSS_Init_sec_context(). In addition, the assertion MAY contain the additional claims, which are described later in this document:</p><p id="rfc.section.4.1.1.p.7"> </p><ul><li>ECDH key agreement parameters (see <a href="#sub_request_ecdh" title=""epk" (Ephemeral Public Key)">Section 6.1.5</a>)</li><li>Channel binding information (see <a href="#sub_request_cbt" title="“cb” (Channel binding)">Section 6.1.6</a>)</li><li>A nonce for binding the request to a response signed with a private key for mutual authentication (see <a href="#sub_request_nonce" title=""nonce" (Mutual authentication nonce)">Section 6.1.7</a>)</li><li>A ticket identifier for fast re-authentication using an established session key rather than a BrowserID certificate (see <a href="#sub_request_tkt" title="“tkt” (Ticket)">Section 6.1.8</a>)</li></ul><p id="rfc.section.4.1.1.p.8">The call to GSS_Init_sec_context() returns GSS_C_CONTINUE_NEEDED to indicate that a subsequent context token from the acceptor is expected.</p><h3 id="rfc.section.4.1.2"><a href="#rfc.section.4.1.2">4.1.2</a> <a id="sub_Acceptor_context_token" href="#sub_Acceptor_context_token">Acceptor context token</a></h3><p id="rfc.section.4.1.2.p.1">Upon receiving a context token from the initiator, the acceptor validates that the token is well formed and contains a valid BrowserID mechanism OID and the initiator context token ID.</p><p id="rfc.section.4.1.2.p.2">The acceptor then verifies the backed identity assertion per the BrowserID specification. This includes validating the expiry times, audience, certificate chain, and assertion signature. The acceptor then verifies the channel binding token, if present, and any other GSS-specific claims in the assertion. In case of failure, a response assertion containing GSS major and minor status codes SHOULD be returned.</p><p id="rfc.section.4.1.2.p.3">If the <a href="#RFC3961"><cite title="Encryption and Checksum Specifications for Kerberos 5">[RFC3961]</cite></a> encryption type for the selected mechanism is not ENCTYPE_NULL, the acceptor generates a ECDH public key using the parameters received from the client (see <a href="#sub_response_ecdh" title="“epk” (Ephemeral Public Key)">Section 6.2.2</a>), and from it derives the RP Response Key (RRK) (see <a href="#sub_kd_RRK" title="RP Response Key (RRK)">Section 7.3</a>). The acceptor then generates a response assertion containing its ECDH public key and context expiration time (note that the context expiration time is a purely informational quantity). The response assertion will be:</p><p id="rfc.section.4.1.2.p.4"> </p><ul><li>signed in the acceptor's private key, if mutual authentication was requested, and the acceptor has a key (see <a href="#sub_Extensions_for_mutual" title="Mutual authentication">Section 4.2</a>);</li><li>signed in the RRK, if the encryption type for the selected mechanism is not ENCTYPE_NULL;</li><li>not signed in all other cases.</li></ul><p id="rfc.section.4.1.2.p.5">The response assertion is encoded as a backed assertion, prefixed with the acceptor context token ID. It SHALL have a certificate count of zero.</p><p id="rfc.section.4.1.2.p.6">Finally, the Context Root Key (CRK) (see <a href="#sub_kd_CRK" title="Context Root Key (CRK)">Section 7.4</a>) is derived from the ECDH shared secret (if present) and GSS_S_COMPLETE is returned, along with the initiator name from the verified assertion. If the CRK is available, the replay_det_state (GSS_C_REPLAY_FLAG), sequence_state (GSS_C_SEQUENCE_FLAG), conf_avail (GSS_C_CONF_FLAG) and integ_avail (GSS_C_INTEG_FLAG) security context flags are set to TRUE.</p><p id="rfc.section.4.1.2.p.7">Other assertion/certificate claims MAY be made available via GSS_Get_name_attribute().</p><h3 id="rfc.section.4.1.3"><a href="#rfc.section.4.1.3">4.1.3</a> <a id="sub_Initiator_context_completion" href="#sub_Initiator_context_completion">Initiator context completion</a></h3><p id="rfc.section.4.1.3.p.1">Upon receiving the acceptor context token, the initiator unpacks the response assertion and, if applicable, computes the ECDH shared secret and RRK. The RRK is used to verify the response assertion unless mutual authentication is available, in which case the acceptor's public key will be used.</p><p id="rfc.section.4.1.3.p.2">The initiator sets the context expiry time with that received in the response assertion, if present; otherwise, the context expires when the initiator principal's certificate expires.</p><p id="rfc.section.4.1.3.p.3">The CRK is derived from the ECDH shared secret and GSS_S_COMPLETE is returned to indicate the initiator is authenticated and the context is ready for use. No output token is emitted. Security context flags are set as for the acceptor context.</p><h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> <a id="sub_Extensions_for_mutual" href="#sub_Extensions_for_mutual">Mutual authentication</a></h2><p id="rfc.section.4.2.p.1">Mutual authentication allows the acceptor to be authenticated to the initiator. The mechanism SHALL set the mutual_state security context flag (GSS_C_MUTUAL_FLAG) to TRUE if mutual authentication succeeded. Support for mutual authentication is OPTIONAL.</p><p id="rfc.section.4.2.p.2">The base protocol is extended as follows to support this:</p><h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a> <a id="d1e1441" href="#d1e1441">Initiator mutual authentication context token</a></h3><p id="rfc.section.4.2.1.p.1">If the initiator requested the mutual_state flag, it sends in its request assertion an “opts” claim (see <a href="#sub_request_opts" title="”opts” (Options)">Section 6.1.9</a>) containing the “ma” value. It also includes a nonce (see <a href="#sub_request_nonce" title=""nonce" (Mutual authentication nonce)">Section 6.1.7</a>) in order to bind the initiator and acceptor assertions.</p><h3 id="rfc.section.4.2.2"><a href="#rfc.section.4.2.2">4.2.2</a> <a id="d1e1456" href="#d1e1456">Acceptor mutual authentication context token</a></h3><p id="rfc.section.4.2.2.p.1">If the acceptor has a private key and certificate available and the initiator indicated it desired mutual authentication by including the “ma” protocol option, the acceptor signs the response using a private key rather than the RP Response Key (RRK). The response includes the nonce from the initiator's assertion. The acceptor MUST reject requests for mutual authentication lacking a nonce.</p><p id="rfc.section.4.2.2.p.2">While the response is a backed assertion, in order to take advantage of existing keying infrastructures BrowserID certificates MUST NOT be included in the backed assertion. Rather, an X.509 certificate SHALL be included as a value for the "x5c" header parameter in the assertion (see <a href="#I-D.ietf-jose-json-web-signature"><cite title="JSON Web Signature (JWS)">[I-D.ietf-jose-json-web-signature]</cite></a> 4.1.6). The certificate MUST be valid for signing.</p><p id="rfc.section.4.2.2.p.3"> <span class="comment" id="rfc.comment.3">[<a href="#rfc.comment.3" class="smpl">rfc.comment.3</a>: We don't want to burden the initiator with having to implement both methods of authenticating acceptors, and given that initiators and acceptors both will generally need a PKIX implementation, and given that acceptors will need a PKIX credential for TLS, and that there is as yet no standard protocol for automatic provisioning of BrowserID credentials for servers, using PKIX to authenticate the server seems to be the easiest way to go.]</span> </p><h3 id="rfc.section.4.2.3"><a href="#rfc.section.4.2.3">4.2.3</a> <a id="d1e1478" href="#d1e1478">Initiator mutual authentication context completion</a></h3><p id="rfc.section.4.2.3.p.1">The initiator verifies the assertion signature and that the nonce matches, and validates the certificate chain according to <a href="#RFC5280"><cite title="Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile">[RFC5280]</cite></a>.</p><p id="rfc.section.4.2.3.p.2">Initiators MUST authenticate the service name using the matching rules below:</p><p id="rfc.section.4.2.3.p.3"> </p><ul><li>A service-name EKU from the registry defined by <a href="#I-D.zhu-pku2u"><cite title="Public Key Cryptography Based User-to-User Authentication - (PKU2U)">[I-D.zhu-pku2u]</cite></a>; id-kpServerAuth maps to the “http” service</li><li>A spn expressed as a KRB5PrincipalName in the id-pkinit-san otherName SAN (see <a href="#RFC4556"><cite title="Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)">[RFC4556]</cite></a> Section 3.2.2; the realm is ignored)</li><li>A service-name expressed as a SRVName SAN (see <a href="#RFC4985"><cite title="Internet X.509 Public Key Infrastructure Subject Alternative Name for Expression of Service Name">[RFC4985]</cite></a>)</li><li>Optionally, an out-of-band binding to the certificate</li></ul><p id="rfc.section.4.2.3.p.4">If there are no EKUs, or a single EKU containing id-kp-anyExtendedKeyUsage, and no SAN containing the service name is present, then all service names match. If a SAN containing the service name is present, then any EKUs are ignored.</p><p id="rfc.section.4.2.3.p.5">If the the host component of the service name (service-host) is not expressed in a SAN as specified above, it MUST be present as a value for the dNSName SAN or as the least significant Common Name RDN.</p><p id="rfc.section.4.2.3.p.6">Note only the id-pkinit-san or SRVName SANs provide the ability to authenticate the a service name containing a service-specific component.</p><h3 id="rfc.section.4.2.4"><a href="#rfc.section.4.2.4">4.2.4</a> <a id="sub_NegoEx" href="#sub_NegoEx">Acceptor certificate advertisement</a></h3><p id="rfc.section.4.2.4.p.1"><a href="#I-D.zhu-negoex"><cite title="SPNEGO Extended Negotiation (NEGOEX) Security Mechanism">[I-D.zhu-negoex]</cite></a> may be used to advertise acceptor certificates.</p><p id="rfc.section.4.2.4.p.2">If the acceptor supports mutual authentication, it MAY include its certificate and any additional certificates inside a backed assertion with an empty payload as output for GSS_Query_meta_data(). The "assertion" is prefixed with the two byte token identifier “M,”.</p><p id="rfc.section.4.2.4.p.3">Upon receiving this, the initiator MAY validate the certificate or fingerprint, or present either to the initiator before committing to authenticate.</p><p id="rfc.section.4.2.4.p.4">The NegoEx signing key is the output of GSS_Pseudo_random() (see <a href="#sub_GSS_PRF" title="GSS Pseudo-Random Function (PRF)">Section 7.7</a>) with an input of GSS_C_PRF_KEY_FULL and "gss-browserid-negoex-initiator" or "gss-browserid-negoex-acceptor" (without quotes), depending on the party generating the signature.</p><p id="rfc.section.4.2.4.p.5">The NegoEx authentication scheme is the binary encoding of the following hexadecimal string:</p><p id="rfc.section.4.2.4.p.6">535538008647F5BC624BD8076949F0</p><p id="rfc.section.4.2.4.p.7">where the third byte (zero above) is set to the <a href="#RFC3961"><cite title="Encryption and Checksum Specifications for Kerberos 5">[RFC3961]</cite></a> encryption type for the selected mechanism. The authentication scheme for encryption types greater than 255 is not specified here.</p><p id="rfc.section.4.2.4.p.8">There is currently no initiator-sent metadata defined and acceptors should ignore any sent. The metadata is advisory and the initiator is free to ignore it.</p><p id="rfc.section.4.2.4.p.9"> <span class="comment" id="rfc.comment.4">[<a href="#rfc.comment.4" class="smpl">rfc.comment.4</a>: Delete this section as NegoEx will likely not be progressed.]</span> </p><h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a> <a id="sub_Fast_re_authentication" href="#sub_Fast_re_authentication">Fast re-authentication</a></h2><p id="rfc.section.4.3.p.1">Fast re-authentication allows a security context to be established using a secret key derived from the initial certificate-signed ECDH key agreement.</p><p id="rfc.section.4.3.p.2">The re-authentication assertion is signed with a HMAC using the Authenticator Root Key (ARK) (see <a href="#sub_kd_ARK" title="Authenticator Root Key (ARK)">Section 7.5</a>), rather than a initiator principal's BrowserID certificate.</p><p id="rfc.section.4.3.p.3">Support for fast re-authentication is OPTIONAL and is indicated by the acceptor returning a ticket in the response assertion.</p><h3 id="rfc.section.4.3.1"><a href="#rfc.section.4.3.1">4.3.1</a> <a id="d1e1608" href="#d1e1608">Ticket generation</a></h3><p id="rfc.section.4.3.1.p.1">If the acceptor supports re-authentication, the following steps are added to <a href="#sub_Acceptor_context_token" title="Acceptor context token">Section 4.1.2</a>:</p><p id="rfc.section.4.3.1.p.2"> </p><ol><li>A unique, opaque ticket identifier is generated.</li><li>The acceptor creates a JSON object containing the ticket identifier and expiry time and returns it in the response to the initiator (see <a href="#sub_response_tkt" title="“tkt” (Ticket)">Section 6.2.5</a>).</li></ol><p id="rfc.section.4.3.1.p.3">The acceptor must be able to use the ticket identifier to securely retrieve the subject, issuer, audience, expiry time, ARK and any other relevant properties of the original security context. One implementation choice may be to use the ticket identifier as a key into a dictionary containing this information. Another would be to encrypt this information in a long-term secret only known to the acceptor and encode the resulting cipher-text in the opaque ticket identifier.</p><p id="rfc.section.4.3.1.p.4">The ticket expiry time by default SHOULD match the initiator's certificate expiry, however it MAY be configurable so the ticket expires before or after the certificate.</p><p id="rfc.section.4.3.1.p.5">The initiator MAY cache tickets, along with the ARK, received from the acceptor in order to re-authenticate to it at a future time.</p><h3 id="rfc.section.4.3.2"><a href="#rfc.section.4.3.2">4.3.2</a> <a id="d1e1639" href="#d1e1639">Initiator re-authentication context token</a></h3><p id="rfc.section.4.3.2.p.1">The initiator looks in its ticket cache for an unexpired ticket for the desired acceptor. If none is found, the normal certificate-based authentication flow is performed, otherwise:</p><p id="rfc.section.4.3.2.p.2"> </p><ol><li>The initiator generates a re-authentication assertion containing: the name of the acceptor (see <a href="#sub_request_aud" title="“aud” (Audience)">Section 6.1.1</a>), an expiry time (see <a href="#sub_request_exp" title="“exp” (Expiry time)">Section 6.1.2</a>) and/or the current time (see <a href="#sub_request_iat" title="“iat” (Issued at time)">Section 6.1.3</a>), optional channel binding information (see <a href="#sub_request_cbt" title="“cb” (Channel binding)">Section 6.1.6</a>), a random nonce (see <a href="#sub_request_nonce" title=""nonce" (Mutual authentication nonce)">Section 6.1.7</a>), and the ticket identifier (see <a href="#sub_request_tkt" title="“tkt” (Ticket)">Section 6.1.8</a>).</li><li>The initiator signs the re-authentication assertion with the ARK, using the hash algorithm associated with the original context key (see <a href="#sub_OID_Registry" title="OID Registry">Section 10.1</a>; HS256 is specified for the encryption types referenced in this document).</li><li>The re-authentication assertion is packed into a backed assertion. The certificate count is zero as the assertion is signed with an established symmetric key.</li><li>The initiator generates an Authenticator Session Key (ASK) (see <a href="#sub_kd_ASK" title="Authenticator Session Key (ASK)">Section 7.6</a>) which is used to verify the response and derive the CRK.</li></ol><p id="rfc.section.4.3.2.p.3"> <span class="comment" id="rfc.comment.5">[<a href="#rfc.comment.5" class="smpl">rfc.comment.5</a>: Question: do we want an option to do an ECDH session key exchange in the fast re-auth case? If we had a GSS req_flag for requesting perfect forward security (PFS) then we would want to have this option.]</span> </p><h3 id="rfc.section.4.3.3"><a href="#rfc.section.4.3.3">4.3.3</a> <a id="d1e1690" href="#d1e1690">Acceptor re-authentication context token</a></h3><p id="rfc.section.4.3.3.p.1"> </p><ol><li>The acceptor unpacks the re-authentication assertion and retrieves the ARK, ticket expiry time, mutual authentication state and any other properties (such as the initiator name) associated with the ticket identifier.</li><li>The acceptor validates that the ticket and re-authentication assertion have not expired.</li><li>The acceptor verifies the assertion using the ARK.</li><li>The acceptor generates the ASK (see <a href="#sub_kd_ASK" title="Authenticator Session Key (ASK)">Section 7.6</a>) and derives the RRK and CRK from this (see <a href="#sub_kd_RRK" title="RP Response Key (RRK)">Section 7.3</a> and <a href="#sub_kd_CRK" title="Context Root Key (CRK)">Section 7.4</a>, respectively).</li><li>The acceptor generates a response and signs and returns it. Note that, unlike the certificate-based mutual authentication case, the nonce need not be echoed back as the ASK (and thus the RRK) is cryptographically bound to the nonce.</li></ol><p id="rfc.section.4.3.3.p.2">If the ticket cannot be found, or the authentication fails, the acceptor SHOULD return a REAUTH_FAILED error, permitting the initiator to recover and fallback to generating a BrowserID assertion. It MAY also include its local timestamp (see <a href="#sub_response_iat" title="“iat” (Issued at time)">Section 6.2.1</a>) so that the initiator can perform clock skew compensation.</p><h3 id="rfc.section.4.3.4"><a href="#rfc.section.4.3.4">4.3.4</a> <a id="d1e1727" href="#d1e1727">Interaction with mutual authentication</a></h3><p id="rfc.section.4.3.4.p.1">The mutual authentication state of a re-authenticated context is transitive. The initiator and acceptor MUST NOT set the mutual_state flag for a re-authenticated context unless the original context was mutually authenticated.</p><p id="rfc.section.4.3.4.p.2">As such, the mutual authentication state of the original context must be associated with the ticket.</p><h3 id="rfc.section.4.3.5"><a href="#rfc.section.4.3.5">4.3.5</a> <a id="d1e1739" href="#d1e1739">Ticket renewal</a></h3><p id="rfc.section.4.3.5.p.1">Normally, re-authentication tickets are only issued when the initiator authenticated with a certificate-signed assertion. Acceptors MAY issue a new ticket with an expiry beyond the ticket lifetime when the initiator used a re-authentication assertion. The issuing of new tickets MUST be subject to a policy that prevents them from being renewed indefinitely.</p><h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a> <a id="sub_XRT_option" href="#sub_XRT_option">Extra round-trip (XRT) option</a></h2><p id="rfc.section.4.4.p.1">The extra round-trip (XRT) option adds an additional round trip to the context token exchange. It allows the initiator to prove knowledge of the Context Master Key (CMK) (see <a href="#sub_kd_CMK" title="Context Master Key (CMK)">Section 7.2</a>) by sending an additional token signed in a key derived from the CMK and an acceptor-issued challenge. Support for the XRT option is OPTIONAL in the acceptor and REQUIRED in the initiator. The initiator is allowed to not request it, but MUST perform XRT if the acceptor requires it.</p><p id="rfc.section.4.4.p.2">(Note that the term “extra round trip” is something of a misnomer; it only adds an additional token to the context token exchange. It is anticipated however that this mechanism will most commonly be used with pseudo-mechanisms or application protocols that require an even number of tokens.)</p><h3 id="rfc.section.4.4.1"><a href="#rfc.section.4.4.1">4.4.1</a> <a id="d1e1766" href="#d1e1766">Initiator XRT advertisement</a></h3><p id="rfc.section.4.4.1.p.1">The initiator may advertise to the acceptor that it desires the XRT option by sending in its request assertion an “opts” claim (see <a href="#sub_request_opts" title="”opts” (Options)">Section 6.1.9</a>) containing the “xrt” value. This option MUST be set if the caller requested GSS_C_DCE_STYLE (see <a href="#RFC4757"><cite title="The RC4-HMAC Kerberos Encryption Types Used by Microsoft Windows">[RFC4757]</cite></a>). Otherwise, the setting of this option is implementation dependent.</p><h3 id="rfc.section.4.4.2"><a href="#rfc.section.4.4.2">4.4.2</a> <a id="d1e1784" href="#d1e1784">Acceptor XRT advertisement</a></h3><p id="rfc.section.4.4.2.p.1">If the initiator requested the XRT option and the acceptor supports it, or the acceptor requires it, the acceptor sends a “jti” claim (see <a href="#sub_response_jti" title="”jti” (JWT ID)">Section 6.2.6</a>) in the response assertion containing a random base 64 URL encoded value. This value MUST be at least 64 bits in length. The acceptor then returns GSS_C_CONTINUE_NEEDED to indicate that an additional context token is expected from the initiator.</p><h3 id="rfc.section.4.4.3"><a href="#rfc.section.4.4.3">4.4.3</a> <a id="d1e1796" href="#d1e1796">Initiator XRT context token</a></h3><p id="rfc.section.4.4.3.p.1">If the acceptor indicated support for the XRT option by including a “jti” claim in its response, then the initiator sends an additional context token to the acceptor. This token contains the initiator context token ID concatenated with a backed assertion with zero certificates and an empty payload, signed using the XRTK (see <a href="#sub_kd_XRTK" title="Extra Round Trip Key (XRTK)">Section 7.6.1</a>).</p><h3 id="rfc.section.4.4.4"><a href="#rfc.section.4.4.4">4.4.4</a> <a id="d1e1808" href="#d1e1808">Acceptor XRT context token validation</a></h3><p id="rfc.section.4.4.4.p.1">The acceptor MUST validate the XRT context token by first validating the context token ID, and then verifying the assertion signature with the XRTK. The acceptor SHOULD reject XRT context tokens with a certificate count greater than zero. Unknown claims in the assertion payload MUST be ignored. The acceptor then returns GSS_C_COMPLETE to the caller.</p><p id="rfc.section.4.4.4.p.2">The acceptor MAY avoid using a replay cache when this option is in effect.</p><h3 id="rfc.section.4.4.5"><a href="#rfc.section.4.4.5">4.4.5</a> <a id="d1e1820" href="#d1e1820">Interaction with message protection services</a></h3><p id="rfc.section.4.4.5.p.1">When the XRT option is in effect, the XRTK is used instead of the CMK to derive the Context Root Key (CRK) (see <a href="#sub_kd_CRK" title="Context Root Key (CRK)">Section 7.4</a>). Per-message tokens MUST have the AcceptorSubkey flag set (see <a href="#RFC4121"><cite title="The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2">[RFC4121]</cite></a> Section 4.2.2).</p><hr class="noprint"><h1 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a> <a id="d1e1839" href="#d1e1839">Validation</a></h1><h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a id="d1e1845" href="#d1e1845">Expiry times</a></h2><p id="rfc.section.5.1.p.1">The expiry and, if present, issued-at and not-before times of all elements in a backed assertion, MUST be validated. This applies equally to re-authentication assertions, public key assertions, and the entire certificate chain. If the expiry time is absent, the issued-at time MUST be present, and the JWT implicitly expires a short, implementation-defined interval after the issued-at time. (A suggested interval is five minutes.)</p><p id="rfc.section.5.1.p.2">The GSS context lifetime SHOULD NOT exceed the lifetime of the initiator principal's certificate.</p><p id="rfc.section.5.1.p.3">The lifetime of a re-authentication ticket SHOULD NOT exceed the lifetime of the initiator principal's certificate. The acceptor MUST validate the ticket expiry time when performing re-authentication.</p><p id="rfc.section.5.1.p.4">Message protections services such as GSS_Wrap() SHOULD be available beyond the GSS context lifetime for maximum application compatibility.</p><h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a> <a id="d1e1863" href="#d1e1863">Audience</a></h2><p id="rfc.section.5.2.p.1">If the credential passed to GSS_Accept_sec_context() is not for GSS_C_NO_NAME, then its string representation as a BrowserID principal (see <a href="#sub_GSS_C_NT_BROWSERID_PRINCIPAL" title="GSS_C_NT_BROWSERID_PRINCIPAL">Section 3.1.1</a>) MUST match the audience claim in the assertion.</p><h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a> <a id="d1e1875" href="#d1e1875">Channel bindings</a></h2><p id="rfc.section.5.3.p.1">GSS-API channel binding is a protected facility for naming an enclosing channel between the initiator and acceptor. If the acceptor passed in channel bindings to GSS_Accept_sec_context(), the assertion MUST contain a matching channel binding claim. (Only the application_data component is validated.)</p><p id="rfc.section.5.3.p.2">The acceptor SHOULD accept any channel binding provided by the initiator if NULL channel bindings are passed to GSS_Accept_sec_context().</p><h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a> <a id="d1e1888" href="#d1e1888">Key agreement</a></h2><p id="rfc.section.5.4.p.1">The initiator MUST choose an ECDH curve with an equivalent strength to the negotiated <a href="#RFC4121"><cite title="The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2">[RFC4121]</cite></a> encryption type. Appropriate curves are given in <a href="#sub_OID_Registry" title="OID Registry">Section 10.1</a>.</p><p id="rfc.section.5.4.p.2">The curve strength MUST be verified by the acceptor. A stronger than required curve MAY be selected by the initiator.</p><h2 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5</a> <a id="d1e1909" href="#d1e1909">Signatures</a></h2><p id="rfc.section.5.5.p.1">Signature validation on assertions is the same as for the web usage of BrowserID, with the addition that response assertions may and re-authentication assertions must be signed with a symmetric key. In this case the HMAC algorithm associated with the mechanism OID is used, and there are no certificates in the backed assertion.</p><h2 id="rfc.section.5.6"><a href="#rfc.section.5.6">5.6</a> <a id="sub_Replay_detection" href="#sub_Replay_detection">Replay detection</a></h2><p id="rfc.section.5.6.p.1">If the XRT option is not in effect, the acceptor MUST maintain a cache of received assertions in order to guard against replay attacks.</p><h2 id="rfc.section.5.7"><a href="#rfc.section.5.7">5.7</a> <a id="d1e1929" href="#d1e1929">Return flags</a></h2><p id="rfc.section.5.7.p.1">The initiator and acceptor should set the returned flags as follows:</p><p id="rfc.section.5.7.p.2"> </p><dl><dt>deleg_state</dt><dd>never set</dd><dt>mutual_state</dt><dd>set if the initiator requested mutual authentication and mutual authentication succeeded</dd><dt>replay_det_state</dt><dd>set if message protection services are available</dd><dt>sequence_state</dt><dd>set if message protection services are available</dd><dt>anon_state</dt><dd>set if the initiator principal's leaf certificate lacks a “principal” claim</dd><dt>trans_state</dt><dd>set if the implementation supports importing and exporting of security contexts</dd><dt>prot_ready_state</dt><dd>may be set when or after the RP Response Token is produced or consumed</dd><dt>conf_avail</dt><dd>set if message protection services are available</dd><dt>integ_avail</dt><dd>set if message protection services are available</dd></dl><hr class="noprint"><h1 id="rfc.section.6" class="np"><a href="#rfc.section.6">6.</a> <a id="d1e1986" href="#d1e1986">Assertion claims</a></h1><h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="d1e1992" href="#d1e1992">Request (initiator/UA) assertion</a></h2><p id="rfc.section.6.1.p.1">These claims are included in the assertion sent to the acceptor and are authenticated by the initiator's private key and certificate chain (directly, or in the case of re-authentication assertions, transitively). Claims not specified here MUST be ignored by the acceptor.</p><p id="rfc.section.6.1.p.2">Here is an example assertion containing Elliptic Curve Diffie-Hellman parameters, along with options and nonce claims indicating that mutual authentication is desired:</p><p id="rfc.section.6.1.p.4"> </p><div id="rfc.figure.u.3"></div><pre> {
"opts": [
"ma"
],
"exp": 1360158396188,
"epk": {
"kty": "EC",
"crv": "P-256",
"x": "JR5UPDgMLFPZwOGaKKSF24658tB1DccM1_oHPbCHeZg",
"y": "S45Esx_6DfE5-xdB3X7sIIJ16MwO0Y_RiDc-i5ZTLQ8"
},
"nonce": "bbqT10Gyx3s",
"aud": "imap/mail.example.com"
}</pre><p id="rfc.section.6.1.p.5">The following claims are permitted in the request assertion:</p><h3 id="rfc.section.6.1.1"><a href="#rfc.section.6.1.1">6.1.1</a> <a id="sub_request_aud" href="#sub_request_aud">“aud” (Audience)</a></h3><p id="rfc.section.6.1.1.p.1">The audience is a StringOrURI (see <a href="#I-D.ietf-oauth-json-web-token"><cite title="JSON Web Token (JWT)">[I-D.ietf-oauth-json-web-token]</cite></a> Section 2) containing the target service's principal name, formatted according to <a href="#sub_GSS_C_NT_BROWSERID_PRINCIPAL" title="GSS_C_NT_BROWSERID_PRINCIPAL">Section 3.1.1</a>. This claim is REQUIRED. If the initiator specified a target name of GSS_C_NO_NAME, then the audience is the empty string.</p><p id="rfc.section.6.1.1.p.2"> <span class="comment" id="rfc.comment.6">[<a href="#rfc.comment.6" class="smpl">rfc.comment.6</a>: If the initiator wanted mutual authentication then we could find out the acceptor's name and provide it via GSS_Inquire_context(). This is only really useful and secure with mechanisms like this one where the initiator credential is based on a public/private key pair and either we use key agreement and per-message tokens or channel binding to a secure channel. This really should [have] be[en] explained in RFC2743.]</span> </p><h3 id="rfc.section.6.1.2"><a href="#rfc.section.6.1.2">6.1.2</a> <a id="sub_request_exp" href="#sub_request_exp">“exp” (Expiry time)</a></h3><p id="rfc.section.6.1.2.p.1">This contains the time when the assertion expires, in milliseconds since January 1, 1970. At least one of “exp” or “iat” MUST be present.</p><h3 id="rfc.section.6.1.3"><a href="#rfc.section.6.1.3">6.1.3</a> <a id="sub_request_iat" href="#sub_request_iat">“iat” (Issued at time)</a></h3><p id="rfc.section.6.1.3.p.1">This contains the time the assertion was issued (in milliseconds since January 1, 1970). If present, the acceptor MUST validate that the assertion was recently issued. At least one of “exp” or “iat” MUST be present.</p><h3 id="rfc.section.6.1.4"><a href="#rfc.section.6.1.4">6.1.4</a> <a id="sub_request_nbf" href="#sub_request_nbf">”nbf” (Not before time)</a></h3><p id="rfc.section.6.1.4.p.1">This contains the time, in milliseconds since January 1, 1970, from which the assertion begins to be valid. This claim is OPTIONAL.</p><h3 id="rfc.section.6.1.5"><a href="#rfc.section.6.1.5">6.1.5</a> <a id="sub_request_ecdh" href="#sub_request_ecdh">"epk" (Ephemeral Public Key)</a></h3><p id="rfc.section.6.1.5.p.1">These contain key parameters for deriving a shared session key with the relying party, represented as a JSON Web Key <a href="#I-D.ietf-jose-json-web-key"><cite title="JSON Web Key (JWK)">[I-D.ietf-jose-json-web-key]</cite></a> public key value. The key type MUST be EC and the parameters for Elliptic Curve Public Keys specified in <a href="#I-D.ietf-jose-json-web-algorithms"><cite title="JSON Web Algorithms (JWA)">[I-D.ietf-jose-json-web-algorithms]</cite></a> Section 6.2.1 MUST be present.</p><p id="rfc.section.6.1.5.p.2">The “epk” claim is REQUIRED unless the associated encryption type is ENCTYPE_NULL, or there is already a prior session key (as is the case for re-authentication assertions).</p><h3 id="rfc.section.6.1.6"><a href="#rfc.section.6.1.6">6.1.6</a> <a id="sub_request_cbt" href="#sub_request_cbt">“cb” (Channel binding)</a></h3><p id="rfc.section.6.1.6.p.1">This contains channel binding information for binding the GSS context to an outer channel (e.g. see <a href="#RFC5929"><cite title="Channel Bindings for TLS">[RFC5929]</cite></a>). Its value is the base64 URL encoding of the application-specific data component of the channel bindings passed to GSS_Init_sec_context() or GSS_Accept_sec_context(). This claim is OPTIONAL.</p><h3 id="rfc.section.6.1.7"><a href="#rfc.section.6.1.7">6.1.7</a> <a id="sub_request_nonce" href="#sub_request_nonce">"nonce" (Mutual authentication nonce)</a></h3><p id="rfc.section.6.1.7.p.1">This is a random quantity of at least 64 bits, base 64 URL encoded, which is used to bind the request and response assertions in the case a freshly agreed key is not used to sign the response assertion. This claim is REQUIRED if mutual authentication is desired and the assertion is signed using a certificate, or if re-authentication is being performed.</p><h3 id="rfc.section.6.1.8"><a href="#rfc.section.6.1.8">6.1.8</a> <a id="sub_request_tkt" href="#sub_request_tkt">“tkt” (Ticket)</a></h3><p id="rfc.section.6.1.8.p.1">When the assertion is being used for fast re-authentication, this contains a JSON object with a single parameter, “tid”. The “tid” parameter matches the “tid” parameter from the initial response assertion ticket (see <a href="#sub_response_tkt" title="“tkt” (Ticket)">Section 6.2.5</a>). This claim is REQUIRED for re-authentication assertions, otherwise it the assertion MUST be rejected. Other parameters SHOULD NOT be present in the “tkt” object.</p><h3 id="rfc.section.6.1.9"><a href="#rfc.section.6.1.9">6.1.9</a> <a id="sub_request_opts" href="#sub_request_opts">”opts” (Options)</a></h3><p id="rfc.section.6.1.9.p.1">This contains a JSON array of string values indicating various protocol options that are supported by the initiator. Unknown options MUST be ignored by the acceptor. This document defines the following extensions:</p><div id="rfc.table.u.2"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="center">Name</th><th class="center">Description</th></tr></thead><tbody><tr><td class="center">ma</td><td class="center">The initiator requested GSS_C_MUTUAL_FLAG</td></tr><tr><td class="center">xrt</td><td class="center">The initiator supports the extra round trip option (see Section 4.4)</td></tr><tr><td class="center">dce</td><td class="center">The initiator requested GSS_C_DCE_STYLE (see RFC4757 Section 7.1)</td></tr><tr><td class="center">ify</td><td class="center">The initiator requested GSS_C_IDENTIFY_FLAG (see RFC4757 Section 7.1)</td></tr></tbody></table></div><h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> <a id="d1e2226" href="#d1e2226">Response (acceptor/RP) assertion</a></h2><p id="rfc.section.6.2.p.1">The response assertion is sent from the acceptor to the initiator to provide key agreement, and either key confirmation or mutual authentication. It is formatted as a backed assertion, however in the current specification it consists of a single assertion with zero certificates; that is, it is "unbacked". (It is encoded as a backed assertion in order to provide future support for mutual authentication using native BrowserID certificates. Such support is not specified here.)</p><p id="rfc.section.6.2.p.2">In the case of a key successfully being negotiated, the response assertion is signed with the RP Response Key (RRK) (see <a href="#sub_kd_RRK" title="RP Response Key (RRK)">Section 7.3</a>). Alternatively, it may be signed with the acceptor's private RSA or DSA key. In this case, the acceptor's X.509 certificate is included in the "x5c" claim of the JWT header.</p><p id="rfc.section.6.2.p.3">The HMAC-SHA256 (HS256) algorithm MUST be supported by implementors of this specification.</p><p id="rfc.section.6.2.p.4">If the <a href="#RFC3961"><cite title="Encryption and Checksum Specifications for Kerberos 5">[RFC3961]</cite></a> encryption type for the mechanism is ENCTYPE_NULL, then the signature is absent and the value of the "alg" header parameter is "none". No signature verification is required in this case.</p><p id="rfc.section.6.2.p.5">Claims not specified here MUST be ignored by the initiator.</p><p id="rfc.section.6.2.p.6">Here is an example response assertion:</p><p id="rfc.section.6.2.p.8"> </p><div id="rfc.figure.u.4"></div><pre>{
"exp": 1362960258000,
"nonce": "bbqT10Gyx3s",
"epk": {
"x": "bvNF6V1rpMeQyGOKCj0kBaOaSh3tlhUcbffaji4uCEI",
"y": "Iuqs650FXzXFUD9kHknETfbqiB8XBbCHlJXoysx3rvw"
},
"tkt": {
"tid": "Jgg7vKX2sEKlCWBfmLTg_n4qz3NVZxOU-a2B4qYMkXI",
"exp": 1362992660000
}
}</pre><p id="rfc.section.6.2.p.9">The following claims are permitted in the response assertion:</p><h3 id="rfc.section.6.2.1"><a href="#rfc.section.6.2.1">6.2.1</a> <a id="sub_response_iat" href="#sub_response_iat">“iat” (Issued at time)</a></h3><p id="rfc.section.6.2.1.p.1">The current acceptor time, in milliseconds since January 1, 1970. This allows the initiator to compensate for clock differences when generating assertions. This claim is OPTIONAL.</p><h3 id="rfc.section.6.2.2"><a href="#rfc.section.6.2.2">6.2.2</a> <a id="sub_response_ecdh" href="#sub_response_ecdh">“epk” (Ephemeral Public Key)</a></h3><p id="rfc.section.6.2.2.p.1">This contains a JSON object containing the x and y coordinates of the acceptor's ECDH public key (see <a href="#I-D.ietf-jose-json-web-algorithms"><cite title="JSON Web Algorithms (JWA)">[I-D.ietf-jose-json-web-algorithms]</cite></a> Section 6.2.1). This claim is REQUIRED unless the associated encryption type is ENCTYPE_NULL, or there is already an established session key, as is the case for re-authentication assertions.</p><p id="rfc.section.6.2.2.p.2">The “crv” and “kty” properties SHOULD NOT be present; they are determined by the initiator.</p><h3 id="rfc.section.6.2.3"><a href="#rfc.section.6.2.3">6.2.3</a> <a id="sub_response_exp" href="#sub_response_exp">“exp” (Expiry time)</a></h3><p id="rfc.section.6.2.3.p.1">This contains the time when the context expires, in milliseconds since January 1, 1970. This claim is OPTIONAL; the initiator should use the certificate or ticket expiry time if absent.</p><h3 id="rfc.section.6.2.4"><a href="#rfc.section.6.2.4">6.2.4</a> <a id="sub_response_nonce" href="#sub_response_nonce">“nonce” (Mutual authentication nonce)</a></h3><p id="rfc.section.6.2.4.p.1">The nonce as received from the initiator. This MUST NOT be present unless a nonce was received from the initiator, and the acceptor is signing the assertion with a private key.</p><h3 id="rfc.section.6.2.5"><a href="#rfc.section.6.2.5">6.2.5</a> <a id="sub_response_tkt" href="#sub_response_tkt">“tkt” (Ticket)</a></h3><p id="rfc.section.6.2.5.p.1">This contains a JSON object that may be used for re-authenticating to the acceptor without acquiring an assertion. It has two parameters: “tid”, an opaque identifier to be presented in a re-authentication assertion (this need not be a string); and “exp”, the expiry time of the ticket. This claim is OPTIONAL.</p><h3 id="rfc.section.6.2.6"><a href="#rfc.section.6.2.6">6.2.6</a> <a id="sub_response_jti" href="#sub_response_jti">”jti” (JWT ID)</a></h3><p id="rfc.section.6.2.6.p.1">This contains a base64 URL encoded random value of at least 64 bits that is used to uniquely identify the acceptor response, in the case that the extra round trip option is used. It SHOULD not be present unless the initiator requested the extra round trip option.</p><h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> <a id="d1e2345" href="#d1e2345">Error (acceptor/RP) assertion</a></h2><p id="rfc.section.6.3.p.1">Error assertions are backed assertions containing any or all of the following claims. In addition, they MUST have the “iat” claim, for initiator clock skew correction. All other response assertion claims are OPTIONAL or not applicable in error assertions. Conversely, the claims listed below MUST NOT be present in a non-error response assertion.</p><p id="rfc.section.6.3.p.2">The error assertion MAY be signed if a key is available, otherwise the signature is absent and the value of the "alg" header parameter is "none".</p><h3 id="rfc.section.6.3.1"><a href="#rfc.section.6.3.1">6.3.1</a> <a id="sub_response_gss_maj" href="#sub_response_gss_maj">“gss-maj” (GSS major status code)</a></h3><p id="rfc.section.6.3.1.p.1">This contains a GSS major status code represented as a number.</p><h3 id="rfc.section.6.3.2"><a href="#rfc.section.6.3.2">6.3.2</a> <a id="sub_response_gss_min" href="#sub_response_gss_min">“gss-min” (GSS minor status code)</a></h3><p id="rfc.section.6.3.2.p.1">This contains a GSS minor status code represented as a number.</p><p id="rfc.section.6.3.2.p.2">If REAUTH_FAILED is received, the initiator SHOULD attempt to send another initial context token containing a fresh assertion.</p><p id="rfc.section.6.3.2.p.3">The following protocol minor status codes are defined. Note that the API representation of these status codes is implementation dependent. Status codes with the high bit set are GSS BrowserID protocol errors; the remainder are BrowserID protocol errors.</p><div id="rfc.table.u.3"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="center">Error</th><th class="center">Protocol</th><th class="center">Description</th></tr></thead><tbody><tr><td class="center">INVALID_JSON</td><td class="center">8</td><td class="center">Invalid JSON encoding</td></tr><tr><td class="center">INVALID_BASE64</td><td class="center">9</td><td class="center">Invalid Base64 encoding</td></tr><tr><td class="center">INVALID_ASSERTION</td><td class="center">10</td><td class="center">Invalid assertion</td></tr><tr><td class="center">TOO_MANY_CERTS</td><td class="center">13</td><td class="center">Too many certificates</td></tr><tr><td class="center">UNTRUSTED_ISSUER</td><td class="center">14</td><td class="center">Untrusted issuer</td></tr><tr><td class="center">INVALID_ISSUER</td><td class="center">15</td><td class="center">Invalid issuer</td></tr><tr><td class="center">MISSING_ISSUER</td><td class="center">16</td><td class="center">Missing issuer</td></tr><tr><td class="center">MISSING_AUDIENCE</td><td class="center">17</td><td class="center">Missing audience</td></tr><tr><td class="center">BAD_AUDIENCE</td><td class="center">18</td><td class="center">Bad audience</td></tr><tr><td class="center">EXPIRED_ASSERTION</td><td class="center">19</td><td class="center">Assertion expired</td></tr><tr><td class="center">ASSERTION_NOT_YET_VALID</td><td class="center">20</td><td class="center">Assertion not yet valid</td></tr><tr><td class="center">EXPIRED_CERT</td><td class="center">21</td><td class="center">Certificate expired</td></tr><tr><td class="center">CERT_NOT_YET_VALID</td><td class="center">22</td><td class="center">Certificate not yet valid</td></tr><tr><td class="center">INVALID_SIGNATURE</td><td class="center">23</td><td class="center">Invalid signature</td></tr><tr><td class="center">MISSING_ALGORITHM</td><td class="center">24</td><td class="center">Missing JWS algorithm</td></tr><tr><td class="center">UNKNOWN_ALGORITHM</td><td class="center">25</td><td class="center">Unknown JWS algorithm</td></tr><tr><td class="center">MISSING_PRINCIPAL</td><td class="center">34</td><td class="center">Missing principal attribute</td></tr><tr><td class="center">UNKNOWN_PRINCIPAL_TYPE</td><td class="center">35</td><td class="center">Unknown principal type</td></tr><tr><td class="center">MISSING_CERT</td><td class="center">36</td><td class="center">Missing certificate</td></tr><tr><td class="center">MISSING_CHANNEL_BINDINGS</td><td class="center">38</td><td class="center">Missing channel bindings</td></tr><tr><td class="center">CHANNEL_BINDINGS_MISMATCH</td><td class="center">39</td><td class="center">Channel bindings do not match</td></tr><tr><td class="center">NOT_REAUTH_ASSERTION</td><td class="center">70</td><td class="center">Not a re-authentication assertion</td></tr><tr><td class="center">BAD_SUBJECT</td><td class="center">71</td><td class="center">Bad subject name</td></tr><tr><td class="center">MISMATCHED_RP_RESPONSE</td><td class="center">72</td><td class="center">Mismatched RP response token</td></tr><tr><td class="center">REFLECTED_RP_RESPOSNE</td><td class="center">73</td><td class="center">Reflected RP response token</td></tr><tr><td class="center">UNKNOWN_EC_CURVE</td><td class="center">77</td><td class="center">Unknown ECC curve</td></tr><tr><td class="center">INVALID_EC_CURVE</td><td class="center">78</td><td class="center">Invalid ECC curve</td></tr><tr><td class="center">MISSING_NONCE</td><td class="center">79</td><td class="center">Missing nonce</td></tr><tr><td class="center">WRONG_SIZE</td><td class="center">0x80000001</td><td class="center">Buffer is incorrect size</td></tr><tr><td class="center">WRONG_MECH</td><td class="center">0x80000002</td><td class="center">Mechanism OID is incorrect</td></tr><tr><td class="center">BAD_TOK_HEADER</td><td class="center">0x80000003</td><td class="center">Token header is malformed or corrupt</td></tr><tr><td class="center">TOK_TRUNC</td><td class="center">0x80000004</td><td class="center">Token is missing data</td></tr><tr><td class="center">BAD_DIRECTION</td><td class="center">0x80000005</td><td class="center">Packet was replayed in wrong direction</td></tr><tr><td class="center">WRONG_TOK_ID</td><td class="center">0x80000006</td><td class="center">Received token ID does not match expected</td></tr><tr><td class="center">KEY_UNAVAILABLE</td><td class="center">0x80000007</td><td class="center">Key unavailable</td></tr><tr><td class="center">KEY_TOO_SHORT</td><td class="center">0x80000008</td><td class="center">Key too weak</td></tr><tr><td class="center">CONTEXT_ESTABLISHED</td><td class="center">0x80000009</td><td class="center">Context already established</td></tr><tr><td class="center">CONTEXT_INCOMPLETE</td><td class="center">0x8000000A</td><td class="center">Context incomplete</td></tr><tr><td class="center">BAD_CONTEXT_TOKEN</td><td class="center">0x8000000B</td><td class="center">Context token malformed or corrupt</td></tr><tr><td class="center">BAD_ERROR_TOKEN</td><td class="center">0x8000000C</td><td class="center">Error token malformed or corrupt</td></tr><tr><td class="center">BAD_CONTEXT_OPTION</td><td class="center">0x8000000D</td><td class="center">Bad context option</td></tr><tr><td class="center">REAUTH_FAILED</td><td class="center">0x8000000E</td><td class="center">Re-authentication failure</td></tr></tbody></table></div><h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a> <a id="d1e3083" href="#d1e3083">XRT assertion</a></h2><p id="rfc.section.6.4.p.1">No claims are presently defined for the extra round trip assertion. Unknown claims MUST be ignored by the acceptor.</p><hr class="noprint"><h1 id="rfc.section.7" class="np"><a href="#rfc.section.7">7.</a> <a id="d1e3092" href="#d1e3092">Key derivation</a></h1><p id="rfc.section.7.p.1">The following function is used as the base algorithm for deriving keys:</p><p id="rfc.section.7.p.2">browserid-derive-key(K, usage) = HMAC(K, "BrowserID" || K || usage || 0x01)</p><p id="rfc.section.7.p.3">The HMAC hash algorithm for all currently specified key lengths is SHA-256. Note that the inclusion of K in the HMAC input is for interoperability with some crypto implementations.</p><h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> <a id="sub_kd_DHK" href="#sub_kd_DHK">Diffie-Hellman Key (DHK)</a></h2><p id="rfc.section.7.1.p.1">This key is the shared secret resulting from the ECDH exchange. Its length corresponds to the selected EC curve. It is never used without derivation and thus may be used with implementations that do not expose the ECDH value directly.</p><h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> <a id="sub_kd_CMK" href="#sub_kd_CMK">Context Master Key (CMK)</a></h2><p id="rfc.section.7.2.p.1">This is the Diffie-Hellman Key (DHK) for all initially authenticated contexts and the Authenticator Session Key (ASK) for re-authenticated contexts.</p><h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> <a id="sub_kd_RRK" href="#sub_kd_RRK">RP Response Key (RRK)</a></h2><p id="rfc.section.7.3.p.1">If mutual authentication without a fast re-authentication ticket is performed then the response assertion will be signed with a public key signature using the private key for the acceptor's certificate.</p><p id="rfc.section.7.3.p.2">Otherwise a symmetric RP Response Key (RRK) is derived as follows:</p><p id="rfc.section.7.3.p.3">RRK = browserid-derive-key(CMK, "RRK")</p><h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> <a id="sub_kd_CRK" href="#sub_kd_CRK">Context Root Key (CRK)</a></h2><p id="rfc.section.7.4.p.1">The Context Root Key (CRK) is used for <a href="#RFC4121"><cite title="The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2">[RFC4121]</cite></a> message protection services, e.g. GSS_Wrap() and GSS_Get_MIC(). If the extra round-trip option is in effect, it is derived as follows:</p><p id="rfc.section.7.4.p.2">CRK = random-to-key(browserid-derive-key(XRTK, "CRK"))</p><p id="rfc.section.7.4.p.3">Otherwise, the CMK is used:</p><p id="rfc.section.7.4.p.4">CRK = random-to-key(browserid-derive-key(CMK, “CRK”))</p><p id="rfc.section.7.4.p.5">The random-to-key function is defined in <a href="#RFC3961"><cite title="Encryption and Checksum Specifications for Kerberos 5">[RFC3961]</cite></a>.</p><h2 id="rfc.section.7.5"><a href="#rfc.section.7.5">7.5</a> <a id="sub_kd_ARK" href="#sub_kd_ARK">Authenticator Root Key (ARK)</a></h2><p id="rfc.section.7.5.p.1">The Authenticator Root Key (ARK) is used to sign assertions used for fast re-authentication. (The term “authenticator” is equivalent to “re-authentication assertion” and exists for historical reasons.) It is derived as follows:</p><p id="rfc.section.7.5.p.2">ARK = browserid-derive-key(CMK, "ARK")</p><h2 id="rfc.section.7.6"><a href="#rfc.section.7.6">7.6</a> <a id="sub_kd_ASK" href="#sub_kd_ASK">Authenticator Session Key (ASK)</a></h2><p id="rfc.section.7.6.p.1">The Authenticator Session Key (ASK) is used instead of the DHK for re-authenticated contexts. It is derived as follows:</p><p id="rfc.section.7.6.p.2">ASK = browserid-derive-key(ARK, nonce-binary)</p><p id="rfc.section.7.6.p.3">The usage (nonce-binary) is the base64 URL decoding of the initiator “nonce” claim.</p><h3 id="rfc.section.7.6.1"><a href="#rfc.section.7.6.1">7.6.1</a> <a id="sub_kd_XRTK" href="#sub_kd_XRTK">Extra Round Trip Key (XRTK)</a></h3><p id="rfc.section.7.6.1.p.1">The Extra Round Trip Key (XRTK) is used to sign the extra round trip token, and also as the master key for the CRK when the extra round trip option is used.</p><p id="rfc.section.7.6.1.p.2">XRTK = browserid-derive-key(CMK, acceptor-jti-binary)</p><p id="rfc.section.7.6.1.p.3">The usage (acceptor-jti-binary) is the base64 URL decoding of the acceptor “jti” claim.</p><h2 id="rfc.section.7.7"><a href="#rfc.section.7.7">7.7</a> <a id="sub_GSS_PRF" href="#sub_GSS_PRF">GSS Pseudo-Random Function (PRF)</a></h2><p id="rfc.section.7.7.p.1">The BrowserID mechanism shares the same Pseudo-Random Function (PRF) as the Kerberos GSS mechanism, defined in <a href="#RFC4402"><cite title="A Pseudo-Random Function (PRF) for the Kerberos V Generic Security Service Application Program Interface (GSS-API) Mechanism">[RFC4402]</cite></a>. GSS_C_PRF_KEY_FULL and GSS_C_PRF_KEY_PARTIAL are equivalent. The protocol key to be used for GSS_Pseudo_random() SHALL by the Context Root Key (CRK).</p><p id="rfc.section.7.7.p.2"> <span class="comment" id="rfc.comment.7">[<a href="#rfc.comment.7" class="smpl">rfc.comment.7</a>: Can we replace this with a function that imports less of RFC3962? We arguably should, because otherwise the only things we import from RFC3962 (and 3961) are random-to-key (the identity function in RFC3962) and the crypto bits needed for RFC4121 per-message tokens.]</span> </p><hr class="noprint"><h1 id="rfc.section.8" class="np"><a href="#rfc.section.8">8.</a> <a id="d1e3252" href="#d1e3252">Example</a></h1><p id="rfc.section.8.p.1">Suppose a mail user agent for the principal [email protected] wishes to authenticate to an IMAP server rand.mit.de.padl.com. They do not have a re-authentication ticket. The mail user agent would display a dialog box in which the principal would sign in to their IdP and request a fresh assertion be generated.</p><p id="rfc.section.8.p.3"> </p><div id="rfc.figure.u.5"></div><pre>C: <connects to IMAP port>
S: * OK
C: C1 CAPABILITY
S: * CAPABILITY IMAP4rev1 SASL-IR SORT [...] AUTH=BROWSERID-AES128
S: C1 OK Capability Completed
C: C2 AUTHENTICATE BROWSERID-AES128
biwsYyxleUpoYkdjaU9pSlNVekkxTmlKOS5leUp3ZFdKc2FXTXRhMlY
1SWpwN0ltRnNaMjl5YVhSb2JTSTZJa1JUSWl3aWVTSTZJak01TVRObE
9EZ3laRGhqTXpWa01qSm1ObVEwTURZNVkyVTJNREJrWW1OallqTTVOR
0ZqWVdGaFl6WTBPV1prTjJZNVptTmtObU0wTVRJME5tWTFOakk1TUdW
bU1HTmpNemMwTnpaaE1EUmhOREU0WXpGbE9ETXhPV0kxTkdJeFpXTml
ObVkyWTJWaE56VTBOR1kyWlRFMU5qTmxaR05sWkdNNU1EWmtOamcwTT
JRd01XSmpaVFJtTjJFMVpqY3dOMk5tWVRZd1lXTTVNVE0yWm1GbU5qS
m1aR0ZtTkRoa09HRTVPRGxoWVdGbE5EUXdOMlZrTmpjeU56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
temnUWdihc4UmZMDBIgNgHQBJgW0hAq9GYQfc5NlSsenQ_Jy0dxjq5lwDZY
wHLlQyfbuXlamE3CgvdeA~eyJhbGciOiJEUzEyOCJ9.eyJub25jZSI6Img1
UDRLckc4eW5nIiwiZWNkaCI6eyJ4IjoiZmpaTnBzQmpHbl9YQUNtZ2JOd0F
zdnI4OGc0Rld6dG9icXA1VE1iX1lGMCIsImNydiI6IlAtMjU2IiwieSI6Il
JLRXZKejU5Y3NhdjhLY3dlVXY1WHFGZ3Q4QVdDQWtySkJ6M1BQcUxKdHMif
SwiY2J0IjoiYml3cyIsImV4cCI6MTM2Mjk2MTIxNjE0OSwiYXVkIjoidXJu
OngtZ3NzOmltYXAvcmFuZC5taXQuZGUucGFkbC5jb20ifQ.udtoI3U5C-3p
p4xIJZ1mk-Cz4bhlBLeK026Uamda28pLY8sMwNNtcA</pre><p id="rfc.section.8.p.7">The initial “n,,” is the GS2 header (indicating that there are no channel bindings). The “c,” denotes the token as being a BrowserID initial context token. The remaining base64 URL encoded data is a BrowserID backed assertion, containing the following certificate (for clarity, the payload has been reformatted and JWT header and signature omitted):</p><p id="rfc.section.8.p.9"> </p><div id="rfc.figure.u.7"></div><pre>{
"public-key": {
"algorithm": "DS",
"y": "3913e882d8c35d22f6d4069ce600dbccb394acaaac649
fd7f9fcd6c41246f56290ef0cc37476a04a418c1e8319
b54b1ecb6f6cea7544f6e1563edcedc906d6843d01bce
4f7a5f707cfa60ac9136faf62fdaf48d8a989aaae4407
ed67277a1782ecaa156bdcaea167f263725de63ed8f28
a603b6ff510f4802d74d7eae7abc2eb",
"p": "ff600483db6abfc5b45eab78594b3533d550d9f1bf2a9
92a7a8daa6dc34f8045ad4e6e0c429d334eeeaaefd7e2
3d4810be00e4cc1492cba325ba81ff2d5a5b305a8d17e
b3bf4a06a349d392e00d329744a5179380344e82a18c4
7933438f891e22aeef812d69c8f75e326cb70ea000c3f
776dfdbd604638c2ef717fc26d02e17",
"q": "e21e04f911d1ed7991008ecaab3bf775984309c3",
"g": "c52a4a0ff3b7e61fdf1867ce84138369a6154f4afa929
66e3c827e25cfa6cf508b90e5de419e1337e07a2e9e2a
3cd5dea704d175f8ebf6af397d69e110b96afb17c7a03
259329e4829b0d03bbc7896b15b4ade53e130858cc34d
96269aa89041f409136c7242a38895c9d5bccad4f389a
f1d7a4bd1398bd072dffa896233397a"
},
"principal": {
"email": "[email protected]"
},
"iat": 1362961096122,
"exp": 1362964696122,
"iss": "login.persona.org"
}</pre><p id="rfc.section.8.p.10">and assertion:</p><p id="rfc.section.8.p.12"> </p><div id="rfc.figure.u.8"></div><pre>{
"nonce": "h5P4KrG8yng",
"epk": {
"x": "fjZNpsBjGn_XACmgbNwAsvr88g4FWztobqp5TMb_YF0",
"crv": "P-256",
"kty": "EC",
"y": "RKEvJz59csav8KcweUv5XqFgt8AWCAkrJBz3PPqLJts"
},
"cb": "biws",
"exp": 1362961216149,
"aud": "imap/rand.mit.de.padl.com"
}</pre><p id="rfc.section.8.p.13">Note the channel binding token that protects the GS2 header.</p><p id="rfc.section.8.p.14"> <span class="comment" id="rfc.comment.8">[<a href="#rfc.comment.8" class="smpl">rfc.comment.8</a>: The encoded example needs to be regenerated to reflect that “cb” is now used for channel bindings.]</span> </p><p id="rfc.section.8.p.15">Turning to the response backed assertion sent from the IMAP server to the mail user agent, we have the following after base64 decoding:</p><p id="rfc.section.8.p.17"> </p><div id="rfc.figure.u.9"></div><pre>eyJhbGciOiJSUzI1NiIsIng1YyI6WyJNSUlEempDQ0FyYWdBd0lCQWdJQkJ
6QU5CZ2txaGtpRzl3MEJBUVVGQURCZE1Rc3dDUVlEVlFRR0V3SkJWVEVlTU
J3R0ExVUVDZ3dWVUVGRVRDQlRiMlowZDJGeVpTQlFkSGtnVEhSa01TNHdMQ
VlEVlFRRERDVlFRVVJNSUZOdlpuUjNZWEpsSUVObGNuUnBabWxqWVhScGIy
NGdRWFYwYUc5eWFYUjVNQjRYRFRFek1ERXhNVEExTXpReU1Gb1hEV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FachCObefrfgfE
19qeZrKrzI0UdCrDPzYk9XoWJGkpFSOwWac_vCCuuv5V3Gd_LNSI3rBi-Fa
ehYHAF1IQ</pre><p id="rfc.section.8.p.18">Here we show the JWT header for the response assertion, as it includes an ASN.1 encoded X.509 certificate, which is used to mutually authenticate the IMAP server to the UA:</p><p id="rfc.section.8.p.20"> </p><div id="rfc.figure.u.10"></div><pre>{
"alg": "RS256",
"x5c": [
"MIIDzjCCAragAwIBAgIBBzANBgkqhkiG9w0BAQUFADBdMQswCQ
YDVQQGEwJBVTEeMBwGA1UECgwVUEFETCBTb2Z0d2FyZSBQdHkg
THRkMS4wLAYDVQQDDCVQQURMIFNvZnR3YXJlIENlcnRpZmljYX
Rpb24gQXV0aG9yaXR5MB4XDTEzMDExMTA1MzQyMFoXDTE2MDEx
MTA1MzQyMFowTDELMAkGA1UEBhMCQVUxHjAcBgNVBAoMFVBBRE
wgU29mdHdhcmUgUHR5IEx0ZDEdMBsGA1UEAwwUcmFuZC5taXQu
ZGUucGFkbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwgg
EKAoIBAQDBhzFpfL6vHxsx2DvFZP+GR0UomDp/CEe+OHN0Z0c6
91Yg9gWXmU3nPqVTbAIqXH8AUtvf7MzbY28oVlpZT05zm2c/tE
3gkhTxmXORgQrcuugujOXMFhI4svEZ+CbHPlZiZ/TzkXLHP29E
z7wNZn1H57ALqmSAo5T4qxMFgBYudw/ZxPRzDtUoIV0s23Yg4x
T9awJnr1GgMURibUBjF7ybcm0K8sJT+UGeB7rmLlPw+fAkOf7Z
jZ9tpTkEMi8uLEMqcxaGSAK/+kW75qOxdAFI8zYZX53gpg4mi+
QWfGY1ZNQJMuHGQXg/ufxMzaxNN4h1aOlmZZYkBHp52A9yIMUb
AgMBAAGjgakwgaYwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHx
YdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O
BBYEFKSsubEDubRIGHCBttAlTv2FWGf+MB8GA1UdIwQYMBaAFL
izZlMWnKK1PYagdJjkVuRhEQJjMAkGA1UdEQQCMAAwCwYDVR0P
BAQDAgXgMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0GCSqGSIb3DQ
EBBQUAA4IBAQBD1BzQP+rN1UUz7A6z+KDPaq8s2iBG0FzZxsX2
QUOupBEIbuZp0KJaujVMg01fdjsuGG0uXbMfeRGyNlUsMN+ZDy
8/MIOh1aUGv0SUwKtCtLtWrJv65uwHGGt5uFKxME61VT4+qpI2
AGqxx5drsxELBOdyPneuAiLPxFubRFmzuhVSI7APMl79Ok30oW
udA49lUX9wz3g9q9vdl9yhgeeUSUpMhlZ24Uc9PuLzr15j6v63
XzrSdWtNzv0F10eDl4yTUNWSJh7qBhgq1IoX9APOOuLbMNrp6b
eEeowh34pVWfTaSxI7nK57kK2xhRU43ewYj2i/Srz8GsMS91ur
25It"]
}</pre><p id="rfc.section.8.p.21">The assertion payload is below (again, for clarity the actual JWT signature has been omitted):</p><p id="rfc.section.8.p.23"> </p><div id="rfc.figure.u.11"></div><pre>{
"tkt": {
"tid": "aeay0GJizDx79Ag--WL-vw6Y9BXxRuC1XsZxry51SUI",
"exp": 1362997098000
},
"epk": {
"x": "J1IWbH2A5C3chOUIqmfXpP_RQEEOmd2ExXoKrqQQXLM",
"y": "_2Etxbz_vJeeUUby2rfdekTTPURpbGJH7kyIWqmkIEg"
},
"nonce": "h5P4KrG8yng",
"exp": 1362964696000
}</pre><p id="rfc.section.8.p.24">Note the fast re-authentication ticket and the nonce echoed back from the initiator.</p><hr class="noprint"><h1 id="rfc.section.9" class="np"><a href="#rfc.section.9">9.</a> <a id="d1e3332" href="#d1e3332">Security Considerations</a></h1><p id="rfc.section.9.p.1">This document defines a GSS-API security mechanism, and therefore deals in security and has security considerations text embedded throughout. This section only addresses security considerations associated with the BrowserID GSS mechanism described in this document. It does not address security considerations associated with the BrowserID protocol or the GSS-API themselves.</p><p id="rfc.section.9.p.2">This mechanism provides for authentication of initiator principals using private keys to public key crypto-systems, using the BrowserID specification for user certificates (which are NOT PKIX <a href="#RFC5280"><cite title="Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile">[RFC5280]</cite></a> certificates). Authentication of the acceptor principal is optional. Fast re-authentication is supported via acceptor-issued fast re-authentication tickets.</p><p id="rfc.section.9.p.3">All cryptography for per-message tokens is imported from the Kerberos GSS-API mechanism <a href="#RFC4121"><cite title="The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2">[RFC4121]</cite></a>.</p><p id="rfc.section.9.p.4">This mechanism actually has several mechanism OIDs, composed of a prefix identifying this family of mechanisms followed by an arc identifying the <a href="#RFC3961"><cite title="Encryption and Checksum Specifications for Kerberos 5">[RFC3961]</cite></a> encryption type for use with per-message tokens and the GSS_Pseudo_random() function. The NULL encryption type is supported, and when it is used then the GSS-API per-message tokens and GSS_Pseudo_random() function are not available, but channel binding and mutual authentication may be available. Also, when using the NULL encryption type the fast re-authentication feature is not available because key exchange is only performed the initiator application uses the variant of this mechanism that supports per-message tokens and the GSS_Pseudo_random() function.</p><p id="rfc.section.9.p.5">Acceptor credentials are PKIX <a href="#RFC5280"><cite title="Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile">[RFC5280]</cite></a> certificates and their private keys.</p><h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a> <a id="d1e3378" href="#d1e3378">Host certificates for mutual authentication</a></h2><p id="rfc.section.9.1.p.1">Allowing a match on only the DNS subjectAltName in an acceptor's X.509 certificate permits different services on the same host to impersonate each other. This should be subject to local policy.</p><h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a> <a id="d1e3387" href="#d1e3387">Error statuses</a></h2><p id="rfc.section.9.2.p.1">Returning rich error information in the clear (see <a href="#sub_response_gss_min" title="“gss-min” (GSS minor status code)">Section 6.3.2</a>) may leak information. Implementations may squash status codes and/or avoid returning minor statuses entirely. Indeed, applications may even not send back error tokens at all, instead closing the connection or whatever might be appropriate for the application. (This is a generic GSS-API security consideration.)</p><hr class="noprint"><h1 id="rfc.section.10" class="np"><a href="#rfc.section.10">10.</a> <a id="d1e3399" href="#d1e3399">IANA Considerations</a></h1><p id="rfc.section.10.p.1">This specification creates a number of IANA registries.</p><h2 id="rfc.section.10.1"><a href="#rfc.section.10.1">10.1</a> <a id="sub_OID_Registry" href="#sub_OID_Registry">OID Registry</a></h2><p id="rfc.section.10.1.p.1">Prefix: iso.org.dod.internet.private.enterprise.padl.gssBrowserID (1.3.6.1.4.1.5322.24)</p><div id="rfc.table.u.4"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="center">Decimal</th><th class="center">Name</th><th class="center">Description</th></tr></thead><tbody><tr><td class="center">0</td><td class="center">Reserved</td><td class="center">Reserved</td></tr><tr><td class="center">1</td><td class="center">mechanisms</td><td class="center">A sub-arc containing BrowserID mechanisms</td></tr><tr><td class="center">2</td><td class="center">nametypes</td><td class="center">A sub-arc containing BrowserID name types</td></tr></tbody></table></div><p id="rfc.section.10.1.p.2">Prefix: iso.org.dod.internet.private.enterprise.padl.gssBrowserID.mechanisms (1.3.6.1.4.1.5322.24.1)</p><div id="rfc.table.u.5"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="center">Decimal</th><th class="center">Name</th><th class="center">Description</th><th class="center">ECDH curve</th><th class="center">Symmetric hash</th></tr></thead><tbody><tr><td class="center">0</td><td class="center">gss-browserid-null</td><td class="center">The NULL security mechanism</td><td class="center">N/A</td><td class="center">N/A</td></tr><tr><td class="center">17</td><td class="center">gss-browserid-aes128</td><td class="center">The aes128-cts-hmac-sha1-96 mechanism</td><td class="center">P-256</td><td class="center">HS256</td></tr><tr><td class="center">18</td><td class="center">gss-browserid-aes256</td><td class="center">The aes256-cts-hmac-sha1-96 mechanism</td><td class="center">P-521</td><td class="center">HS256</td></tr></tbody></table></div><p id="rfc.section.10.1.p.4">Prefix: iso.org.dod.internet.private.enterprise.padl.gssBrowserID.nametypes (1.3.6.1.4.1.5322.24.2)</p><div id="rfc.table.u.6"><table class="tt full center" cellpadding="3" cellspacing="0"><thead><tr><th class="center">Decimal</th><th class="center">Name</th><th class="center">Description</th></tr></thead><tbody><tr><td class="center">0</td><td class="center">Reserved</td><td class="center">Reserved</td></tr><tr><td class="center">1</td><td class="center">GSS_C_NT_BROWSERID_PRINCIPAL</td><td class="center">3.1.1</td></tr></tbody></table></div><h2 id="rfc.section.10.2"><a href="#rfc.section.10.2">10.2</a> <a id="d1e3667" href="#d1e3667">SASL Registry</a></h2><p id="rfc.section.10.2.p.1">Subject: Registration of SASL mechanisms BROWSERID-AES128 and BROWSERID-AES128-PLUS</p><p id="rfc.section.10.2.p.3">SASL mechanism names: BROWSERID-AES128 and BROWSERID-AES128-PLUS</p><p id="rfc.section.10.2.p.5">Security considerations: See RFC 5801 and draft-howard-gss-browserid</p><p id="rfc.section.10.2.p.7">Published specification (recommended): draft-howard-gss-browserid</p><p id="rfc.section.10.2.p.9">Person & email address to contact for further information:</p><p id="rfc.section.10.2.p.10">Luke Howard [email protected]</p><p id="rfc.section.10.2.p.12">Intended usage: common</p><p id="rfc.section.10.2.p.14">Owner/Change controller: [email protected]</p><p id="rfc.section.10.2.p.16">Note: This mechanism describes the GSS BrowserID mechanism used with the aes128-cts-hmac-sha1-96 encryption type. The GSS-API OID for this mechanism is 1.3.6.1.4.1.5322.24.1.17. As described in RFC 5801 a PLUS variant of this mechanism is also required.</p><p id="rfc.section.10.2.p.17"> <span class="comment" id="rfc.comment.9">[<a href="#rfc.comment.9" class="smpl">rfc.comment.9</a>: We could use the NULL encryption type variant for SASL, as the GS2 bridge does not use message protection services. However, because that mechanisms is unkeyed, re-authentication would not be available. Defining a single AES128 mechanism is consistent with GSS EAP.]</span> </p><hr class="noprint"><h1 id="rfc.references" class="np"><a id="rfc.section.11" href="#rfc.section.11">11.</a> References</h1><h2 class="np" id="rfc.references.1"><a href="#rfc.section.11.1" id="rfc.section.11.1">11.1</a> Normative References</h2><table><tr><td class="reference"><b id="RFC2119">[RFC2119]</b></td><td class="top"><a href="mailto:[email protected]" title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP 14, RFC 2119, March 1997.</td></tr><tr><td class="reference"><b id="RFC2743">[RFC2743]</b></td><td class="top"><a href="mailto:[email protected]" title="RSA Laboratories">Linn, J.</a>, “<a href="http://tools.ietf.org/html/rfc2743">Generic Security Service Application Program Interface Version 2, Update 1</a>”, RFC 2743, January 2000.</td></tr><tr><td class="reference"><b id="RFC3961">[RFC3961]</b></td><td class="top">Raeburn, K., “<a href="http://tools.ietf.org/html/rfc3961">Encryption and Checksum Specifications for Kerberos 5</a>”, RFC 3961, February 2005.</td></tr><tr><td class="reference"><b id="RFC4402">[RFC4402]</b></td><td class="top">Williams, N., “<a href="http://tools.ietf.org/html/rfc4402">A Pseudo-Random Function (PRF) for the Kerberos V Generic Security Service Application Program Interface (GSS-API) Mechanism</a>”, RFC 4402, February 2006.</td></tr><tr><td class="reference"><b id="RFC4121">[RFC4121]</b></td><td class="top">Zhu, L., Jaganathan, K., and S. Hartman, “<a href="http://tools.ietf.org/html/rfc4121">The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2</a>”, RFC 4121, July 2005.</td></tr><tr><td class="reference"><b id="RFC4178">[RFC4178]</b></td><td class="top">Zhu, L., Leach, P., Jaganathan, K., and W. Ingersoll, “<a href="http://tools.ietf.org/html/rfc4178">The Simple and Protected Generic Security Service Application Program Interface (GSS-API) Negotiation Mechanism</a>”, RFC 4178, October 2005.</td></tr><tr><td class="reference"><b id="RFC4422">[RFC4422]</b></td><td class="top">Melnikov, A. and K. Zeilenga, “<a href="http://tools.ietf.org/html/rfc4422">Simple Authentication and Security Layer (SASL)</a>”, RFC 4422, June 2006.</td></tr><tr><td class="reference"><b id="RFC4556">[RFC4556]</b></td><td class="top">Zhu, L. and B. Tung, “<a href="http://tools.ietf.org/html/rfc4556">Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)</a>”, RFC 4556, June 2006.</td></tr><tr><td class="reference"><b id="RFC4757">[RFC4757]</b></td><td class="top">Jaganathan, K., Zhu, L., and J. Brezak, “<a href="http://tools.ietf.org/html/rfc4757">The RC4-HMAC Kerberos Encryption Types Used by Microsoft Windows</a>”, RFC 4757, December 2006.</td></tr><tr><td class="reference"><b id="RFC4985">[RFC4985]</b></td><td class="top">Santesson, S., “<a href="http://tools.ietf.org/html/rfc4985">Internet X.509 Public Key Infrastructure Subject Alternative Name for Expression of Service Name</a>”, RFC 4985, August 2007.</td></tr><tr><td class="reference"><b id="RFC5178">[RFC5178]</b></td><td class="top">Williams, N. and A. Melnikov, “<a href="http://tools.ietf.org/html/rfc5178">Generic Security Service Application Program Interface (GSS-API) Internationalization and Domain-Based Service Names and Name Type</a>”, RFC 5178, May 2008.</td></tr><tr><td class="reference"><b id="RFC5280">[RFC5280]</b></td><td class="top">Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, “<a href="http://tools.ietf.org/html/rfc5280">Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</a>”, RFC 5280, May 2008.</td></tr><tr><td class="reference"><b id="RFC5801">[RFC5801]</b></td><td class="top">Josefsson, S. and N. Williams, “<a href="http://tools.ietf.org/html/rfc5801">Using Generic Security Service Application Program Interface (GSS-API) Mechanisms in Simple Authentication and Security Layer (SASL): The GS2 Mechanism Family</a>”, RFC 5801, July 2010.</td></tr><tr><td class="reference"><b id="RFC5929">[RFC5929]</b></td><td class="top">Altman, J., Williams, N., and L. Zhu, “<a href="http://tools.ietf.org/html/rfc5929">Channel Bindings for TLS</a>”, RFC 5929, July 2010.</td></tr><tr><td class="reference"><b id="RFC6680">[RFC6680]</b></td><td class="top">Williams, N., Johansson, L., Hartman, S., and S. Josefsson, “<a href="http://tools.ietf.org/html/rfc6680">Generic Security Service Application Programming Interface (GSS-API) Naming Extensions</a>”, RFC 6680, August 2012.</td></tr><tr><td class="reference"><b id="I-D.ietf-jose-json-web-algorithms">[I-D.ietf-jose-json-web-algorithms]</b></td><td class="top">Jones, M., “<a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-18">JSON Web Algorithms (JWA)</a>”, Internet-Draft draft-ietf-jose-json-web-algorithms-18 (work in progress), November 2013.</td></tr><tr><td class="reference"><b id="I-D.ietf-jose-json-web-key">[I-D.ietf-jose-json-web-key]</b></td><td class="top">Jones, M., “<a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18">JSON Web Key (JWK)</a>”, Internet-Draft draft-ietf-jose-json-web-key-18 (work in progress), November 2013.</td></tr><tr><td class="reference"><b id="I-D.ietf-jose-json-web-signature">[I-D.ietf-jose-json-web-signature]</b></td><td class="top">Jones, M., Bradley, J., and N. Sakimura, “<a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-18">JSON Web Signature (JWS)</a>”, Internet-Draft draft-ietf-jose-json-web-signature-18 (work in progress), November 2013.</td></tr><tr><td class="reference"><b id="I-D.ietf-oauth-json-web-token">[I-D.ietf-oauth-json-web-token]</b></td><td class="top">Jones, M., Bradley, J., and N. Sakimura, “<a href="http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-13">JSON Web Token (JWT)</a>”, Internet-Draft draft-ietf-oauth-json-web-token-13 (work in progress), November 2013.</td></tr><tr><td class="reference"><b id="I-D.zhu-negoex">[I-D.zhu-negoex]</b></td><td class="top">Short, M., Zhu, L., Damour, K., and D. McPherson, “<a href="http://tools.ietf.org/html/draft-zhu-negoex-04">SPNEGO Extended Negotiation (NEGOEX) Security Mechanism</a>”, Internet-Draft draft-zhu-negoex-04 (work in progress), January 2011.</td></tr><tr><td class="reference"><b id="I-D.zhu-pku2u">[I-D.zhu-pku2u]</b></td><td class="top">Zhu, L., Altman, J., and N. Williams, “<a href="http://tools.ietf.org/html/draft-zhu-pku2u-09">Public Key Cryptography Based User-to-User Authentication - (PKU2U)</a>”, Internet-Draft draft-zhu-pku2u-09 (work in progress), November 2008.</td></tr><tr><td class="reference"><b id="BrowserID">[BrowserID]</b></td><td class="top">Adida, B., “BrowserID Specification”, February 2013.</td></tr></table><h2 id="rfc.references.2"><a href="#rfc.section.11.2" id="rfc.section.11.2">11.2</a> Informative References</h2><table><tr><td class="reference"><b id="RFC4120">[RFC4120]</b></td><td class="top">Neuman, C., Yu, T., Hartman, S., and K. Raeburn, “<a href="http://tools.ietf.org/html/rfc4120">The Kerberos Network Authentication Service (V5)</a>”, RFC 4120, July 2005.</td></tr></table><hr class="noprint"><div class="avoidbreak"><h1 id="rfc.authors" class="np"><a href="#rfc.authors">Authors' Addresses</a></h1><address class="vcard"><span class="vcardline"><span class="fn">Luke Howard</span><span class="n hidden"><span class="family-name">Howard</span><span class="given-name">Luke</span></span></span><span class="org vcardline">PADL Software</span><span class="adr"><span class="street-address vcardline">PO Box 59</span><span class="vcardline"><span class="locality">Central Park</span>, <span class="region">VIC</span> <span class="postal-code">3145</span></span><span class="country-name vcardline">Australia</span></span><span class="vcardline">EMail: <a href="mailto:[email protected]"><span class="email">[email protected]</span></a></span></address><address class="vcard"><span class="vcardline"><span class="fn">Nicolas Williams</span><span class="n hidden"><span class="family-name">Williams</span><span class="given-name">Nicolas</span></span></span><span class="org vcardline">Cryptonector, LLC</span><span class="vcardline">EMail: <a href="mailto:[email protected]"><span class="email">[email protected]</span></a></span></address></div></body></html>