Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16606

rest dsl - Allow specifying security requirement(s) applicable to entire API

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.9.0
    • 3.10.0
    • camel-core, rest
    • None
    • Novice

    Description

      In the Camel REST DSL one can specify security requirements per endpoint. But there isn't a way to specify security requirement(s) applicable to all endpoints. In the OpenAPI 3 schema this corresponds to a security section at the root level. 

      Perhaps this can be done by just using the existing

      RestDefinition.security(String name [, String scopes])

      but allow it to be called without a verb, in which case it would apply to the entire API.

      In generated OpenAPI 3 JSON schema this would produce a root level node such as: "security": [ {"api_key": []}] or "security":  [{"oauth2_auth": [ "read", "write" ]}]

      Currently if you do, for example, rest().security(scheme), you get an IllegalArgumentException that one "Must add verb first, ..."

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            maqroll Shankar Ramamoorthy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment