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

Proposal: support accessing database with fine-grained access control #146

Closed
toga4 opened this issue Mar 6, 2023 · 4 comments · Fixed by #147
Closed

Proposal: support accessing database with fine-grained access control #146

toga4 opened this issue Mar 6, 2023 · 4 comments · Fixed by #147

Comments

@toga4
Copy link
Contributor

toga4 commented Mar 6, 2023

CLI Option:

spanner-cli -p <project> -i <instance> -d <database> --role <role>

Syntax:

USE <database> WITH ROLE <role>;

https://cloud.google.com/spanner/docs/access-with-fgac?hl=en

@toga4
Copy link
Contributor Author

toga4 commented Mar 6, 2023

Prototype implementation: master...toga4:spanner-cli:feature/with-role

@yfuruyama
Copy link
Collaborator

@toga4 Thank you for your proposal. It's a good idea to support fine-grained access control in spanner-cli.

One suggestion: for USE statement, shall we omit WITH word? i.e. USE <database> [ROLE <role>];

Then it will be consistent with other multi-optional statement, like BEGIN [RW] [PRIORITY {HIGH|MEDIUM|LOW}] [TAG <tag>];: https://github.com/cloudspannerecosystem/spanner-cli#syntax

@toga4
Copy link
Contributor Author

toga4 commented Mar 6, 2023

@yfuruyama Sure, let's omit it. Then, syntax will be below.

USE <database> ROLE <role>;

Can I submit a PR with this?

@yfuruyama
Copy link
Collaborator

Sure, thank you!

FYI: @apstndb @takabow

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 a pull request may close this issue.

2 participants