[ 
https://issues.apache.org/jira/browse/CAMEL-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151684#comment-18151684
 ] 

Claus Ibsen commented on CAMEL-21744:
-------------------------------------

This is already supported. Calling `security(key, scopes)` on `rest()` before 
any verb sets the root-level security
requirements (CAMEL-16606), and `RestOpenApiReader` writes them as the 
top-level `security` array. Operations can
override them with their own `security(...)`. 
`RestOpenApiModelApiSecurityRequirementsTest` covers this for
OpenAPI 3.0 and 3.1.

_Claude Code on behalf of davsclaus_

> camel-openapi-java - Make security configurable
> -----------------------------------------------
>
>                 Key: CAMEL-21744
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21744
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-openapi-java
>            Reporter: Federico Mariani
>            Priority: Major
>
> https://swagger.io/specification/#fixed-fields
> From the spec, the _security_ field is a declaration of which security 
> mechanisms can be used across the API. The list of values includes 
> alternative Security Requirement Objects that can be used. Only one of the 
> Security Requirement Objects need to be satisfied to authorize a request. 
> Individual operations can override this definition. The list can be 
> incomplete, up to being empty or absent. To make security explicitly 
> optional, an empty security requirement ({}) can be included in the array.
> This integration may be harder to implement, and most probably runtimes 
> should provide custom implementations.



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

Reply via email to