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
| Name | Required | Default | Description | Examples |
|---|
| $ref | false | - | Reference a component defined under components. | - |
| autoCreate | false | true | Whether the required key/scope tables should be created automatically if they do not exist. | false |
| datasource | false | - | - | - |
Child Structure
| Element | Cardinality | Description |
|---|
| keyTable | 0..1 | The table containing API keys. Each row must define a unique apikey. |
| scopeTable | 0..1 | The table mapping API keys to scopes. Each row links one apikey to one scope. |
Can be used in