Hey guys!
I have a use case where I want to test the permissions (IAM) locally for GCP Pub/Sub topic. There is a sample code that
official document provides.
I am trying to test my application locally using pub/sub emulator but it has some
limitations (doesn't implement permissions).
As a solution, I have implemented a Fake pub/sub permission checker (flask server) - which would behave similar to real pub/sub IAM permission logic. I want my
PublisherClient to connect with this fake server instead of pub/sub-emulator (or) real google pub/sub.
For ex: when you set PUBSUB_EMULATOR_HOST environment variable, below code would connect you to pub/sub emulator instead of real google pub/sub.
from google.cloud.pubsub_v1 import PublisherClient
publisher = PublisherClient()
I would want my code to connect with my fake server when I write same above code. Is it possible to configure this?
Would really appreciate the help!