diff --git a/CHANGELOG.md b/CHANGELOG.md
index e1abd67..dcccc37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/README.md b/README.md
index 9cc8dc7..75a47df 100644
--- a/README.md
+++ b/README.md
@@ -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"
@@ -86,12 +80,6 @@ Below is the example configuration one might use in `declarative_config`:
| `keepalive`
_optional_
**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`
_required_
**Type:** string | - | The store ID in OpenFGA |
| `model_id`
_optional_
**Type:** string | - | Optional model ID (version). Latest is used if this is empty |
-| `api_token`
_optional_
**Type:** string | - | Optional API token |
-| `api_token_issuer`
_optional_
**Type:** string | - | API token issuer |
-| `api_audience`
_optional_
**Type:** string | - | API audience |
-| `api_client_id`
_optional_
**Type:** string | - | API client ID |
-| `api_client_secret`
_optional_
**Type:** string | - | API client secret |
-| `api_token_cache`
_optional_
**Type:** number | 600 | API token cache duration in seconds |
| `tuple`
_required_
**Type:** record | - | Tuple key for authorization |
| `contextual_tuples`
_optional_
**Type:** set | {} | Set of contextual tuples for authorization |
diff --git a/kong/plugins/kong-authz-openfga/schema.lua b/kong/plugins/kong-authz-openfga/schema.lua
index e8a234e..de1a4ff 100644
--- a/kong/plugins/kong-authz-openfga/schema.lua
+++ b/kong/plugins/kong-authz-openfga/schema.lua
@@ -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 {
@@ -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,
},
@@ -107,16 +89,6 @@ return {
},
},
},
- entity_checks = {
- {
- mutually_required = {
- "api_token_issuer",
- "api_audience",
- "api_client_id",
- "api_client_secret",
- },
- },
- },
},
},
},
diff --git a/spec/kong-authz-openfga/01-schema_spec.lua b/spec/kong-authz-openfga/01-schema_spec.lua
index 1086289..0ce4565 100644
--- a/spec/kong-authz-openfga/01-schema_spec.lua
+++ b/spec/kong-authz-openfga/01-schema_spec.lua
@@ -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 = {