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

Update the HTTP security layer #4555

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

stuartwdouglas
Copy link
Member

This introduces the idea of plugable policies.

/**
* If this is returned then the request is allowed, and no further permission checkers will be
* consulted.
* If this is returned then the request is allowed. All permission checkers must permit a request for it
Copy link
Member

Choose a reason for hiding this comment

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

+1. thanks Stuart :-)

@gsmet
Copy link
Member

gsmet commented Oct 15, 2019

The test failures look related:

2019-10-15 06:09:57,888 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-0) HTTP Request to /endp/echo failed, error id: cc2a4327-1b1d-41e0-a183-8fc74994de24-33: java.lang.IndexOutOfBoundsException: Index: 0
	at java.util.Collections$EmptyList.get(Collections.java:4456)
	at io.quarkus.vertx.http.runtime.security.HttpAuthorizer.doPermissionCheck(HttpAuthorizer.java:73)
	at io.quarkus.vertx.http.runtime.security.HttpAuthorizer.doPermissionCheck(HttpAuthorizer.java:63)
	at io.quarkus.vertx.http.runtime.security.HttpAuthorizer.checkPermission(HttpAuthorizer.java:42)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$2.handle(HttpSecurityRecorder.java:74)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$2.handle(HttpSecurityRecorder.java:66)
	at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:276)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:124)
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:130)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$1$1.apply(HttpSecurityRecorder.java:57)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$1$1.apply(HttpSecurityRecorder.java:34)
	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
	at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:834)
	at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2155)
	at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:110)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$1.handle(HttpSecurityRecorder.java:34)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$1.handle(HttpSecurityRecorder.java:23)
	at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:276)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:124)
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:130)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:79)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:39)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:83)
	at io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:74)

This introduces the idea of plugable policies.
@stuartwdouglas
Copy link
Member Author

Tests pass now, this should really go into the release

@sberyozkin sberyozkin merged commit e054a8c into quarkusio:master Oct 15, 2019
@cescoffier cescoffier added this to the 0.25.0 milestone Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants