Skip to content

Commit 26dec4f

Browse files
committed
better docs, small fixes
1 parent 915d9bb commit 26dec4f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

docs/en/operations/external-authenticators/tokens.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,20 @@ Different providers have different sets of parameters.
4141

4242
**Parameters**
4343

44-
- `provider` -- name of identity provider. Mandatory, case-insensitive. Supported options: "Google", "Azure".
44+
- `provider` -- name of identity provider. Mandatory, case-insensitive. Supported options: "Google", "Azure", "OpenID".
4545
- `cache_lifetime` -- maximum lifetime of cached token (in seconds). Optional, default: 3600.
4646
- `email_filter` -- Regex for validation of user emails. Optional parameter, only for Google IdP.
47-
- `client_id` -- Azure AD (Entra ID) client ID. Optional parameter, only for Azure IdP.
48-
- `tenant_id` -- Azure AD (Entra ID) tenant ID. Optional parameter, only for Azure IdP.
47+
- `client_id` -- Azure AD (Entra ID) client ID. Optional parameter, used only for Azure IdP.
48+
- `tenant_id` -- Azure AD (Entra ID) tenant ID. Optional parameter, used only for Azure IdP.
49+
- `groups_claim_name` -- Name of claim (field) that contains list of groups user belongs to. This claim will be looked up in the token itself (in case token is a valid JWT, e.g. in Keycloak) or in response from `/userinfo`. Optional parameter.
50+
- `configuration_endpoint` -- URI of `.well-known/openid-configuration`. Optional parameter, useful only for OIDC-compliant providers (e.g. Keycloak).
51+
- `userinfo_endpoint` -- URI of userinfo endpoint. Optional parameter.
52+
- `token_introspection_endpoint` -- URI of token introspection endpoint. Optional parameter.
53+
54+
:::note
55+
Either `configuration_endpoint` or both `userinfo_endpoint` and `token_introspection_endpoint` shall be set. If none of them are set or all three are set, this is invalid configuration, it will not be parsed.
56+
:::
57+
4958

5059
### Tokens cache
5160
To reduce number of requests to IdP, tokens are cached internally for no longer then `cache_lifetime` seconds.

src/Access/AccessTokenProcessor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ std::unique_ptr<IAccessTokenProcessor> IAccessTokenProcessor::parseTokenProcesso
9292
const String & prefix,
9393
const String & name)
9494
{
95+
/// TODO: maybe bind external user to the processor it was created with?
9596
if (config.hasProperty(prefix + ".provider"))
9697
{
9798
String provider = Poco::toLower(config.getString(prefix + ".provider"));
@@ -143,7 +144,7 @@ std::unique_ptr<IAccessTokenProcessor> IAccessTokenProcessor::parseTokenProcesso
143144
config.getString(prefix + ".userinfo_endpoint"),
144145
config.getString(prefix + ".token_introspection_endpoint"),
145146
config.getString(prefix + ".jwks_uri"),
146-
config.getString(prefix + ".groups_claim_name"));
147+
config.getString(prefix + ".groups_claim_name", ""));
147148
}
148149

149150
throw Exception(ErrorCodes::INVALID_CONFIG_PARAMETER, "Could not parse access token processor {}: "

0 commit comments

Comments
 (0)