Hi,
I'm working on a bot that retrieves data from BigQuery tables and documents. I need to implement role-based access control so users only see the information relevant to their roles. Could you advise on the best approach for restricting access based on user roles(Store user,store Manager etc..)? Any guidance would be greatly appreciated.
Hi @Rajavelu,
Welcome to Google Cloud Community!
To set up role-based access control (RBAC) for your bot that retrieves data from BigQuery, you need to combine BigQuery's access control features with your bot’s logic. You can follow this strategy
1. BigQuery Access Control:
For example:
2. Bot Logic (User Authentication and Authorization):
3. Data Organization: You can use separate datasets in BigQuery for each role, but views are often a better option for flexibility and easier management.
In addition, you can refer to this document for more information.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Thank you for your response!
I'm working with a scenario where an external website (similar to SAP SuccessFactors) has its own user authentication system. A chatbot is integrated into a section of this website, and some of the chatbot's knowledge comes from documents stored in a separate datastore.
I'm trying to understand the underlying mechanism of how this works.
My current approach is to capture the username from the external website's login process. This username would then be used in conjunction with an unauthenticated API, from a conversational interface, to match the user with the data that can be accessed by them. The user-specific access permissions and information, will be available in a BigQuery table which includes usernames, and the information each user is authorized to access.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |