Claus Ibsen created CAMEL-27954:
-----------------------------------

             Summary: camel-keycloak: executeActionsEmail sends the redirect 
URI as client_id, introspection options unused
                 Key: CAMEL-27954
                 URL: https://issues.apache.org/jira/browse/CAMEL-27954
             Project: Camel
          Issue Type: Bug
          Components: camel-keycloak
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Found while improving the option descriptions of camel-keycloak for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31196).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. executeActionsEmail sends the wrong values
{{KeycloakProducer.executeActionsEmail}} calls executeActionsEmail(redirectUri, 
lifespan.toString(), actions), which matches the (String clientId, String 
redirectUri, List actions) overload of keycloak-admin-client 26.0.13. The 
redirect URI goes out as client_id and the lifespan as redirect_uri; the 
lifespan is never sent. With only the redirect URI or only the lifespan set, 
that value is dropped.
Proposed change: use executeActionsEmail(clientId, redirectUri, lifespan, 
actions), and executeActionsEmail(actions, lifespan) when there is no redirect 
URI (a redirect URI needs a client_id).

h4. 2. useTokenIntrospection, introspectionCacheEnabled and 
introspectionCacheTtl are not used by the endpoint
{{KeycloakProducer.introspectToken}} always creates 
KeycloakTokenIntrospector(..., false, 0); the three endpoint options are never 
read (only KeycloakSecurityPolicy has its own). The descriptions now say so.
Proposed change: deprecate the three endpoint options, or wire the cache 
options into introspectToken.

h4. 3. Usernames without a match are skipped silently
{{KeycloakProducer}} bulkDeleteUsers and bulkAssignRoleToUsers skip a name in 
CamelKeycloakUsernames that has no exact match: it gets no result entry and is 
not counted in total or failed.
Proposed change: add a not_found result entry.

h4. 4. Smaller issues
KeycloakConsumer applies the first offset to every poll; Keycloak returns the 
newest events first, so first>0 leaves out the newest events of each poll. 
authRealm declares defaultValue "master" while the field is null and falls back 
to the realm option. keycloak-consumer.adoc says dateFrom and dateTo are 
milliseconds since the epoch; Keycloak 26.0 accepts only yyyy-MM-dd. 
keycloak-producer.adoc lists the redirect URI and lifespan headers as optional 
for executeActionsEmail (see item 1). Every option is in the common group, so 
the consumer and producer options carry no consumer or producer label.


_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to