3. Security and Validation

databaseApiKeyStore

Version

JDBC database store for API keys and their associated scopes. Uses two tables:
  • Key table: contains API keys (one per row).
  • Scope table: maps keys to one or more scopes.

By default, the store will attempt to create the required tables at startup if they do not exist (controlled by autoCreate).

apiKey:
stores:
- databaseApiKeyStore:
datasource: datasource
autoCreate: true
keyTable: api_keys
scopeTable: api_scopes
apiKey:
   stores:
     - databaseApiKeyStore:
         datasource: datasource
         autoCreate: true
         keyTable: api_keys
         scopeTable: api_scopes

Syntax

databaseApiKeyStore:
'$ref': <string>
autoCreate: <boolean>
datasource: <string>
keyTable: <string>
scopeTable: <string>
databaseApiKeyStore:
  '$ref': <string>
  autoCreate: <boolean>
  datasource: <string>
  keyTable: <string>
  scopeTable: <string>

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
autoCreatefalsetrueWhether the required key/scope tables should be created automatically if they do not exist.false
datasourcefalse---

Child Structure

ElementCardinalityDescription
keyTable0..1The table containing API keys. Each row must define a unique apikey.
scopeTable0..1The table mapping API keys to scopes. Each row links one apikey to one scope.

Can be used in