Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Removed unused `api_` fields.

### Deprecated

### Security
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ Below is the example configuration one might use in `declarative_config`:
keepalive: 60000
store_id: "your_store_id"
model_id: "your_model_id"
api_token: "your_api_token"
api_token_issuer: "your_api_token_issuer"
api_audience: "your_api_audience"
api_client_id: "your_api_client_id"
api_client_secret: "your_api_client_secret"
api_token_cache: 600
tuple:
user: "user_id"
relation: "relation"
Expand All @@ -86,12 +80,6 @@ Below is the example configuration one might use in `declarative_config`:
| `keepalive`<br/>_optional_<br/><br/>**Type:** number | 60000 | The maximal idle timeout in milliseconds for the current connection. See [tcpsock:setkeepalive](https://github.com/openresty/lua-nginx-module#tcpsocksetkeepalive) for more details. |
| `store_id`<br/>_required_<br/><br/>**Type:** string | - | The store ID in OpenFGA |
| `model_id`<br/>_optional_<br/><br/>**Type:** string | - | Optional model ID (version). Latest is used if this is empty |
| `api_token`<br/>_optional_<br/><br/>**Type:** string | - | Optional API token |
| `api_token_issuer`<br/>_optional_<br/><br/>**Type:** string | - | API token issuer |
| `api_audience`<br/>_optional_<br/><br/>**Type:** string | - | API audience |
| `api_client_id`<br/>_optional_<br/><br/>**Type:** string | - | API client ID |
| `api_client_secret`<br/>_optional_<br/><br/>**Type:** string | - | API client secret |
| `api_token_cache`<br/>_optional_<br/><br/>**Type:** number | 600 | API token cache duration in seconds |
| `tuple`<br/>_required_<br/><br/>**Type:** record | - | Tuple key for authorization |
| `contextual_tuples`<br/>_optional_<br/><br/>**Type:** set | {} | Set of contextual tuples for authorization |

Expand Down
30 changes: 1 addition & 29 deletions kong/plugins/kong-authz-openfga/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ local tuple_key = {
---@field failed_attempts_backoff_timeout integer
---@field store_id string
---@field model_id string
---@field api_token string
---@field api_token_issuer string
---@field api_audience string
---@field api_client_id string
---@field api_client_secret string
---@field api_token_cache number
---@field tuple TupleKey
---@field contextual_tuples TupleKey[]
return {
Expand Down Expand Up @@ -83,19 +77,7 @@ return {
type = "string",
},
},
{
api_token = {
description = "Optional API token",
type = "string",
referenceable = true,
encrypted = true,
},
},
{ api_token_issuer = { type = "string" } },
{ api_audience = { type = "string" } },
{ api_client_id = { type = "string", referenceable = true, encrypted = true } },
{ api_client_secret = { type = "string", referenceable = true, encrypted = true } },
{ api_token_cache = { type = "number", default = 600 } },

{
tuple = tuple_key,
},
Expand All @@ -107,16 +89,6 @@ return {
},
},
},
entity_checks = {
{
mutually_required = {
"api_token_issuer",
"api_audience",
"api_client_id",
"api_client_secret",
},
},
},
},
},
},
Expand Down
1 change: 0 additions & 1 deletion spec/kong-authz-openfga/01-schema_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ describe(PLUGIN_NAME .. ": (#schema)", function()
failed_attempts_backoff_timeout = 1000,
store_id = "store_id",
model_id = "model_id",
api_token = "api_token",
timeout = 1000,
keepalive = 6000,
tuple = {
Expand Down