Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set correct max cost for oauth2 introspection authn handler #1176

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
4 changes: 2 additions & 2 deletions .schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@
},
"max_cost": {
"type": "integer",
"default": 1000,
"default": 100000000,
"title": "Max Cost",
"description": "Max number of tokens to cache."
"description": "Max cost to cache."
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion driver/configuration/provider_koanf_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestPipelineConfig(t *testing.T) {
p := setup(t)

require.NoError(t, p.PipelineConfig("authenticators", "oauth2_introspection", nil, &res))
assert.JSONEq(t, `{"cache":{"enabled":false, "max_cost":1000},"introspection_url":"https://override/path","preserve_host":false,"pre_authorization":{"client_id":"some_id","client_secret":"some_secret","enabled":true,"audience":"some_audience","scope":["foo","bar"],"token_url":"https://my-website.com/oauth2/token"},"retry":{"max_delay":"100ms", "give_up_after":"1s"},"scope_strategy":"exact"}`, string(res), "%s", res)
assert.JSONEq(t, `{"cache":{"enabled":false, "max_cost":100000000},"introspection_url":"https://override/path","preserve_host":false,"pre_authorization":{"client_id":"some_id","client_secret":"some_secret","enabled":true,"audience":"some_audience","scope":["foo","bar"],"token_url":"https://my-website.com/oauth2/token"},"retry":{"max_delay":"100ms", "give_up_after":"1s"},"scope_strategy":"exact"}`, string(res), "%s", res)
})

t.Run("case=should setup", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions spec/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -904,9 +904,9 @@
},
"max_cost": {
"type": "integer",
"default": 1000,
"default": 100000000,
"title": "Max Cost",
"description": "Max number of tokens to cache."
"description": "Max cost to cache."
}
}
}
Expand Down
Loading