Skip to content

Commit 0aa14ab

Browse files
committed
chore: Removed unused api_ fields.
1 parent bdfedd9 commit 0aa14ab

File tree

4 files changed

+3
-42
lines changed

4 files changed

+3
-42
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Removed
1717

18+
- Removed unused `api_` fields.
19+
1820
### Deprecated
1921

2022
### Security

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ Below is the example configuration one might use in `declarative_config`:
5656
keepalive: 60000
5757
store_id: "your_store_id"
5858
model_id: "your_model_id"
59-
api_token: "your_api_token"
60-
api_token_issuer: "your_api_token_issuer"
61-
api_audience: "your_api_audience"
62-
api_client_id: "your_api_client_id"
63-
api_client_secret: "your_api_client_secret"
64-
api_token_cache: 600
6559
tuple:
6660
user: "user_id"
6761
relation: "relation"
@@ -86,12 +80,6 @@ Below is the example configuration one might use in `declarative_config`:
8680
| `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. |
8781
| `store_id`<br/>_required_<br/><br/>**Type:** string | - | The store ID in OpenFGA |
8882
| `model_id`<br/>_optional_<br/><br/>**Type:** string | - | Optional model ID (version). Latest is used if this is empty |
89-
| `api_token`<br/>_optional_<br/><br/>**Type:** string | - | Optional API token |
90-
| `api_token_issuer`<br/>_optional_<br/><br/>**Type:** string | - | API token issuer |
91-
| `api_audience`<br/>_optional_<br/><br/>**Type:** string | - | API audience |
92-
| `api_client_id`<br/>_optional_<br/><br/>**Type:** string | - | API client ID |
93-
| `api_client_secret`<br/>_optional_<br/><br/>**Type:** string | - | API client secret |
94-
| `api_token_cache`<br/>_optional_<br/><br/>**Type:** number | 600 | API token cache duration in seconds |
9583
| `tuple`<br/>_required_<br/><br/>**Type:** record | - | Tuple key for authorization |
9684
| `contextual_tuples`<br/>_optional_<br/><br/>**Type:** set | {} | Set of contextual tuples for authorization |
9785

kong/plugins/kong-authz-openfga/schema.lua

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ local tuple_key = {
5050
---@field failed_attempts_backoff_timeout integer
5151
---@field store_id string
5252
---@field model_id string
53-
---@field api_token string
54-
---@field api_token_issuer string
55-
---@field api_audience string
56-
---@field api_client_id string
57-
---@field api_client_secret string
58-
---@field api_token_cache number
5953
---@field tuple TupleKey
6054
---@field contextual_tuples TupleKey[]
6155
return {
@@ -83,19 +77,7 @@ return {
8377
type = "string",
8478
},
8579
},
86-
{
87-
api_token = {
88-
description = "Optional API token",
89-
type = "string",
90-
referenceable = true,
91-
encrypted = true,
92-
},
93-
},
94-
{ api_token_issuer = { type = "string" } },
95-
{ api_audience = { type = "string" } },
96-
{ api_client_id = { type = "string", referenceable = true, encrypted = true } },
97-
{ api_client_secret = { type = "string", referenceable = true, encrypted = true } },
98-
{ api_token_cache = { type = "number", default = 600 } },
80+
9981
{
10082
tuple = tuple_key,
10183
},
@@ -107,16 +89,6 @@ return {
10789
},
10890
},
10991
},
110-
entity_checks = {
111-
{
112-
mutually_required = {
113-
"api_token_issuer",
114-
"api_audience",
115-
"api_client_id",
116-
"api_client_secret",
117-
},
118-
},
119-
},
12092
},
12193
},
12294
},

spec/kong-authz-openfga/01-schema_spec.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ describe(PLUGIN_NAME .. ": (#schema)", function()
5050
failed_attempts_backoff_timeout = 1000,
5151
store_id = "store_id",
5252
model_id = "model_id",
53-
api_token = "api_token",
5453
timeout = 1000,
5554
keepalive = 6000,
5655
tuple = {

0 commit comments

Comments
 (0)