Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating readme with RBAC #80

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Updating readme with RBAC #80

merged 2 commits into from
Jan 15, 2025

Conversation

ankush-cohere
Copy link
Contributor

@ankush-cohere ankush-cohere commented Jan 14, 2025

This PR introduces a new section on Role-Based Access Control (RBAC) in the README.md file, providing a code snippet for setting up user access control using the Cohere Compass API. The code demonstrates how to create users, add them to groups, create roles with specific permissions, and map roles to groups.

Changes:

  • Added a new section titled "RBAC" to the README.md file.
  • Introduced Python code for user access control using the Cohere Compass API.
  • Imported necessary modules from cohere.compass.clients.rbac, cohere.compass.models.rbac, and requests.exceptions.
  • Defined variables for API configuration, user names, group name, role name, indexes, and permissions.
  • Created users and added them to a group using the CompassRootClient instance.
  • Created a role with specific permissions and mapped it to the group.
  • Handled potential HTTP errors during the user creation process.

@ankush-cohere ankush-cohere requested a review from a team as a code owner January 14, 2025 14:10
@ankush-cohere ankush-cohere merged commit cbd51ec into main Jan 15, 2025
11 checks passed
@ankush-cohere ankush-cohere deleted the readme/add_rbac branch January 15, 2025 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants