Skip to content

Commit 50cddd9

Browse files
committed
Change 'security omitted' to mean 'no info'
1 parent 581ec03 commit 50cddd9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

versions/3.1.1.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,13 @@ This object MAY be extended with [Specification Extensions](#specification-exten
322322

323323
###### <a name="oas-security-field"></a>The `security` field
324324

325-
The `security` field describes how requests are authorized. If omitted, then requests are always authorized; otherwise, it is an array of security requirement objects, only one of which needs to be satisfied for the request to be authorized.
325+
The `security` field describes how requests are authorized:
326326

327-
Because the empty [security requirement object](#security-requirement-object) `{}` will always authorize the request, it follows that `security: [{}]` means the same as omitting `security` entirely: namely, all requests are authorized.
327+
- If omitted, then nothing can be inferred about the authorization requirements; the behaviour is implementation-defined.
328+
- If present but empty (`security: []`), then the behaviour is undefined.
329+
- Otherwise, it is an array of security requirement objects, only one of which needs to be satisfied for the request to be authorized.
328330

329-
If `security` is specified and empty (i.e. `security: []`), then the behaviour is undefined.
331+
Because the empty [security requirement object](#security-requirement-object) `{}` will always be satisfied, any `security` list of Security Requirement Objects that includes `{}` will allow all requests. In particular, `security: [{}]` means that no security schemes are in use (also known as "no security").
330332

331333
Individual operations [can override this field](#operation-security).
332334

@@ -3917,8 +3919,6 @@ This enables support for scenarios where multiple query parameters or HTTP heade
39173919

39183920
When a non-empty list of Security Requirement Objects is defined on the [OpenAPI Object](#openapi-object) or [Operation Object](#operation-object), only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request; see [the `security` field](#oas-security-field).
39193921

3920-
The empty Security Requirement Object (`{}`) will always be satisifed, therefore any `security` list of Security Requirement Objects that includes `{}` will authorize all requests.
3921-
39223922
##### Patterned Fields
39233923

39243924
| Field Pattern | Type | Description |

0 commit comments

Comments
 (0)