Skip to content

Commit d39dc03

Browse files
committed
Add Security Considerations (3.0.4)
This adds the previously standalone security considerations document as a top-level section just before the appendices.
1 parent 82fe810 commit d39dc03

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

versions/3.0.4.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3517,6 +3517,32 @@ Two examples of this:
35173517
1. The [Paths Object](#pathsObject) MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can't access any documentation. They'd still have access to the [Info Object](#infoObject) which may contain additional information regarding authentication.
35183518
2. The [Path Item Object](#pathItemObject) MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the [Paths Object](#pathsObject), because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
35193519

3520+
## Security Considerations
3521+
3522+
### OpenAPI Document Formats
3523+
3524+
OpenAPI documents use JSON, YAML, and JSON Schema, and therefore share their security considerations:
3525+
- [JSON](https://www.iana.org/assignments/media-types/application/json)
3526+
- [YAML](https://www.iana.org/assignments/media-types/application/yaml)
3527+
- [JSON Schema Core](https://json-schema.org/draft/2020-12/json-schema-core#section-13)
3528+
- [JSON Schema Validation](https://json-schema.org/draft/2020-12/json-schema-validation#name-security-considerations)
3529+
3530+
### Tooling and Usage Scenarios
3531+
3532+
In addition, OpenAPI documents are processed by a wide variety of tooling for numerous different purposes, such as client code generation, documentation generation, server side routing, and API testing. OpenAPI document authors must consider the risks of the scenarios where the OpenAPI document may be used.
3533+
3534+
### Security Schemes
3535+
3536+
An OpenAPI document describes the security schemes used to protect the resources it defines. The security schemes available offer varying degrees of protection. Factors such as the sensitivity of the data and the potential impact of a security breach should guide the selection of security schemes for the API resources. Some security schemes, such as basic auth and OAuth Implicit flow, are supported for compatibility with existing APIs. However, their inclusion in OpenAPI does not constitute an endorsement of their use, particularly for highly sensitive data or operations.
3537+
3538+
### Handling External Resources
3539+
3540+
OpenAPI documents may contain references to external resources that may be dereferenced automatically by consuming tools. External resources may be hosted on different domains that may be untrusted. References in an OpenAPI document, or across OpenAPI documents may cause a cycle. Tooling must detect and handle cycles to prevent resource exhaustion.
3541+
3542+
### Markdown and HTML Sanitization
3543+
3544+
Certain properties allow the use of Markdown which can contain HTML including script. It is the responsibility of tooling to appropriately sanitize the Markdown.
3545+
35203546
## <a name="revisionHistory"></a>Appendix A: Revision History
35213547

35223548
Version | Date | Notes

0 commit comments

Comments
 (0)