Skip to content

Commit

Permalink
fix: set correct max cost for oauth2 introspection authn handler
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Wobrock committed Aug 9, 2024
1 parent 6b5672b commit 3e7bd3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 3e7bd3b

Please sign in to comment.