DocsEdge StackUsing The API Keys Filter
Using The API Keys Filter
The APIKey Filter
validates API Keys present in HTTP headers. The list of authorized API Keys is defined directly in a Secret.
If an incoming request does not have the header specified by the APIKey Filter
or it does not contain one of the key values
configured by the Filter
then the request is denied.
See the API Key Filter API reference for an overview of all the supported fields.
APIKey Filter Quickstart
Come up with an API Key value to use. For this example, we're going to use the string
example-apikey-value
Convert the API Key value to base64.
You can do this however you prefer, such as with an online tool like base64encode.org or with the terminal:
Create an APIKey Filter with the encoded API Key from above:
Create a FilterPolicy resource to use the
Filter
created aboveSend a request with the APIKey header
Send a request with the APIKey header and value.