You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "markhoerth (via GitHub)" <gi...@apache.org> on 2026/08/30 21:01:52 UTC
[I] [BUG] View operations are not covered by the authorization interceptor [gravitino]
markhoerth opened a new issue, #12729:
URL: https://github.com/apache/gravitino/issues/12729
`ViewOperations` is not covered by the authorization interception service, so view operations are not privilege-checked the way every other metadata family is.
Compare the two responses on a server with authorization enabled, both against a metalake that does not exist, both unauthenticated.
Tags, rejected before the handler runs:
```
curl -s 'http://<server>:8090/api/metalakes/zz/objects/table/a.b.c/tags'
```
```
{"code":1008,"type":"ForbiddenException",
"message":"Current user anonymous doesn't exist in the metalake zz, ...",
"stack":["... at org.apache.gravitino.authorization.AuthorizationUtils.checkCurrentUser(AuthorizationUtils.java:131)",
"... at org.apache.gravitino.server.web.filter.GravitinoInterceptionService$MetadataAuthorizationMethodInterceptor.invoke(GravitinoInterceptionService.java:168)"]}
```
Views, reaching the handler and performing the lookup:
```
curl -s 'http://<server>:8090/api/metalakes/zz/catalogs/c/schemas/s/views'
```
```
{"code":1003,"type":"NoSuchCatalogException",
"message":"Failed to operate view(s) operation [LIST] under schema [s], reason [Catalog zz.c does not exist]",
"stack":["... at org.apache.gravitino.catalog.ViewNormalizeDispatcher.listViews(ViewNormalizeDispatcher.java:53)",
"... at org.apache.gravitino.listener.ViewEventDispatcher.listViews(ViewEventDispatcher.java:76)",
"... at org.apache.gravitino.server.web.rest.ViewOperations.lambda$listViews$0(ViewOperations.java:81)",
"... at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)"]}
```
The views stack passes from Jersey's `ResourceMethodInvoker` directly into `ViewOperations.listViews`. `GravitinoInterceptionService$MetadataAuthorizationMethodInterceptor` does not appear in it, and `AuthorizationUtils.checkCurrentUser` is never called. The authorization check the tags, policies, statistics, credentials, owners, catalogs, schemas, tables, topics, filesets, models, users, groups, roles and jobs endpoints all enforce is absent for views.
Required: view operations are covered by the same authorization interception as every other metadata object type, and a caller without privilege on the view's parent is rejected before any catalog lookup takes place.
Separately observed on the same endpoint: `POST /metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/views` with no request body returns HTTP 500 with an entirely empty response body. A request with a missing or unparseable body is a client error and must return 400 with an error code, and no error path should return an empty body.
Found by a REST contract sweep over all 130 `/metalakes` endpoints on build 1.3.0-SNAPSHOT, commit 6d9d432df18a9bd124c162ea50a296f436549980.
Required: fixed upstream in apache/gravitino and present in the enterprise tree before RC2 on September 4.
--
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: commits-unsubscribe@gravitino.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] View operations are not covered by the authorization interceptor [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao closed issue #12729: [BUG] View operations are not covered by the authorization interceptor
URL: https://github.com/apache/gravitino/issues/12729
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] View operations are not covered by the authorization interceptor [gravitino]
Posted by "markhoerth (via GitHub)" <gi...@apache.org>.
markhoerth commented on issue #12729:
URL: https://github.com/apache/gravitino/issues/12729#issuecomment-5471534881
Reproduced on a deployed Enterprise install with `gravitino.authorization.enable = true` and the OAuth authenticator.
Both calls below are made by the same authenticated user (`mark`, OIDC password grant, `preferred_username` principal), against the same metalake, with no privileges granted.
Metadata object tags, an intercepted class:
```
GET /api/metalakes/authzproof/objects/table/c1.s1.t1/tags
{"code":1008,"type":"ForbiddenException",
"message":"Current user mark doesn't exist in the metalake authzproof, you should add the user to the metalake first"}
```
Views, an unintercepted class:
```
GET /api/metalakes/authzproof/catalogs/c1/schemas/s1/views
{"code":1003,"type":"NoSuchCatalogException",
"message":"Failed to operate view(s) operation [LIST] under schema [s1], reason [Catalog authzproof.c1 does not exist]"}
```
The tags request is refused by `MetadataAuthorizationMethodInterceptor` before any lookup. The views request passes the authorization stage entirely and executes the catalog lookup, returning a result that depends on the state of a metalake the caller has no rights in.
This is the runtime confirmation on Enterprise. `ViewOperations` is absent from the class allowlist in `GravitinoInterceptionService.getDescriptorFilter()`, and the behaviour above is the consequence.
Scope note: this demonstrates that view operations are not privilege-checked. It does not by itself demonstrate the disclosure of view contents, which would require a populated metalake the caller has no access to.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] View operations are not covered by the authorization interceptor [gravitino]
Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on issue #12729:
URL: https://github.com/apache/gravitino/issues/12729#issuecomment-5488822809
Scope update: the separately observed empty/null create-view request-body failure has been split into #12769 and is being addressed by #12770.
#12770 does not change authorization behavior or view privilege semantics. This issue remains the tracker for the missing `ViewOperations` authorization interception.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org