3. Security and Validation

databaseApiKeyStore

JDBC database store for API keys and their associated scopes. Uses two tables:

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

Example configuration:

 <apiKey>
   <databaseApiKeyStore autoCreate="true">
     <keyTable name="api_keys"/>
     <scopeTable name="api_scopes"/>
   </databaseApiKeyStore>
 </apiKey>
 

Can be used in:

apiKey and bean

Attributes

NameRequiredDefaultDescriptionExample
datasource false - - -
autoCreate false true
Whether the required key/scope tables should be created automatically if they do not exist.
false

Child Elements

ElementsDescriptionCardinality
keyTable The table containing API keys. Each row must define a unique {@code apikey}. 0..1
scopeTable The table mapping API keys to scopes. Each row links one {@code apikey} to one {@code scope}. 0..1