Skip to content

Token propagation is not working when the openapi endpoint contains a base pathΒ #1235

@wmedvede

Description

@wmedvede

Tell us the extension you're using

Client

I tried this:

When we have an OpenAPI document like this:

openapi: 3.0.3
  servers:
    - url: http://development.gigantic-server.com/my-api/v1
      description: Development server

     ...

paths:
  /some-operation:
    post:
      operationId: SomeOperation

...

According with the OpenAPI standard, the endpoint for accessing the operations is http://development.gigantic-server.com/my-api/v1.
Observe that we have a base path /my-api/v1

And thus, a potential configuration to use that document, must use a quarkus client configuration like this:

quarkus.rest-client.my_openapi_document_yaml.url=https://development.gigantic-server.com/my-api/v1

This happened:

Problem
The token propagation only works when we have endpoints with no base paths, e,g., http://development.gigantic-server.com

In situations like the introduced above, when the endpoint has a base path, while the invocation works, the token propagation is basically not being produced.

I expected this:

We would expect that the token propagation works with all type of endpoints, i.e., with or without base path.

Is there a workaround?

Following the example above, users has found as workaround to manually modify the OpenAPI document and append the base path like this:

paths:
  /my-api/v1/some-operation:
    post:
      operationId: SomeOperation

...

And finally configure the quarkus client like this: http://development.gigantic-server.com

While it works, it's far from ideal since it requires modifying the OpenAPI document.

How can we try to reproduce the issue?

No response

Anything else?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus OpenApi version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Community Notes

  • Please vote by adding a πŸ‘ reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞

Metadata

Metadata

Assignees

Labels

area:clientThis item is related to the client extensionpinnedIssues and PRs that must not stale

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions