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

index page gives 500 problem with controller.xql #2

Open
duncdrum opened this issue Feb 11, 2021 · 2 comments
Open

index page gives 500 problem with controller.xql #2

duncdrum opened this issue Feb 11, 2021 · 2 comments

Comments

@duncdrum
Copy link

gulp reports successful deploy, package is not shown in package manager but has been copied into apps in the db.

trying to open index.html in browser gives this.


URI: | /exist/apps/myapp/pages/index.html
-- | --
500
javax.servlet.ServletException: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/myapp/pages/index.html: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.
XQueryURLRewrite
javax.servlet.ServletException: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/myapp/pages/index.html: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.
javax.servlet.ServletException: An error occurred while processing request to /exist/apps/myapp/pages/index.html: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.
org.exist.security.PermissionDeniedException: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.

javax.servlet.ServletException: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/myapp/pages/index.html: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/myapp/pages/index.html: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:369)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
	... 18 more
Caused by: org.exist.security.PermissionDeniedException: Subject 'guest' does not have '--------x' access to resource '/db/apps/myapp/controller.xql'.
	at org.exist.source.DBSource.validate(DBSource.java:170)
	at org.exist.storage.XQueryPool.borrowCompiledXQuery(XQueryPool.java:203)
	at org.exist.http.urlrewrite.XQueryURLRewrite.runQuery(XQueryURLRewrite.java:653)
	at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:242)
	... 41 more

exist-db: 5.3.0-SNAPSHOT (docker:latest)

@line-o
Copy link
Owner

line-o commented Oct 4, 2021

I assume this is because the wrong user "guest" was configured to perform the tasks in existdb. With the current setup (44c4c34 or after) this should not happen anymore.

@line-o
Copy link
Owner

line-o commented Oct 8, 2021

@duncdrum could you check if this is still an issue? I could not and cannot reproduce it.

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

No branches or pull requests

2 participants