forked from FreeRADIUS/freeradius-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rfc4590.txt
1795 lines (1265 loc) · 65.6 KB
/
rfc4590.txt
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
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Working Group B. Sterman
Request for Comments: 4590 Kayote Networks
Category: Standards Track D. Sadolevsky
SecureOL, Inc.
D. Schwartz
Kayote Networks
D. Williams
Cisco Systems
W. Beck
Deutsche Telekom AG
July 2006
RADIUS Extension for Digest Authentication
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
This document defines an extension to the Remote Authentication
Dial-In User Service (RADIUS) protocol to enable support of Digest
Authentication, for use with HTTP-style protocols like the Session
Initiation Protocol (SIP) and HTTP.
Table of Contents
1. Introduction ....................................................2
1.1. Terminology ................................................2
1.2. Motivation .................................................3
1.3. Overview ...................................................4
2. Detailed Description ............................................6
2.1. RADIUS Client Behavior .....................................6
2.1.1. Credential Selection ................................6
2.1.2. Constructing an Access-Request ......................6
2.1.3. Constructing an Authentication-Info Header ..........7
2.1.4. Failed Authentication ...............................8
2.1.5. Obtaining Nonces ....................................9
2.2. RADIUS Server Behavior .....................................9
Sterman, et al. Standards Track [Page 1]
RFC 4590 RADIUS Digest Authentication July 2006
2.2.1. General Attribute Checks ............................9
2.2.2. Authentication .....................................10
2.2.3. Constructing the Reply .............................11
3. New RADIUS Attributes ..........................................12
3.1. Digest-Response attribute .................................12
3.2. Digest-Realm Attribute ....................................13
3.3. Digest-Nonce Attribute ....................................13
3.4. Digest-Response-Auth Attribute ............................14
3.5. Digest-Nextnonce Attribute ................................14
3.6. Digest-Method Attribute ...................................14
3.7. Digest-URI Attribute ......................................15
3.8. Digest-Qop Attribute ......................................15
3.9. Digest-Algorithm Attribute ................................16
3.10. Digest-Entity-Body-Hash Attribute ........................16
3.11. Digest-CNonce Attribute ..................................17
3.12. Digest-Nonce-Count Attribute .............................17
3.13. Digest-Username Attribute ................................17
3.14. Digest-Opaque Attribute ..................................18
3.15. Digest-Auth-Param Attribute ..............................18
3.16. Digest-AKA-Auts Attribute ................................19
3.17. Digest-Domain Attribute ..................................19
3.18. Digest-Stale Attribute ...................................20
3.19. Digest-HA1 Attribute .....................................20
3.20. SIP-AOR Attribute ........................................21
4. Diameter Compatibility .........................................21
5. Table of Attributes ............................................22
6. Examples .......................................................23
7. IANA Considerations ............................................27
8. Security Considerations ........................................27
8.1. Denial of Service .........................................28
8.2. Confidentiality and Data Integrity ........................28
9. Acknowledgements ...............................................29
10. References ....................................................29
10.1. Normative References .....................................29
10.2. Informative References ...................................30
1. Introduction
1.1. Terminology
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 [RFC2119].
The use of normative requirement key words in this document shall
apply only to RADIUS client and RADIUS server implementations that
include the features described in this document. This document
creates no normative requirements for existing implementations.
Sterman, et al. Standards Track [Page 2]
RFC 4590 RADIUS Digest Authentication July 2006
HTTP-style protocol
The term 'HTTP-style' denotes any protocol that uses HTTP-like
headers and uses HTTP Digest Authentication as described in
[RFC2617]. Examples are HTTP and the Session Initiation
Protocol (SIP).
NAS
Network Access Server, the RADIUS client.
nonce
An unpredictable value used to prevent replay attacks. The
nonce generator may use cryptographic mechanisms to produce
nonces it can recognize without maintaining state.
protection space
HTTP-style protocols differ in their definition of the
protection space. For HTTP, it is defined as the combination
of realm and canonical root URL of the requested resource for
which the use is authorized by the RADIUS server. In the case
of SIP, the realm string alone defines the protection space.
SIP UA
SIP User Agent, an Internet endpoint that uses the Session
Initiation Protocol.
SIP UAS
SIP User Agent Server, a logical entity that generates a
response to a SIP (Session Initiation Protocol) request.
1.2. Motivation
The HTTP Digest Authentication mechanism, defined in [RFC2617], was
subsequently adapted for use with SIP [RFC3261]. Due to the
limitations and weaknesses of Digest Authentication (see [RFC2617],
section 4), additional authentication and encryption mechanisms are
defined in SIP [RFC3261], including Transport Layer Security (TLS)
[RFC4346] and Secure MIME (S/MIME) [RFC3851]. However, Digest
Authentication support is mandatory in SIP implementations, and
Digest Authentication is the preferred way for a SIP UA to
authenticate itself to a proxy server. Digest Authentication is used
in other protocols as well.
To simplify the provisioning of users, there is a need to support
this authentication mechanism within Authentication, Authorization,
and Accounting (AAA) protocols such as RADIUS [RFC2865] and Diameter
[RFC3588].
Sterman, et al. Standards Track [Page 3]
RFC 4590 RADIUS Digest Authentication July 2006
This document defines an extension to the RADIUS protocol to enable
support of Digest Authentication for use with SIP, HTTP, and other
HTTP-style protocols using this authentication method. Support for
Digest mechanisms such as Authentication and Key Agreement (AKA)
[RFC3310] is also supported. A companion document [SIP-APP] defines
support for Digest Authentication within Diameter.
1.3. Overview
HTTP Digest is a challenge-response protocol used to authenticate a
client's request to access some resource on a server. Figure 1 shows
a single HTTP Digest transaction.
HTTP/SIP..
+------------+ (1) +------------+
| |--------->| |
| HTTP-style | (2) | HTTP-style |
| client |<---------| server |
| | (3) | |
| |--------->| |
| | (4) | |
| |<---------| |
+------------+ +------------+
Figure 1: Digest operation without RADIUS
If the client sends a request without any credentials (1), the server
will reply with an error response (2) containing a nonce. The client
creates a cryptographic digest from parts of the request, from the
nonce it received from the server, and from a shared secret. The
client re-transmits the request (3) to the server, but now includes
the digest within the packet. The server does the same digest
calculation as the client and compares the result with the digest it
received in (3). If the digest values are identical, the server
grants access to the resource and sends a positive response to the
client (4). If the digest values differ, the server sends a negative
response to the client (4).
Instead of maintaining a local user database, the server could use
RADIUS to access a centralized user database. However, RADIUS
[RFC2865] does not include support for HTTP Digest Authentication.
The RADIUS client cannot use the User-Password attribute, since it
does not receive a password from the HTTP-style client. The
CHAP-Challenge and CHAP-Password attributes described in [RFC1994]
are also not suitable since the CHAP algorithm is not compatible with
HTTP Digest.
Sterman, et al. Standards Track [Page 4]
RFC 4590 RADIUS Digest Authentication July 2006
This document defines new attributes that enable the RADIUS server to
perform the digest calculation defined in [RFC2617], providing
support for Digest Authentication as a native authentication
mechanism within RADIUS.
The nonces required by the digest algorithm are generated by the
RADIUS server. Generating them in the RADIUS client would save a
round-trip, but introduce security and operational issues. Some
digest algorithms -- e.g., AKA [RFC3310] -- would not work.
Figure 2 depicts a scenario in which the HTTP-style server defers
authentication to a RADIUS server. Entities A and B communicate
using HTTP or SIP, while entities B and C communicate using RADIUS.
HTTP/SIP RADIUS
+-----+ (1) +-----+ +-----+
| |==========>| | (2) | |
| | | |---------->| |
| | | | (3) | |
| | (4) | |<----------| |
| |<==========| | | |
| | (5) | | | |
| |==========>| | | |
| A | | B | (6) | C |
| | | |---------->| |
| | | | (7) | |
| | | |<----------| |
| | (8) | | | |
| |<==========| | | |
+-----+ +-----+ +-----+
====> HTTP/SIP
----> RADIUS
Figure 2: HTTP Digest over RADIUS
The entities have the following roles:
A: HTTP client / SIP UA
B: {HTTP server / HTTP proxy server / SIP proxy server / SIP UAS}
acting also as a RADIUS NAS
C: RADIUS server
Sterman, et al. Standards Track [Page 5]
RFC 4590 RADIUS Digest Authentication July 2006
The following messages are sent in this scenario:
A sends B an HTTP/SIP request without an authorization header (step
1). B sends an Access-Request packet with the newly defined
Digest-Method and Digest-URI attributes but without a Digest-Nonce
attribute to the RADIUS server, C (step 2). C chooses a nonce and
responds with an Access-Challenge (step 3). This Access-Challenge
contains Digest attributes, from which B takes values to construct an
HTTP/SIP "(Proxy) Authorization required" response. B sends this
response to A (step 4). A resends its request with its credentials
(step 5). B sends an Access-Request to C (step 6). C checks the
credentials and replies with Access-Accept or Access-Reject (step 7).
Depending on C's result, B processes A's request or rejects it with a
"(Proxy) Authorization required" response (step 8).
2. Detailed Description
2.1. RADIUS Client Behavior
The attributes described in this document are sent in cleartext.
Therefore, were a RADIUS client to accept secure connections (HTTPS
or SIPS) from HTTP-style clients, this could result in information
intentionally protected by HTTP-style clients being sent in the clear
during RADIUS exchange.
2.1.1. Credential Selection
On reception of an HTTP-style request message, the RADIUS client
checks whether it is authorized to authenticate the request. Where
an HTTP-style request traverses several proxies and each of the
proxies requests to authenticate the HTTP-style client, the request
at the HTTP-style server may contain multiple credential sets.
The RADIUS client can use the 'realm' directive in HTTP to determine
which credentials are applicable. Where none of the realms are of
interest, the RADIUS client MUST behave as though no relevant
credentials were sent. In all situations, the RADIUS client MUST
send zero or exactly one credential to the RADIUS server. The RADIUS
client MUST choose the credential of the (Proxy-)Authorization header
if the realm directive matches its locally configured realm.
2.1.2. Constructing an Access-Request
If a matching (Proxy-)Authorization header is present and contains
HTTP Digest information, the RADIUS client checks the 'nonce'
parameter.
Sterman, et al. Standards Track [Page 6]
RFC 4590 RADIUS Digest Authentication July 2006
If the RADIUS client recognizes the nonce, it takes the header
directives and puts them into a RADIUS Access-Request packet. It
puts the 'response' directive into a Digest-Response attribute and
the realm, nonce, digest-uri, qop, algorithm, cnonce, nc, username,
and opaque directives into the respective Digest-Realm, Digest-Nonce,
Digest-URI, Digest-Qop, Digest-Algorithm, Digest-CNonce,
Digest-Nonce-Count, Digest-Username, and Digest-Opaque attributes.
The RADIUS client puts the request method into the Digest-Method
attribute.
Due to syntactic requirements, HTTP-style protocols have to escape
with backslash all quote and backslash characters in contents of HTTP
Digest directives. When translating directives into RADIUS
attributes, the RADIUS client only removes the surrounding quotes
where present. See Section 3 for an example.
If the Quality of Protection (qop) directive's value is 'auth-int',
the RADIUS client calculates H(entity-body) as described in
[RFC2617], Section 3.2.1, and puts the result in a
Digest-Entity-Body-Hash attribute.
The RADIUS client adds a Message-Authenticator attribute, defined in
[RFC3579], and sends the Access-Request packet to the RADIUS server.
The RADIUS server processes the packet and responds with an
Access-Accept or an Access-Reject.
2.1.3. Constructing an Authentication-Info Header
After having received an Access-Accept from the RADIUS server, the
RADIUS client constructs an Authentication-Info header:
o If the Access-Accept packet contains a Digest-Response-Auth
attribute, the RADIUS client checks the Digest-Qop attribute:
* If the Digest-Qop attribute's value is 'auth' or not specified,
the RADIUS client puts the Digest-Response-Auth attribute's
content into the Authentication-Info header's 'rspauth'
directive of the HTTP-style response.
* If the Digest-Qop attribute's value is 'auth-int', the RADIUS
client ignores the Access-Accept packet and behaves as if it
had received an Access-Reject packet (Digest-Response-Auth
can't be correct as the RADIUS server does not know the
contents of the HTTP-style response's body).
Sterman, et al. Standards Track [Page 7]
RFC 4590 RADIUS Digest Authentication July 2006
o If the Access-Accept packet contains a Digest-HA1 attribute, the
RADIUS client checks the 'qop' and 'algorithm' directives in the
Authorization header of the HTTP-style request it wants to
authorize:
* If the 'qop' directive is missing or its value is 'auth', the
RADIUS client ignores the Digest-HA1 attribute. It does not
include an Authentication-Info header in its HTTP-style
response.
* If the 'qop' directive's value is 'auth-int' and at least one
of the following conditions is true, the RADIUS client
calculates the contents of the HTTP-style response's 'rspauth'
directive:
+ The algorithm directive's value is 'MD5-sess' or
'AKAv1-MD5-sess'.
+ IP Security (IPsec) is configured to protect traffic between
the RADIUS client and RADIUS server with IPsec (see
Section 8).
It creates the HTTP-style response message and calculates the
hash of this message's body. It uses the result and the
Digest-URI attribute's value of the corresponding
Access-Request packet to perform the H(A2) calculation. It
takes the Digest-Nonce, Digest-Nonce-Count, Digest-CNonce, and
Digest-Qop values of the corresponding Access-Request and the
Digest-HA1 attribute's value to finish the computation of the
'rspauth' value.
o If the Access-Accept packet contains neither a
Digest-Response-Auth nor a Digest-HA1 attribute, the RADIUS client
will not create an Authentication-Info header for its HTTP-style
response.
When the RADIUS server provides a Digest-Nextnonce attribute in the
Access-Accept packet, the RADIUS client puts the contents of this
attribute into a 'nextnonce' directive. Now it can send an
HTTP-style response.
2.1.4. Failed Authentication
If the RADIUS client did receive an HTTP-style request without a
(Proxy-)Authorization header matching its locally configured realm
value, it obtains a new nonce and sends an error response (401 or
407) containing a (Proxy-)Authenticate header.
Sterman, et al. Standards Track [Page 8]
RFC 4590 RADIUS Digest Authentication July 2006
If the RADIUS client receives an Access-Challenge packet in response
to an Access-Request containing a Digest-Nonce attribute, the RADIUS
server did not accept the nonce. If a Digest-Stale attribute is
present in the Access-Challenge and has a value of 'true' (without
surrounding quotes), the RADIUS client sends an error response (401
or 407) containing a WWW-/Proxy-Authenticate header with the
directive 'stale' and the digest directives derived from the Digest-*
attributes.
If the RADIUS client receives an Access-Reject from the RADIUS
server, it sends an error response to the HTTP-style request it has
received. If the RADIUS client does not receive a response, it
retransmits or fails over to another RADIUS server as described in
[RFC2865].
2.1.5. Obtaining Nonces
The RADIUS client has two ways to obtain nonces: it has received one
in a Digest-Nextnonce attribute of a previously received
Access-Accept packet or it asks the RADIUS server for one. To do the
latter, it sends an Access-Request containing a Digest-Method and a
Digest-URI attribute but without a Digest-Nonce attribute. It adds a
Message-Authenticator (see [RFC3579]) attribute to the Access-Request
packet. The RADIUS server chooses a nonce and responds with an
Access-Challenge containing a Digest-Nonce attribute.
The RADIUS client constructs a (Proxy-)Authenticate header using the
received Digest-Nonce and Digest-Realm attributes to fill the nonce
and realm directives. The RADIUS server can send Digest-Qop,
Digest-Algorithm, Digest-Domain, and Digest-Opaque attributes in the
Access-Challenge carrying the nonce. If these attributes are
present, the client MUST use them.
2.2. RADIUS Server Behavior
If the RADIUS server receives an Access-Request packet with a
Digest-Method and a Digest-URI attribute but without a Digest-Nonce
attribute, it chooses a nonce. It puts the nonce into a Digest-Nonce
attribute and sends it in an Access-Challenge packet to the RADIUS
client. The RADIUS server MUST add Digest-Realm,
Message-Authenticator (see [RFC3579]), SHOULD add Digest-Algorithm
and one or more Digest-Qop, and MAY add Digest-Domain or
Digest-Opaque attributes to the Access-Challenge packet.
2.2.1. General Attribute Checks
If the RADIUS server receives an Access-Request packet containing a
Digest-Response attribute, it looks for the following attributes:
Sterman, et al. Standards Track [Page 9]
RFC 4590 RADIUS Digest Authentication July 2006
Digest-Realm, Digest-Nonce, Digest-Method, Digest-URI, Digest-Qop,
Digest-Algorithm, and Digest-Username. Depending on the content of
Digest-Algorithm and Digest-Qop, it looks for
Digest-Entity-Body-Hash, Digest-CNonce, and Digest-AKA-Auts, too.
See [RFC2617] and [RFC3310] for details. If the Digest-Algorithm
attribute is missing, 'MD5' is assumed. If the RADIUS server has
issued a Digest-Opaque attribute along with the nonce, the
Access-Request MUST have a matching Digest-Opaque attribute.
If mandatory attributes are missing, it MUST respond with an
Access-Reject packet.
The RADIUS server removes '\' characters that escape quote and '\'
characters from the text values it has received in the Digest-*
attributes.
If the mandatory attributes are present, the RADIUS server MUST check
if the RADIUS client is authorized to serve users of the realm
mentioned in the Digest-Realm attribute. If the RADIUS client is not
authorized, the RADIUS server MUST send an Access-Reject. The RADIUS
server SHOULD log the event so as to notify the operator, and MAY
take additional action such as sending an Access-Reject in response
to all future requests from this client, until this behavior is reset
by management action.
The RADIUS server determines the age of the nonce in Digest-Nonce by
using an embedded time-stamp or by looking it up in a local table.
The RADIUS server MUST check the integrity of the nonce if it embeds
the time-stamp in the nonce. Section 2.2.2 describes how the server
handles old nonces.
2.2.2. Authentication
If the Access-Request message has passed the checks described above,
the RADIUS server calculates the digest response as described in
[RFC2617]. To look up the password, the RADIUS server uses the
RADIUS User-Name attribute. The RADIUS server MUST check if the user
identified by the User-Name attribute
o is authorized to access the protection space and
o is authorized to use the URI included in the SIP-AOR attribute, if
this attribute is present.
If any of those checks fails, the RADIUS server MUST send an
Access-Reject.
Sterman, et al. Standards Track [Page 10]
RFC 4590 RADIUS Digest Authentication July 2006
Correlation between User-Name and SIP-AOR AVP values is required just
to avoid that any user can register or misuse a SIP-AOR allocated to
a different user.
All values required for the digest calculation are taken from the
Digest attributes described in this document. If the calculated
digest response equals the value received in the Digest-Response
attribute, the authentication was successful.
If the response values match, but the RADIUS server considers the
nonce in the Digest-Nonce attribute as too old, it sends an
Access-Challenge packet containing a new nonce and a Digest-Stale
attribute with a value of 'true' (without surrounding quotes).
If the response values don't match, the RADIUS server responds with
an Access-Reject.
2.2.3. Constructing the Reply
If the authentication was successful, the RADIUS server adds an
attribute to the Access-Accept packet that can be used by the RADIUS
client to construct an Authentication-Info header:
o If the Digest-Qop attribute's value is 'auth' or unspecified, the
RADIUS server SHOULD put a Digest-Response-Auth attribute into the
Access-Accept packet.
o If the Digest-Qop attribute's value is 'auth-int' and at least one
of the following conditions is true, the RADIUS server SHOULD put
a Digest-HA1 attribute into the Access-Accept packet:
* The Digest-Algorithm attribute's value is 'MD5-sess' or
'AKAv1-MD5-sess'.
* IPsec is configured to protect traffic between the RADIUS
client and RADIUS server with IPsec (see Section 8).
In all other cases, Digest-Response-Auth or Digest-HA1 MUST NOT be
sent.
RADIUS servers MAY construct a Digest-Nextnonce attribute and add it
to the Access-Accept packet. This is useful to limit the lifetime of
a nonce and to save a round-trip in future requests (see nextnonce
discussion in [RFC2617], section 3.2.3). The RADIUS server adds a
Message-Authenticator attribute (see [RFC3579]) and sends the
Access-Accept packet to the RADIUS client.
Sterman, et al. Standards Track [Page 11]
RFC 4590 RADIUS Digest Authentication July 2006
If the RADIUS server does not accept the nonce received in an
Access-Request packet but authentication was successful, the RADIUS
server MUST send an Access-Challenge packet containing a Digest-Stale
attribute set to 'true' (without surrounding quotes). The RADIUS
server MUST add Message-Authenticator (see [RFC3579]), Digest-Nonce,
Digest-Realm, SHOULD add Digest-Algorithm and one or more Digest-Qop
and MAY add Digest-Domain, Digest-Opaque attributes to the
Access-Challenge packet.
3. New RADIUS Attributes
If not stated otherwise, the attributes have the following format:
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Text ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Quote and backslash characters in Digest-* attributes representing
HTTP-style directives with a quoted-string syntax are escaped. The
surrounding quotes are removed. They are syntactical delimiters that
are redundant in RADIUS. For example, the directive
realm="the \"example\" value"
is represented as follows:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Digest-Realm | 23 | the \"example\" value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3.1. Digest-Response attribute
Description
If this attribute is present in an Access-Request message, a
RADIUS server implementing this specification MUST treat the
Access-Request as a request for Digest Authentication. When a
RADIUS client receives a (Proxy-)Authorization header, it puts
the request-digest value into a Digest-Response attribute.
This attribute (which enables the user to prove possession of
the password) MUST only be used in Access-Requests.
Type
103 for Digest-Response.
Length
>= 3
Sterman, et al. Standards Track [Page 12]
RFC 4590 RADIUS Digest Authentication July 2006
Text
When using HTTP Digest, the text field is 32 octets long and
contains a hexadecimal representation of a 16-octet digest
value as it was calculated by the authenticated client. Other
digest algorithms MAY define different digest lengths. The
text field MUST be copied from request-digest of
digest-response ([RFC2617]) without surrounding quotes.
3.2. Digest-Realm Attribute
Description
This attribute describes a protection space component of the
RADIUS server. HTTP-style protocols differ in their definition
of the protection space. See [RFC2617], Section 1.2, for
details. It MUST only be used in Access-Request and
Access-Challenge packets.
Type
104 for Digest-Realm
Length
>=3
Text
In Access-Requests, the RADIUS client takes the value of the
realm directive (realm-value according to [RFC2617]) without
surrounding quotes from the HTTP-style request it wants to
authenticate. In Access-Challenge packets, the RADIUS server
puts the expected realm value into this attribute.
3.3. Digest-Nonce Attribute
Description
This attribute holds a nonce to be used in the HTTP Digest
calculation. If the Access-Request had a Digest-Method and a
Digest-URI but no Digest-Nonce attribute, the RADIUS server
MUST put a Digest-Nonce attribute into its Access-Challenge
packet. This attribute MUST only be used in Access-Request and
Access-Challenge packets.
Type
105 for Digest-Nonce
Length
>=3
Text
In Access-Requests, the RADIUS client takes the value of the
nonce directive (nonce-value in [RFC2617]) without surrounding
quotes from the HTTP-style request it wants to authenticate.
In Access-Challenge packets, the attribute contains the nonce
selected by the RADIUS server.
Sterman, et al. Standards Track [Page 13]
RFC 4590 RADIUS Digest Authentication July 2006
3.4. Digest-Response-Auth Attribute
Description
This attribute enables the RADIUS server to prove possession of
the password. If the previously received Digest-Qop attribute
was 'auth-int' (without surrounding quotes), the RADIUS server
MUST send a Digest-HA1 attribute instead of a
Digest-Response-Auth attribute. The Digest-Response-Auth
attribute MUST only be used in Access-Accept packets. The
RADIUS client puts the attribute value without surrounding
quotes into the rspauth directive of the Authentication-Info
header.
Type
106 for Digest-Response-Auth.
Length
>= 3
Text
The RADIUS server calculates a digest according to section
3.2.3 of [RFC2617] and copies the result into this attribute.
Digest algorithms other than the one defined in [RFC2617] MAY
define digest lengths other than 32.
3.5. Digest-Nextnonce Attribute
This attribute holds a nonce to be used in the HTTP Digest
calculation.
Description
The RADIUS server MAY put a Digest-Nextnonce attribute into an
Access-Accept packet. If this attribute is present, the RADIUS
client MUST put the contents of this attribute into the
nextnonce directive of an Authentication-Info header in its
HTTP-style response. This attribute MUST only be used in
Access-Accept packets.
Type
107 for Digest-Nextnonce
Length
>=3
Text
It is recommended that this text be base64 or hexadecimal data.
3.6. Digest-Method Attribute
Description
This attribute holds the method value to be used in the HTTP
Digest calculation. This attribute MUST only be used in
Access-Request packets.
Sterman, et al. Standards Track [Page 14]
RFC 4590 RADIUS Digest Authentication July 2006
Type
108 for Digest-Method
Length
>=3
Text
In Access-Requests, the RADIUS client takes the value of the
request method from the HTTP-style request it wants to
authenticate.
3.7. Digest-URI Attribute
Description
This attribute is used to transport the contents of the
digest-uri directive or the URI of the HTTP-style request. It
MUST only be used in Access-Request packets.
Type
109 for Digest-URI
Length
>=3
Text
If the HTTP-style request has an Authorization header, the
RADIUS client puts the value of the "uri" directive found in
the HTTP-style request Authorization header (known as
"digest-uri-value" in section 3.2.2 of [RFC2617]) without
surrounding quotes into this attribute. If there is no
Authorization header, the RADIUS client takes the value of the
request URI from the HTTP-style request it wants to
authenticate.
3.8. Digest-Qop Attribute
Description
This attribute holds the Quality of Protection parameter that
influences the HTTP Digest calculation. This attribute MUST
only be used in Access-Request and Access-Challenge packets. A
RADIUS client SHOULD insert one of the Digest-Qop attributes it
has received in a previous Access-Challenge packet. RADIUS
servers SHOULD insert at least one Digest-Qop attribute in an
Access-Challenge packet. Digest-Qop is optional in order to
preserve backward compatibility with a minimal implementation
of [RFC2069].
Type
110 for Digest-Qop
Length
>=3
Text
In Access-Requests, the RADIUS client takes the value of the
qop directive (qop-value as described in [RFC2617]) from the
Sterman, et al. Standards Track [Page 15]
RFC 4590 RADIUS Digest Authentication July 2006
HTTP-style request it wants to authenticate. In
Access-Challenge packets, the RADIUS server puts a desired
qop-value into this attribute. If the RADIUS server supports
more than one "quality of protection" value, it puts each
qop-value into a separate Digest-Qop attribute.
3.9. Digest-Algorithm Attribute
Description
This attribute holds the algorithm parameter that influences
the HTTP Digest calculation. It MUST only be used in
Access-Request and Access-Challenge packets. If this attribute
is missing, MD5 is assumed.
Type
111 for Digest-Algorithm
Length
>=3
Text
In Access-Requests, the RADIUS client takes the value of the
algorithm directive (as described in [RFC2617], section 3.2.1)
from the HTTP-style request it wants to authenticate. In
Access-Challenge packets, the RADIUS server SHOULD put the
desired algorithm into this attribute.
3.10. Digest-Entity-Body-Hash Attribute
Description
When using the qop-level 'auth-int', a hash of the HTTP-style
message body's contents is required for digest calculation.
Instead of sending the complete body of the message, only its
hash value is sent. This hash value can be used directly in
the digest calculation.
The clarifications described in section 22.4 of [RFC3261] about
the hash of empty entity bodies apply to the
Digest-Entity-Body-Hash attribute. This attribute MUST only be
sent in Access-Request packets.
Type
112 for Digest-Entity-Body-Hash
Length
>=3
Text
The attribute holds the hexadecimal representation of
H(entity-body). This hash is required by certain
authentication mechanisms, such as HTTP Digest with quality of
protection set to "auth-int". RADIUS clients MUST use this
attribute to transport the hash of the entity body when HTTP
Digest is the authentication mechanism and the RADIUS server
Sterman, et al. Standards Track [Page 16]
RFC 4590 RADIUS Digest Authentication July 2006
requires that the integrity of the entity body (e.g., qop
parameter set to "auth-int") be verified. Extensions to this
document may define support for authentication mechanisms other
than HTTP Digest.
3.11. Digest-CNonce Attribute
Description
This attribute holds the client nonce parameter that is used in
the HTTP Digest calculation. It MUST only be used in
Access-Request packets.
Type
113 for Digest-CNonce
Length
>=3
Text
This attribute includes the value of the cnonce-value [RFC2617]
without surrounding quotes, taken from the HTTP-style request.
3.12. Digest-Nonce-Count Attribute
Description
This attribute includes the nonce count parameter that is used
to detect replay attacks. The attribute MUST only be used in
Access-Request packets.
Type
114 for Digest-Nonce-Count
Length
10
Text
In Access-Requests, the RADIUS client takes the value of the nc
directive (nc-value according to [RFC2617]) without surrounding
quotes from the HTTP-style request it wants to authenticate.
3.13. Digest-Username Attribute
Description
This attribute holds the user name used in the HTTP Digest
calculation. The RADIUS server MUST use this attribute only
for the purposes of calculating the digest. In order to
determine the appropriate user credentials, the RADIUS server
MUST use the User-Name (1) attribute, and MUST NOT use the
Digest-Username attribute. This attribute MUST only be used in
Access-Request packets.
Type
115 for Digest-Username
Sterman, et al. Standards Track [Page 17]
RFC 4590 RADIUS Digest Authentication July 2006
Length
>= 3
Text
In Access-Requests, the RADIUS client takes the value of the
username directive (username-value according to [RFC2617])
without surrounding quotes from the HTTP-style request it wants
to authenticate.
3.14. Digest-Opaque Attribute
Description
This attribute holds the opaque parameter that is passed to the
HTTP-style client. The HTTP-style client will pass this value
back to the server (i.e., the RADIUS client) without
modification. This attribute MUST only be used in
Access-Request and Access-Challenge packets.
Type
116 for Digest-Opaque
Length
>=3
Text
In Access-Requests, the RADIUS client takes the value of the
opaque directive (opaque-value according to [RFC2617]) without
surrounding quotes from the HTTP-style request it wants to
authenticate and puts it into this attribute. In
Access-Challenge packets, the RADIUS server MAY include this
attribute.
3.15. Digest-Auth-Param Attribute
Description
This attribute is a placeholder for future extensions and
corresponds to the "auth-param" parameter defined in section
3.2.1 of [RFC2617]. The Digest-Auth-Param is the mechanism
whereby the RADIUS client and RADIUS server can exchange
auth-param extension parameters contained within Digest headers
that are not understood by the RADIUS client and for which
there are no corresponding stand-alone attributes.
Unlike the previously listed Digest-* attributes, the
Digest-Auth-Param contains not only the value but also the
parameter name, since the parameter name is unknown to the