mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 12:36:40 +00:00
Clean up docs and refactor createhandler
**What** - Add a description for the secret key to the api swagger spec. - Remove optional examples from the secret management guide. - Update the ApiKeyProtected README to point at the new guide. - Refactor the `makeSpec` function to accept the already assembled secrets array because this should be easier to unit test. Signed-off-by: Lucas Roesler <lucas.roesler@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
5dce1deb21
commit
35f0e9e657
@ -1,6 +1,6 @@
|
||||
### Api-Key-Protected sample
|
||||
|
||||
To use this sample provide a secret for the container/service in `secret_api_key` using [Docker Swarm Secret](https://docs.docker.com/engine/swarm/secrets/#defining-and-using-secrets-in-compose-files).
|
||||
See the [secure secret management guide](../guide/secure_secret_management.md) for instructions on how to use this function.
|
||||
|
||||
Then when calling via the gateway pass the additional header "X-Api-Key", if it matches the `secret_api_key` value then the function will give access, otherwise access denied.
|
||||
When calling via the gateway pass the additional header "X-Api-Key", if it matches the `secret_api_key` value then the function will give access, otherwise access denied.
|
||||
|
||||
|
Reference in New Issue
Block a user