Skip to content

Instantly share code, notes, and snippets.

@jschmid1
Last active November 11, 2022 10:18
Show Gist options
  • Select an option

  • Save jschmid1/03903d4a02412d0ee9bcb519170a2789 to your computer and use it in GitHub Desktop.

Select an option

Save jschmid1/03903d4a02412d0ee9bcb519170a2789 to your computer and use it in GitHub Desktop.
return {
name = "keys",
dao = "kong.db.dao.keys",
primary_key = { "id" },
cache_key = { "kid", "set" },
endpoint_key = "name",
workspaceable = true,
ttl = true,
fields = {
{
id = typedefs.uuid,
},
{
set = {
type = "foreign",
required = false,
reference = "key_sets",
on_delete = "cascade",
},
},
{
name = {
type = "string",
required = false,
unique = true,
},
},
{
kid = {
type = "string",
required = true,
unique = true,
},
},
{
jwk = typedefs.jwk
},
{
pem = typedefs.pem
},
{
tags = typedefs.tags,
},
{
created_at = typedefs.auto_timestamp_s,
},
{
updated_at = typedefs.auto_timestamp_s,
},
},
entity_checks = {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment