Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@AuthorizationPolicy is not compatoble with kotlin suspend functions #44568

Open
mschirmacher opened this issue Nov 19, 2024 · 5 comments
Open
Assignees
Labels

Comments

@mschirmacher
Copy link

Describe the bug

The new annotation @AuthorizationPolicy does not work combined with kotlin suspend functions. Event worse: the error message makes it hard to debug.

Expected behavior

It simply works: REST calls to suspend functions are handled and the authorization policies are applied/

Actual behavior

REST calls run into a next to useless error:
[error]: Build step io.quarkus.vertx.http.deployment.HttpSecurityProcessor#gatherAuthorizationPolicyInstances threw an exception: java.lang.IllegalArgumentException: Not a class

How to Reproduce?

check out this example code: https://github.com/mschirmacher/QuarkusAuthorizationPolicySuspendBug
The gradle build demonstrates the error

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

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

No response

Additional information

No response

@mschirmacher mschirmacher added the kind/bug Something isn't working label Nov 19, 2024
Copy link

quarkus-bot bot commented Nov 19, 2024

/cc @geoand (kotlin)

@michalvavrik
Copy link
Member

thanks @mschirmacher , I'll have a look this week.

@geoand
Copy link
Contributor

geoand commented Nov 21, 2024

@michalvavrik do you need me to look into any Kotlin stuff for this?

@michalvavrik
Copy link
Member

@michalvavrik do you need me to look into any Kotlin stuff for this?

I'll let you know before Monday. I plan to look by the end of the week. Thanks

@geoand
Copy link
Contributor

geoand commented Nov 21, 2024

🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants