Package org.apache.pulsar.sql.presto
Class PulsarAuth
java.lang.Object
org.apache.pulsar.sql.presto.PulsarAuth
This class implements the authentication and authorization integration between the Pulsar SQL worker and the
Pulsar broker.
It will check permissions against the session-topic pair by trying to subscribe to a topic using the Pulsar Reader
to check the consumption privilege. The same topic will only be checked once during the same session.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckTopicAuth(io.prestosql.spi.connector.ConnectorSession session, String topic) Check if the session has read access to the topic.voidcleanSession(io.prestosql.spi.connector.ConnectorSession session) When the session is closed, this method needs to be called to clear the session's auth verification status.
-
Constructor Details
-
PulsarAuth
-
-
Method Details
-
checkTopicAuth
Check if the session has read access to the topic. It will try to subscribe to that topic using the Pulsar Reader to check the consumption privilege. The same topic will only be checked once during the same session. -
cleanSession
public void cleanSession(io.prestosql.spi.connector.ConnectorSession session) When the session is closed, this method needs to be called to clear the session's auth verification status.
-