FANNG1 opened a new issue, #7753:
URL: https://github.com/apache/gravitino/issues/7753
### What would you like to be improved?
1. If auth failed, we'd better add `user`, `operation` `metadata object` to
the error message, the stack are heavy seems useless.
2. If system internal errors, we should log it and tell the user the auth
failed for system internal error.
```
org.apache.iceberg.exceptions.ForbiddenException: Forbidden:
{"code":1008,"type":"ForbiddenException","message":"Can not access metadata
{abc}.","stack":["org.apache.gravitino.exceptions.ForbiddenException: Can not
access metadata {test_metalake.iceberg.schema.abc}.","\tat
org.apache.gravitino.server.web.filter.BaseMetadataAuthorizationMethodInterceptor.buildNoAuthResponse(BaseMetadataAuthorizationMethodInterceptor.java:92)","\tat
org.apache.gravitino.server.web.filter.BaseMetadataAuthorizationMethodInterceptor.invoke(BaseMetadataAuthorizationMethodInterceptor.java:76)","\tat
org.jvnet.hk2.internal.MethodInterceptorHandler.invoke(MethodInterceptorHandler.java:97)","\tat
org.apache.gravitino.iceberg.service.rest.IcebergTableOperations_$$_jvst726_0.createTable(IcebergTableOperations_$$_jvst726_0.java)","\tat
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)","\tat
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)","\tat
sun.reflect.DelegatingMet
hodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","\tat
java.lang.reflect.Method.invoke(Method.java:498)","\tat
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)","\tat
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)","\tat
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)","\tat
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)","\tat
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)","\tat
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)","\tat
org.glassfish.jersey.server.mod
el.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)","\tat
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)","\tat
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)","\tat
org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)","\tat
org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)","\tat
org.glassfish.jersey.internal.Errors.process(Errors.java:292)","\tat
org.glassfish.jersey.internal.Errors.process(Errors.java:274)","\tat
org.glassfish.jersey.internal.Errors.process(Errors.java:244)","\tat
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)","\tat
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)","\tat
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)","\tat
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)","\tat
org.glassfish.jersey.servlet.WebComponent.service(WebCompo
nent.java:346)","\tat
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)","\tat
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)","\tat
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)","\tat
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)","\tat
org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)","\tat
org.apache.gravitino.server.authentication.AuthenticationFilter.lambda$doFilter$0(AuthenticationFilter.java:89)","\tat
java.security.AccessController.doPrivileged(Native Method)","\tat
javax.security.auth.Subject.doAs(Subject.java:422)","\tat
org.apache.gravitino.utils.PrincipalUtils.doAs(PrincipalUtils.java:39)","\tat
org.apache.gravitino.server.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:86)","\tat
org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)","\tat
org.eclipse.jetty.servlet.Servle
tHandler$Chain.doFilter(ServletHandler.java:1626)","\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)","\tat
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)","\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)","\tat
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)","\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)","\tat
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)","\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)","\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)","\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)","\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)","\tat
org.eclipse.jetty.server.Server.handle(Server.java:516)","\tat org.e
clipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)","\tat
org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)","\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)","\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)","\tat
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)","\tat
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)","\tat
org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)","\tat
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)","\tat
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)","\tat
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)","\tat
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)","\tat
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThr
ead.run(ReservedThreadExecutor.java:409)","\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)","\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)","\tat
java.lang.Thread.run(Thread.java:748)"]}
```
### How should we improve?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]