mirror of https://github.com/apache/druid.git
Unauthorized sql request should return 403 (#6279)
This commit is contained in:
parent
d0fb83760e
commit
743547fc3b
|
@ -29,6 +29,7 @@ import org.apache.druid.java.util.common.guava.Yielder;
|
|||
import org.apache.druid.java.util.common.guava.Yielders;
|
||||
import org.apache.druid.java.util.common.logger.Logger;
|
||||
import org.apache.druid.query.QueryInterruptedException;
|
||||
import org.apache.druid.server.security.ForbiddenException;
|
||||
import org.apache.druid.sql.calcite.planner.Calcites;
|
||||
import org.apache.druid.sql.calcite.planner.DruidPlanner;
|
||||
import org.apache.druid.sql.calcite.planner.PlannerFactory;
|
||||
|
@ -160,6 +161,9 @@ public class SqlResource
|
|||
throw Throwables.propagate(e);
|
||||
}
|
||||
}
|
||||
catch (ForbiddenException e) {
|
||||
throw e; // let ForbiddenExceptionMapper handle this
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.warn(e, "Failed to handle query: %s", sqlQuery);
|
||||
|
||||
|
|
Loading…
Reference in New Issue