1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Merge pull request #282 from csaf-poc/create_once_docs

Create once docs
This commit is contained in:
Fadi Abbud 2022-08-24 09:13:48 +02:00 committed by GitHub
commit 65c7925ed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View file

@ -1,8 +1,28 @@
`csaf_provider` implements the CGI interface for webservers
`csaf_provider` implements a CGI interface for webservers
and reads its configuration from a [TOML](https://toml.io/en/) file.
The [setup docs](../README.md#setup-trusted-provider)
explain how to wire this up with nginx and where the config file lives.
When installed, two endpoints are offered,
and you should use the [csaf_uploader](../docs/csaf_uploader)
to access them:
### /api/create
Must be called once after all configuration values are set.
It will write the `provider-metadata.json` and may write
or update the`security.txt`.
Once the files exist, they will **not** be overwriten
by additional `create` calls, even if the config values have been changed.
Changes should happen rarely and can be done manually.
Also keep an eye on having the keys in the `.well-known/csaf/openpgp`
folder match the ones mentioned in the `provider-metadata.json`.
### /api/upload
Called for each upload of a document and will update
the CSAF structure in the file system accordingly.
## Provider options

View file

@ -28,6 +28,9 @@ Help Options:
-h, --help Show this help message
```
E.g. creating the initial directories and files.
This must only be done once, as subsequent `create` calls to the
[csaf_provider](../docs/csaf_provider.md)
may not lead to the desired result.
```bash
./csaf_uploader -a create -u https://localhost/cgi-bin/csaf_provider.go