Skip to content

Commit 642f359

Browse files
committed
Address Mark Nottingham's early review
1 parent 4ae3255 commit 642f359

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

draft-ietf-httpapi-privacy.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ informative:
4848
--- abstract
4949

5050
Redirecting HTTP requests to HTTPS, a common pattern for human-facing web
51-
resources, can be an anti-pattern for authenticated API traffic. This document
51+
resources, can be an anti-pattern for authenticated HTTP API traffic.
52+
This document
5253
discusses the pitfalls and makes deployment recommendations for authenticated
5354
HTTP APIs. It does not specify a protocol.
5455

@@ -71,7 +72,8 @@ intermediary implementations have a prominently displayed option to enable it
7172
automatically.
7273

7374
When client authentication is used, more care must be taken. The client's
74-
initial request may include a Bearer token or other credential; once the request
75+
initial request may include a Bearer token or other credential (such as
76+
a Cookie); once the request
7577
has been sent on the network, any passive attacker who can see the traffic can
7678
acquire this credential and use it.
7779

@@ -117,7 +119,8 @@ new server, while HSTS requires a successful prior connection to the server and
117119
relies on the client to implement persistent storage of the HSTS directive.
118120

119121
Used together, however, both approaches make clients less likely to send any
120-
requests over an insecure channel. Servers with authenticated endpoints SHOULD
122+
requests over an insecure channel.
123+
HTTP API servers with authenticated endpoints SHOULD
121124
employ both mechanisms.
122125

123126
## Connection Blocking
@@ -127,15 +130,17 @@ the developer or user is less likely to notice the misconfiguration. Where
127130
possible, it is advantageous for such a misconfiguration to fail immediately so
128131
that the error can be noticed and corrected.
129132

130-
Servers MAY induce such an early failure by not accepting unencrypted
133+
HTTP API servers MAY induce such an early failure by not accepting unencrypted
131134
connections, e.g. on port 80. This makes it impossible for a client to send a
132135
credential over an insecure channel to the authentic server, as no such channel
133-
can be opened. Servers MAY alternatively restrict connections on port 80 to
136+
can be opened.
137+
HTTP API servers MAY alternatively restrict connections on port 80 to
134138
network sources which are more trusted, such as a VPN or virtual network
135139
interface.
136140

137141
However, this mitigation is limited against active network attackers, who can
138-
impersonate the server and accept the client's insecure connection attempt.
142+
impersonate the HTTP API server and accept the client's insecure
143+
connection attempt.
139144

140145
## Credential Restriction
141146

@@ -149,28 +154,32 @@ to indicate the expected usage to the client.
149154

150155
Some deployments may not find it feasible to completely block unencrypted
151156
connections, whether because the hostname is shared with unauthenticated
152-
endpoints or for infrastructure reasons. Therefore, servers need a response for
157+
endpoints or for infrastructure reasons. Therefore, HTTP API servers need
158+
a response for
153159
when a credential has been received over an insecure channel.
154160

155161
HTTP status code 403 (Forbidden) indicates that "the server understood the
156-
request but refuses to fulfill it" {!HTTP=RFC9110}. While this is generally
162+
request but refuses to fulfill it" {{!HTTP=RFC9110}}. While this is generally
157163
understood to mean that "the server considers \[the credentials] insufficient to
158164
grant access," it also states that "a request might be forbidden for reasons
159-
unrelated to the credentials." Servers SHOULD return status code 403 to all
165+
unrelated to the credentials." HTTP API servers SHOULD return status
166+
code 403 to all
160167
requests received over an insecure channel, regardless of the validity of the
161168
presented credentials.
162169

163170
Because a difference in behavior would enable attackers to guess and check
164-
possible credentials, a server MUST NOT return a different client response
171+
possible credentials, an HTTP API server MUST NOT return a different client
172+
response
165173
between a valid or invalid credential presented over an insecure connection.
166174
Differences in behavior MUST only be visible on subsequent use of the credential
167175
over a secure channel.
168176

169177
### Credential Revocation
170178

171179
When a request is received over an unencrypted channel, the presented credential
172-
is potentially compromised. Servers SHOULD revoke such credentials immediately.
173-
When the credential is next used over a secure channel, a server MAY return an
180+
is potentially compromised. HTTP API servers SHOULD revoke such
181+
credentials immediately.
182+
When the credential is next used over a secure channel, the server MAY return an
174183
error that indicates why the credential was revoked.
175184

176185
Credentials in a request can take on different forms. API keys and tokens are simple
@@ -189,7 +198,8 @@ recommendations above.
189198
## Implement Relevant Protocols
190199

191200
Clients SHOULD support and query for HTTPS records {{!RFC9460}} when
192-
establishing a connection. This gives servers an opportunity to provide more
201+
establishing a connection. This gives HTTP API servers an opportunit
202+
to provide more
193203
complete information about capabilities, some of which are security-relevant.
194204

195205
Clients SHOULD respect HSTS headers {{!RFC6797}} received
@@ -219,7 +229,7 @@ This entire document is about security of HTTP API interactions.
219229
The behavior recommended in {{credential-revocation}} creates the potential for
220230
a denial of service attack where an attacker guesses many possible credentials
221231
over an unencrypted connection in hopes of discovering and revoking a valid one.
222-
Servers implementing this mitigation MUST also guard against such attacks, such
232+
HTTP API ervers implementing this mitigation MUST also guard against such attacks, such
223233
as by limiting the number of requests before closing the connection and
224234
rate-limiting the establishment of insecure connections.
225235

0 commit comments

Comments
 (0)