feat: add backup level IAM policy controls#799
feat: add backup level IAM policy controls#799gcf-merge-on-green[bot] merged 11 commits intogoogleapis:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #799 +/- ##
==========================================
+ Coverage 99.21% 99.24% +0.02%
==========================================
Files 18 18
Lines 17050 17169 +119
Branches 1047 958 -89
==========================================
+ Hits 16917 17040 +123
+ Misses 130 126 -4
Partials 3 3
Continue to review full report at Codecov.
|
kolea2
left a comment
There was a problem hiding this comment.
will follow up on this feature
test/backup.ts
Outdated
| }); | ||
|
|
||
| it('should accept permissions as array', done => { | ||
| const permissions = ['bigtable.tables.get', 'bigtable.tables.list']; |
There was a problem hiding this comment.
I think these should be similar to: https://github.com/googleapis/java-bigtable/pull/450/files#diff-84d1a07ba982b6e9cac6f4e6ae0bb75a4531804decf3de85ece5e475c7720801R356-R359
There was a problem hiding this comment.
(and elsewhere in these tests)
| sinon.restore(); | ||
| }); | ||
| const policy = {}; | ||
| it('should correctly call Table#setIamPolicy()', done => { |
There was a problem hiding this comment.
Backup IAM policy controls functions delegate to/reuse Table IAM policy controls functions.
Please refer below
setIamPolicy
getIamPolicy
testIamPermissions
The unit tests verify that corresponding Table functions are properly called.
The new features allow user to check and tune IAM policy for the backup level:
getIamPolicy- allows a user obtain the current resource IAM policy.setIamPolicy- allows a user to set resource level IAM policy.testIamPermissions- allows a user to pass a list ofpermissionsand get back a sub-list of granted permissions.Ensure the tests and linter pass
Code coverage does not decrease (if any source code was changed)
Appropriate docs were updated (if necessary)