Skip to content

Conversation

@konradoboza
Copy link
Contributor

@konradoboza konradoboza commented Jul 1, 2024

🎫 Issue IBX-8482

Related PRs:

Description:

I made an oversight assuming one matcher in the reworked JWT authorization is enough for REST API calls recognition... Generating token is one thing needed to have access to the system. Due to stateless character of the calls we need to have a way to extract the token from Authorization Bearer header and make sure that user is the one it pretends to be.

To properly identify incoming requests we need to have a separate request matcher which kicks in only when generating token is requested. The previous AuthorizationHeaderRESTRequestMatcher is slightly adjusted to be triggered only when token is part of the request (which is basically the scenario when we try to do things using JWT basically).

Apart from that, I got rid of setting current user reference as this is obsolete after introducing https://github.com/ibexa/core/pull/375/files#diff-0dd9db794c39fefaeb57b5ded4ef4abc15abdf43770f3debf769a3b0eeeb8f65.

For QA:

Documentation:

Another changes to the recipes and their origins need to be taken into account.

Copy link
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA-wise all good.

@webhdx webhdx requested a review from a team July 2, 2024 09:23
@konradoboza konradoboza requested review from Steveb-p and removed request for a team July 2, 2024 09:23
@konradoboza konradoboza force-pushed the ibx-8482-fixed-post-requests-with-jwt branch from 9771439 to c9ffbd4 Compare July 2, 2024 12:03
Copy link
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Memento dependencies.json 😉 .

@konradoboza konradoboza changed the title [REMOVE TMP DEPENDENCY] IBX-8482: Fixed lack of JWT stateless calls recognition IBX-8482: Fixed lack of JWT stateless calls recognition Jul 2, 2024
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 2, 2024

@konradoboza konradoboza merged commit ddbe28c into main Jul 2, 2024
@konradoboza konradoboza deleted the ibx-8482-fixed-post-requests-with-jwt branch July 2, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working QA approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants