Add missing sources grants for Kafka, NATS and RabbitMQ.

This commit is contained in:
Christoph Wurm 2024-10-30 10:53:54 +00:00
parent eb42cddde4
commit 486f4512d1
5 changed files with 22 additions and 3 deletions

View File

@ -237,6 +237,9 @@ enum class AccessType : uint8_t
M(S3, "", GLOBAL, SOURCES) \
M(HIVE, "", GLOBAL, SOURCES) \
M(AZURE, "", GLOBAL, SOURCES) \
M(KAFKA, "", GLOBAL, SOURCES) \
M(NATS, "", GLOBAL, SOURCES) \
M(RABBITMQ, "", GLOBAL, SOURCES) \
M(SOURCES, "", GROUP, ALL) \
\
M(CLUSTER, "", GLOBAL, ALL) /* ON CLUSTER queries */ \

View File

@ -52,7 +52,10 @@ namespace
{AccessType::HDFS, "HDFS"},
{AccessType::S3, "S3"},
{AccessType::HIVE, "Hive"},
{AccessType::AZURE, "AzureBlobStorage"}
{AccessType::AZURE, "AzureBlobStorage"},
{AccessType::KAFKA, "Kafka"},
{AccessType::NATS, "NATS"},
{AccessType::RABBITMQ, "RabbitMQ"}
};

View File

@ -308,6 +308,7 @@ void registerStorageKafka(StorageFactory & factory)
creator_fn,
StorageFactory::StorageFeatures{
.supports_settings = true,
.source_access_type = AccessType::KAFKA,
});
}

View File

@ -786,7 +786,13 @@ void registerStorageNATS(StorageFactory & factory)
return std::make_shared<StorageNATS>(args.table_id, args.getContext(), args.columns, args.comment, std::move(nats_settings), args.mode);
};
factory.registerStorage("NATS", creator_fn, StorageFactory::StorageFeatures{ .supports_settings = true, });
factory.registerStorage(
"NATS",
creator_fn,
StorageFactory::StorageFeatures{
.supports_settings = true,
.source_access_type = AccessType::NATS,
});
}
}

View File

@ -1322,7 +1322,13 @@ void registerStorageRabbitMQ(StorageFactory & factory)
return std::make_shared<StorageRabbitMQ>(args.table_id, args.getContext(), args.columns, args.comment, std::move(rabbitmq_settings), args.mode);
};
factory.registerStorage("RabbitMQ", creator_fn, StorageFactory::StorageFeatures{ .supports_settings = true, });
factory.registerStorage(
"RabbitMQ",
creator_fn,
StorageFactory::StorageFeatures{
.supports_settings = true,
.source_access_type = AccessType::RABBITMQ,
});
}
}