xiangfu0 commented on code in PR #20426:
URL: https://github.com/apache/pinot/pull/20426#discussion_r4795204719
##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/materializedview/MaterializedViewTaskExecutorFactory.java:
##########
@@ -45,12 +47,15 @@
public class MaterializedViewTaskExecutorFactory implements
PinotTaskExecutorFactory {
private MinionTaskZkMetadataManager _zkMetadataManager;
private MinionConf _minionConf;
+ private AuthProvider _publicationAuthProvider;
private volatile MaterializedViewQueryExecutor _queryExecutor;
@Override
public void init(MinionTaskZkMetadataManager zkMetadataManager, MinionConf
minionConf) {
_zkMetadataManager = zkMetadataManager;
_minionConf = minionConf;
+ _publicationAuthProvider =
AuthProviderUtils.extractAuthProvider(minionConf,
Review Comment:
When `task.materializedview.auth` isn't set, this resolves to a provider
without credentials, so the task publishes with no identity and only finds out
from the 403 on its first refresh. Could init fail fast, or at least log once,
with the key name?
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/access/AccessControl.java:
##########
@@ -68,6 +68,12 @@ default boolean hasAccess(AccessType accessType, HttpHeaders
httpHeaders, String
return hasAccess(null, accessType, httpHeaders, endpointUrl);
}
+ /// Returns whether the authenticated requester is explicitly trusted to
write the materialized view.
+ /// The caller must also enforce the ordinary permissions for the operation
on the destination table.
+ default boolean canWriteMaterializedView(HttpHeaders httpHeaders, String
tableNameWithType) {
+ return false;
Review Comment:
With `AllowAllAccessFactory`, and with any custom `AccessControl` that
doesn't override this method, the default `false` means nobody can publish to a
materialized view, the refresh task included, and no setting turns it on. Is
that intended for clusters that run without auth? If so the upgrade note should
say it. If not, `AllowAllAccessFactory` could return `true`, and the assertion
at `BasicAuthAccessControlFactoryTest` line 82 would flip.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]