@@ -1032,23 +1032,9 @@ See {{security-client-authentication}} for additional details.
1032
1032
1033
1033
# ## Client Secret {#client-secret}
1034
1034
1035
- Clients in possession of a client secret, sometimes known as a client password,
1036
- MAY use the HTTP Basic
1037
- authentication scheme as defined in Section 11 of {{RFC9110}} to authenticate with
1038
- the authorization server. The client identifier is encoded using the
1039
- ` application/x-www-form-urlencoded` encoding algorithm per
1040
- {{application-x-www-form-urlencoded}}, and the encoded value is used as the username; the client
1041
- secret is encoded using the same algorithm and used as the
1042
- password. The authorization server MUST support the HTTP Basic
1043
- authentication scheme for authenticating clients that were issued a
1044
- client secret.
1045
-
1046
- For example (with extra line breaks for display purposes only) :
1047
-
1048
- Authorization : Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
1049
-
1050
- In addition to that, the authorization server MAY support including the
1051
- client credentials in the request content using the following
1035
+ To support clients in possession of a client secret,
1036
+ the authorization server MUST support the client including the
1037
+ client credentials in the request body content using the following
1052
1038
parameters :
1053
1039
1054
1040
" client_id " :
@@ -1058,12 +1044,8 @@ parameters:
1058
1044
" client_secret " :
1059
1045
: REQUIRED. The client secret.
1060
1046
1061
- Including the client credentials in the request content using the two
1062
- parameters is NOT RECOMMENDED and SHOULD be limited to clients unable
1063
- to directly utilize the HTTP Basic authentication scheme (or other
1064
- password-based HTTP authentication schemes). The parameters can only
1065
- be transmitted in the request content and MUST NOT be included in the
1066
- request URI.
1047
+ The parameters can only be transmitted in the request content and MUST NOT
1048
+ be included in the request URI.
1067
1049
1068
1050
For example, a request to refresh an access token ({{refreshing-an-access-token}}) using
1069
1051
the content parameters (with extra line breaks for display purposes
@@ -1076,7 +1058,32 @@ only):
1076
1058
grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
1077
1059
&client_id=s6BhdRkqt3&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
1078
1060
1079
- Since this client authentication method involves a password, the
1061
+ The authorization server MAY support the HTTP Basic
1062
+ authentication scheme for authenticating clients that were issued a
1063
+ client secret.
1064
+
1065
+ When using the HTTP Basic authentication scheme as defined in Section 11 of {{RFC9110}}
1066
+ to authenticate with the authorization server, the client identifier is encoded using the
1067
+ ` application/x-www-form-urlencoded` encoding algorithm per
1068
+ {{application-x-www-form-urlencoded}}, and the encoded value is used as the username; the client
1069
+ secret is encoded using the same algorithm and used as the
1070
+ password.
1071
+
1072
+ For example (with extra line breaks for display purposes only) :
1073
+
1074
+ Authorization : Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
1075
+
1076
+ Note : This method of initially form-encoding the client identifier and secret,
1077
+ and then using the encoded values as the HTTP Basic authentication username
1078
+ and password, has led to many interoperability problems in the past. Some
1079
+ implementations have missed the encoding step, or decided to only encode
1080
+ certain characters, or ignored the encoding requirement when validating the
1081
+ credentials, leading to clients having to special-case how they present the
1082
+ credentials to individual authorization servers. Including the credentials
1083
+ in the request body content avoids the encoding issues and leads to more
1084
+ interoperable implementations.
1085
+
1086
+ Since the client secret authentication method involves a password, the
1080
1087
authorization server MUST protect any endpoint utilizing it against
1081
1088
brute force attacks.
1082
1089
@@ -3836,6 +3843,7 @@ Discussions around this specification have also occurred at the OAuth Security W
3836
3843
3837
3844
* Explicitly mention that Bearer is case insensitive
3838
3845
* Recommend against defining custom scopes that conflict with known scopes
3846
+ * Change client credentials to be required to be supported in the request body to avoid HTTP Basic authentication encoding interop issues
3839
3847
3840
3848
-10
3841
3849
0 commit comments