Skip to content

Commit fe68c36

Browse files
committed
Remove trailing whitespace
1 parent 302d4ae commit fe68c36

File tree

9 files changed

+246
-240
lines changed

9 files changed

+246
-240
lines changed

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"yaml.customTags": [
3+
"!sd scalar"
4+
],
5+
"files.trimTrailingWhitespace": true
6+
}

attacks-and-mitigations.md

Lines changed: 181 additions & 181 deletions
Large diffs are not rendered by default.

documenthistory.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Clarified references to attacker model by including a link to (#secmodel)
3232
* Clarified description of "CSRF tokens" and reference to RFC6819
3333
* Described that OIDC can prevent access token injection
34-
* Updated references
34+
* Updated references
3535

3636
-19
3737

@@ -44,7 +44,7 @@
4444
* Change wording for disallowing HTTP redirect URIs.
4545

4646
-17
47-
47+
4848
* Make the use of metadata RECOMMENDED for both servers and clients
4949
* Make announcing PKCE support in metadata the RECOMMENDED way (before: either metadata or deployment-specific way)
5050
* AS also MUST NOT expose open redirectors.
@@ -54,7 +54,7 @@
5454
* Make HTTPS mandatory for most redirect URIs.
5555

5656
-16
57-
57+
5858
* Make MTLS a suggestion, not RECOMMENDED.
5959
* Add important requirements when using nonce for code injection protection.
6060
* Highlight requirements for refresh token sender-constraining.
@@ -67,16 +67,16 @@
6767
* Update reference to DPoP
6868
* Fix reference to RFC8414
6969
* Move to xml2rfcv3
70-
70+
7171
-14
72-
72+
7373
* Added info about using CSP to prevent clickjacking
7474
* Changes from WGLC feedback
7575
* Editorial changes
7676
* AS MUST announce PKCE support either in metadata or using deployment-specific ways (before: SHOULD)
77-
77+
7878
-13
79-
79+
8080
* Discourage use of Resource Owner Password Credentials Grant
8181
* Added text on client impersonating resource owner
8282
* Recommend asymmetric methods for client authentication
@@ -85,18 +85,18 @@
8585
* AS SHOULD publish PKCE support
8686
* Cleaned up discussion on auth code injection
8787
* AS MUST support PKCE
88-
88+
8989
-12
90-
90+
9191
* Added updated attacker model
92-
92+
9393
-11
94-
94+
9595
* Adapted section 2.1.2 to outcome of consensus call
9696
* more text on refresh token inactivity and implementation note on refresh token replay detection via refresh token rotation
9797

9898
-10
99-
99+
100100
* incorporated feedback by Joseph Heenan
101101
* changed occurrences of SHALL to MUST
102102
* added text on lack of token/cert binding support tokens issued in

draft-ietf-oauth-security-topics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fullname="John Bradley"
2727
organization="Yubico"
2828
[author.address]
2929
30-
30+
3131
[[author]]
3232
initials="A."
3333
surname="Labunets"
@@ -43,10 +43,10 @@ fullname="Daniel Fett"
4343
organization="Authlete"
4444
[author.address]
4545
46-
46+
4747
%%%
4848

49-
.# Abstract
49+
.# Abstract
5050

5151
This document describes best current security practice for OAuth 2.0.
5252
It updates and extends the OAuth 2.0 Security Threat Model to

introduction.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ challenges can be observed:
1212
in the OAuth 2.0 Threat Model and Security Considerations [@!RFC6819],
1313
continued exploitation demonstrates a need for more specific
1414
recommendations, easier to implement mitigations, and more defense in depth.
15-
15+
1616
* OAuth is being used in environments with higher security requirements than
1717
considered initially, such as Open Banking, eHealth, eGovernment, and
1818
Electronic Signatures. Those use cases call for stricter guidelines and
1919
additional protection.
20-
20+
2121
* OAuth is being used in much more dynamic setups than originally anticipated,
2222
creating new challenges with respect to security. Those challenges go beyond
2323
the original scope of [@!RFC6749], [@!RFC6750], and [@!RFC6819].
24-
24+
2525
OAuth initially assumed static relationships between client,
2626
authorization server, and resource servers. The URLs of the AS and RS were
2727
known to the client at deployment time and built an anchor for the
@@ -39,11 +39,11 @@ challenges can be observed:
3939
Protocol [@RFC7591] and OAuth 2.0 Authorization Server Metadata
4040
[@RFC8414] were developed to support the use of OAuth in
4141
dynamic scenarios.
42-
42+
4343
* Technology has changed. For example, the way browsers treat fragments when
4444
redirecting requests has changed, and with it, the implicit grant's
4545
underlying security model.
46-
46+
4747
This document provides updated security recommendations to address
4848
these challenges. It does not supplant the security advice given in
4949
[@!RFC6749], [@!RFC6750], and [@!RFC6819], but complements those
@@ -56,7 +56,7 @@ insecure. Naturally, not all existing ecosystems and implementations are
5656
compatible with the new requirements and following the best practices described in
5757
this document may break interoperability. Nonetheless, it is RECOMMENDED that
5858
implementers upgrade their implementations and ecosystems when feasible.
59-
59+
6060
## Structure
6161

6262
The remainder of this document is organized as follows: The next section

mainmatter.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{{attacks-and-mitigations.md}}
99

1010
# Acknowledgements {#Acknowledgements}
11-
12-
We would like to thank
11+
12+
We would like to thank
1313
Brock Allen,
1414
Annabelle Richard Backman,
1515
Dominick Baier,
@@ -46,14 +46,14 @@ Tim Wuertele,
4646
David Waite and
4747
Hans Zandbelt
4848
for their valuable feedback.
49-
49+
5050

5151
# IANA Considerations {#IANA}
52-
52+
5353
This draft makes no requests to IANA.
54-
54+
5555

5656
# Security Considerations {#Security}
57-
57+
5858
Security considerations are described in (#recommendations), (#secmodel), and (#attacks_and_mitigations).
59-
59+

recommendations.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Best Practices {#recommendations}
2-
2+
33
This section describes the set of security mechanisms and measures the OAuth
44
working group considers best practices at the time of writing.
55

@@ -27,13 +27,13 @@ the `nonce` parameter provides CSRF protection. Otherwise, one-time
2727
use CSRF tokens carried in the `state` parameter that are securely
2828
bound to the user agent MUST be used for CSRF protection (see
2929
(#csrf_countermeasures)).
30-
30+
3131
When an OAuth client can interact with more than one authorization server, a
3232
defense against mix-up attacks (see (#mix_up)) is REQUIRED. To this end, clients
33-
SHOULD
33+
SHOULD
3434

3535
* use the `iss` parameter as a countermeasure according to
36-
[@!RFC9207], or
36+
[@!RFC9207], or
3737
* use an alternative countermeasure based on an `iss` value in the
3838
authorization response (such as the `iss` Claim in the ID Token in
3939
[@!OpenID.Core] or in [@JARM] responses), processing it as described in
@@ -54,15 +54,15 @@ Clients MUST prevent authorization code
5454
injection attacks (see (#code_injection)) and misuse of authorization codes using one of the following options:
5555

5656
* Public clients MUST use PKCE [@!RFC7636] to this end, as motivated in
57-
(#pkce_as_injection_protection).
57+
(#pkce_as_injection_protection).
5858
* For confidential clients, the use of PKCE [@!RFC7636] is RECOMMENDED, as it
5959
provides a strong protection against misuse and injection of authorization
6060
codes as described in (#pkce_as_injection_protection) and, as a side-effect,
6161
prevents CSRF even in presence of strong attackers as described in
62-
(#csrf_countermeasures).
62+
(#csrf_countermeasures).
6363
* With additional precautions, described in (#nonce_as_injection_protection),
6464
confidential OpenID Connect [@!OpenID.Core] clients MAY use the `nonce` parameter and the
65-
respective Claim in the ID Token instead.
65+
respective Claim in the ID Token instead.
6666

6767
In any case, the PKCE challenge or OpenID Connect `nonce` MUST be
6868
transaction-specific and securely bound to the client and the user agent in
@@ -97,20 +97,20 @@ the client to detect PKCE support). ASs MAY instead provide a
9797
deployment-specific way to ensure or determine PKCE support by the AS.
9898

9999
### Implicit Grant {#implicit_grant_recommendation}
100-
100+
101101
The implicit grant (response type "token") and other response types
102102
causing the authorization server to issue access tokens in the
103103
authorization response are vulnerable to access token leakage and
104104
access token replay as described in (#insufficient_uri_validation),
105105
(#credential_leakage_referrer), (#browser_history), and
106106
(#access_token_injection).
107-
108-
Moreover, no viable method for sender-constraining exists to
107+
108+
Moreover, no viable method for sender-constraining exists to
109109
bind access tokens to a specific client (as recommended in
110110
(#token_replay_prevention)) when the access tokens are issued in the
111111
authorization response. This means that an attacker can use leaked or stolen
112112
access token at a resource endpoint.
113-
113+
114114
In order to avoid these issues, clients SHOULD NOT use the implicit
115115
grant (response type "token") or other response types issuing
116116
access tokens in the authorization response, unless access token injection
@@ -129,7 +129,7 @@ sender-constrain the issued tokens (see next section).
129129
## Token Replay Prevention {#token_replay_prevention}
130130

131131
### Access Tokens
132-
132+
133133
A sender-constrained access token scopes the applicability of an access
134134
token to a certain sender. This sender is obliged to demonstrate knowledge
135135
of a certain secret as prerequisite for the acceptance of that token at
@@ -164,7 +164,7 @@ the access token with certain resource servers and every resource
164164
server is obliged to verify, for every request, whether the access
165165
token sent with that request was meant to be used for that particular
166166
resource server. If not, the resource server MUST refuse to serve the
167-
respective request. The `aud` claim as defined in [@!RFC9068] MAY be
167+
respective request. The `aud` claim as defined in [@!RFC9068] MAY be
168168
used to audience-restrict access tokens. Clients and authorization servers MAY utilize the
169169
parameters `scope` or `resource` as specified in [@!RFC6749] and
170170
[@RFC8707], respectively, to determine the
@@ -211,10 +211,10 @@ methods more robust against a number of attacks.
211211
## Other Recommendations
212212

213213
The use of OAuth Metadata [@!RFC8414] can help to improve the security of OAuth
214-
deployments:
214+
deployments:
215215

216216
* It ensures that security features and other new OAuth features can be enabled
217-
automatically by compliant software libraries.
217+
automatically by compliant software libraries.
218218
* It reduces chances for misconfigurations, for example misconfigured endpoint
219219
URLs (that might belong to an attacker) or misconfigured security features.
220220
* It can help to facilitate rotation of cryptographic keys and to ensure

references.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
</author>
9696
<date day="27" month="April" year="2015"/>
9797
</front>
98-
</reference>
98+
</reference>
9999

100100

101101
<reference anchor="oauth_security_ubc" target="http://passwordresearch.com/papers/paper267.html">
@@ -110,7 +110,7 @@
110110
<date month="October" year="2012"/>
111111
</front>
112112
<format target="http://passwordresearch.com/papers/paper267.html" type="HTML" />
113-
</reference>
113+
</reference>
114114

115115
<reference anchor="oauth_security_cmu" target="http://css.csail.mit.edu/6.858/2012/readings/oauth-sso.pdf">
116116
<front>
@@ -126,7 +126,7 @@
126126
</author>
127127
<author initials="Y." surname="Tian" fullname="Yuan Tian">
128128
<organization abbrev="CMU">Carnegie Mellon University</organization>
129-
</author>
129+
</author>
130130
<author initials="R." surname="Kotcher" fullname="Robert Kotcher">
131131
<organization abbrev="CMU">Carnegie Mellon University</organization>
132132
</author>
@@ -208,7 +208,7 @@
208208

209209
<reference anchor="WebAuthn" target="https://www.w3.org/TR/2019/REC-webauthn-1-20190304/">
210210
<front>
211-
<title>Web Authentication: An API for accessing Public Key Credentials Level 1</title>
211+
<title>Web Authentication: An API for accessing Public Key Credentials Level 1</title>
212212
<author fullname="Dirk Balfanz" surname="Balfanz" initials="D."><organization>Google</organization></author>
213213
<author fullname="Alexei Czeskis" surname="Czeskis" initials="A."><organization>Google</organization></author>
214214
<author fullname="Jeff Hodges" surname="Hodges" initials="J."><organization>Google</organization></author>

security-model.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,41 @@ least against the following attackers:
1616
of network endpoints including browsers and servers (except for
1717
the concrete RO, AS, and RS). Web attackers may set up web sites
1818
that are visited by the RO, operate their own user agents, and
19-
participate in the protocol.
20-
19+
participate in the protocol.
20+
2121
Web attackers may, in particular, operate OAuth clients that are
2222
registered at AS, and operate their own authorization and resource
2323
servers that can be used (in parallel) by the RO and other
2424
resource owners.
25-
25+
2626
It must also be assumed that web attackers can lure the user to
2727
open arbitrary attacker-chosen URIs at any time. In practice, this
2828
can be achieved in many ways, for example, by injecting malicious
2929
advertisements into advertisement networks, or by sending
3030
legitimate-looking emails.
31-
31+
3232
Web attackers can use their own user credentials to create new
3333
messages as well as any secrets they learned previously. For
3434
example, if a web attacker learns an authorization code of a user
3535
through a misconfigured redirect URI, the web attacker can then
3636
try to redeem that code for an access token.
37-
37+
3838
They cannot, however, read or manipulate messages that are not
3939
targeted towards them (e.g., sent to a URL controlled by a
4040
non-attacker controlled AS).
41-
41+
4242
* (A2) Network Attackers that additionally have full control over
4343
the network over which protocol participants communicate. They can
4444
eavesdrop on, manipulate, and spoof messages, except when these
4545
are properly protected by cryptographic methods (e.g., TLS).
4646
Network attackers can also block arbitrary messages.
47-
47+
4848
While an example for a web attacker would be a customer of an internet
4949
service provider, network attackers could be the internet service
5050
provider itself, an attacker in a public (wifi) network using ARP
5151
spoofing, or a state-sponsored attacker with access to internet
5252
exchange points, for instance.
53-
53+
5454
These attackers conform to the attacker model that was used in formal analysis
5555
efforts for OAuth [@arXiv.1601.01229]. This is a minimal attacker model.
5656
Implementers MUST take into account all possible types of attackers in the
@@ -61,7 +61,7 @@ the following, stronger attackers in addition to those listed above:
6161
* (A3) Attackers that can read, but not modify, the contents of the
6262
authorization response (i.e., the authorization response can leak
6363
to an attacker).
64-
64+
6565
Examples for such attacks include open redirector attacks, insufficient
6666
checking of redirect URIs (see (#insufficient_uri_validation)), problems
6767
existing on mobile operating systems (where different apps can register
@@ -77,9 +77,9 @@ the following, stronger attackers in addition to those listed above:
7777
access token may be sent to an attacker-controlled resource server
7878
due to a misconfiguration, or an RO is social-engineered into
7979
using a attacker-controlled RS. See also (#comp_res_server).
80-
80+
8181
(A3), (A4) and (A5) typically occur together with either (A1) or (A2).
82-
Attackers can collaborate to reach a common goal.
82+
Attackers can collaborate to reach a common goal.
8383

8484
Note that in this attacker model, an attacker (see A1) can be a RO or
8585
act as one. For example, an attacker can use his own browser to replay
@@ -89,4 +89,4 @@ above at the client or RS.
8989
This document focusses on threats resulting from these attackers.
9090
Attacks in an even stronger attacker model are discussed, for example,
9191
in [@arXiv.1901.11520].
92-
92+

0 commit comments

Comments
 (0)