Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDN #657

Merged
merged 3 commits into from
Oct 25, 2023
Merged

CDN #657

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 59 additions & 0 deletions csaf_2.0/guidance/cdn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# CSAF and Content Delivery Networks (CDNs)

If you want to use a CDN to provide your CSAF files, please find some remarks below:

- **Activate caching**: Most files are more or less static - activate caching to minimize risk for (D)DoS.
- **Include path exemption**: The path `.well-known/csaf/` and potentially `.well-known/security.txt` need to be accessible for all HTTP-clients (also those that are usually detected as bots).

*Specifically, at least the files in this path ending on `.json`, `.asc`, `.sha256` and `.sha512` should be excluded.*
- **Flush cache when updating files**: When new files are written or old files updated, the cache must be updated. Usually, this can be done through the API the CDN provides. Instead of flushing the whole cache (easy way), a more precise way can be used as files that need to be updated in the cache depend on the distribution method:

**Directory-based distribution:**

```
<path-to-updated-CSAF-document>.json
<path-to-updated-CSAF-document>.json.asc
<path-to-updated-CSAF-document>.json.sha256
<path-to-updated-CSAF-document>.json.sha512
<path-of-index>.txt
<path-of-changes>.csv
```

*Example:*

The CSAF advisory `ESA-2023-31816` was changed. Consequently, the following files in the cache need to be updated.

```
.well-known/csaf/white/2023/esa-2023-31816.json
.well-known/csaf/white/2023/esa-2023-31816.json.asc
.well-known/csaf/white/2023/esa-2023-31816.json.sha256
.well-known/csaf/white/2023/esa-2023-31816.json.sha512
.well-known/csaf/white/index.txt
.well-known/csaf/white/changes.csv
```

**ROLIE-based distribution:**

```
<path-to-updated-CSAF-document>.json
<path-to-updated-CSAF-document>.json.asc
<path-to-updated-CSAF-document>.json.sha256
<path-to-updated-CSAF-document>.json.sha512
<path-of-ROLIE-feed>.json
<path-of-ROLIE-categories>.json
<path-of-ROLIE-services>.json
```

*Example:*

The CSAF advisory `ESA-2023-31816` was changed. Consequently, the following files in the cache need to be updated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move the common "The CSAF advisory ESA-2023-31816 was changed." sentence in front of the two scenarios and make the "Consequently, ..." sentences different so that they do not look like a failed CPSR coding. As the first four paths are identical it took me some time to see that both examples look indeed correct.


```
.well-known/csaf/white/2023/esa-2023-31816.json
.well-known/csaf/white/2023/esa-2023-31816.json.asc
.well-known/csaf/white/2023/esa-2023-31816.json.sha256
.well-known/csaf/white/2023/esa-2023-31816.json.sha512
.well-known/csaf/white/csaf-feed-tlp-white.json
.well-known/csaf/white/csaf-categories-tlp-white.json
.well-known/csaf/service.json
```
4 changes: 4 additions & 0 deletions csaf_2.0/guidance/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ Future versions of [CSAF will support TLP v2](https://github.com/oasis-tcs/csaf/

CSAF lister and CSAF aggregator choose on their own which producing parties they add to their lists. Please reach out to the CSAF lister or CSAF aggregator in question. Their contact details are available in the metadata of the list.

### I want to use a Content Delivery Network (CDN) to distribute CSAF files. What do I need to consider?

Please see our advise on [CDNs](./cdn.md).

### Where can I find a list of all parties that produce CSAF?

Currently, there is no such list available. However, [BSI hosts a list with metadata of known parties](https://wid.cert-bund.de/.well-known/csaf-aggregator/aggregator.json) that produce CSAF files and distribute them in a way that they are automatically retrievable. This list is called a CSAF lister.