[
https://issues.apache.org/jira/browse/CAMEL-27123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149771#comment-18149771
]
Guillaume Nodet commented on CAMEL-27123:
-----------------------------------------
This sub-task is being investigated by a coding agent (on behalf of gnodet).
Triage analysis: The feature is not yet implemented in main. No traces of
required-acr, max-auth-age-seconds, INSUFFICIENT_USER_AUTHENTICATION, or
insufficient_user_authentication exist anywhere in the codebase. The
implementation is well-scoped for a single PR:
* Add INSUFFICIENT_USER_AUTHENTICATION to OAuthTokenValidationResult.ErrorCode
(backward-compatible enum addition)
* Add requiredAcr and maxAuthAgeSeconds fields to OAuthTokenValidationConfig
with property binding in OAuthTokenValidationConfigResolver
* Add acr/auth_time claim validation in JwtTokenValidator and
DefaultOAuthTokenValidationFactory
* Add RFC 9470 WWW-Authenticate: Bearer
error="insufficient_user_authentication" response in OAuthHttpSecuritySupport
* Tests in JwtTokenValidatorTest and OAuthHttpSecuritySupportTest
No new SPI interfaces required -- this extends existing SPI classes with new
fields/enum values following the standard Camel extensibility pattern.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> camel-oauth - step-up authentication (RFC 9470): required-acr and
> max-auth-age-seconds on validation profiles
> -------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27123
> URL: https://issues.apache.org/jira/browse/CAMEL-27123
> Project: Camel
> Issue Type: Sub-task
> Components: camel-oauth, camel-platform-http
> Reporter: Federico Mariani
> Assignee: Guillaume Nodet
> Priority: Major
> Labels: oauth, security
>
> Support step-up authentication (RFC 9470) in camel-oauth validation profiles,
> used by the HTTP consumers ({{platform-http}}, servlet, ...) and the MCP
> server:
> * {{required-acr}}: accepted values of the {{acr}} claim;
> * {{max-auth-age-seconds}}: maximum age of the user authentication
> ({{auth_time}} claim).
> A valid token that does not meet them is rejected with a new
> {{OAuthTokenValidationResult.ErrorCode.INSUFFICIENT_USER_AUTHENTICATION}},
> and the consumer answers
> {noformat}
> HTTP/1.1 401
> WWW-Authenticate: Bearer error="insufficient_user_authentication",
> error_description="...", acr_values="2", max_age=300
> {noformat}
> so that the client can ask the user to authenticate again, for example with
> MFA, instead of getting a generic {{invalid_token}}.
> {noformat}
> camel.oauth.users-mfa.base-uri = https://idp.example.com/realms/demo
> camel.oauth.users-mfa.expected-audience = conference-api
> camel.oauth.users-mfa.required-acr = 2
> {noformat}
> Not in scope: a per-tool requirement at the MCP HTTP layer (the MCP server
> validates the token for the whole endpoint before the tool is known).
> _Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)