Skip to content

Add instancer based roles and users#69

Merged
krishnamiriyala merged 4 commits intomainfrom
add-instancer-roles
Sep 25, 2023
Merged

Add instancer based roles and users#69
krishnamiriyala merged 4 commits intomainfrom
add-instancer-roles

Conversation

@krishnamiriyala
Copy link
Copy Markdown
Contributor

@krishnamiriyala krishnamiriyala commented Sep 22, 2023

Fixes #29

  • New roles added are,
    • INSTANCE_READER
    • INSTANCE_WRITER
    • TENANT_INSTANCE_READER
    • TENANT_INSTANCE_WRITER
  • Add dbUsers for all combinations
  • Support accessing non-tenanted/instanced tables with tenanted/instanced roles

Fixes #24

  • Updated the name for RLS policies to end with _v2 to support versioning and backward compatibility

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 22, 2023

Codecov Report

Merging #69 (481445a) into main (78a6202) will decrease coverage by 0.07%.
The diff coverage is 82.30%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
- Coverage   70.27%   70.21%   -0.07%     
==========================================
  Files          13       13              
  Lines        1497     1561      +64     
==========================================
+ Hits         1052     1096      +44     
- Misses        350      370      +20     
  Partials       95       95              
Flag Coverage Δ
unit-tests 70.21% <82.30%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/authorizer/metadata_authorizer.go 94.91% <100.00%> (+3.73%) ⬆️
pkg/datastore/db_user.go 92.78% <100.00%> (+0.31%) ⬆️
pkg/datastore/sql_struct.go 90.90% <100.00%> (ø)
pkg/protostore/protostore.go 68.01% <100.00%> (ø)
pkg/datastore/database.go 58.94% <94.44%> (+1.30%) ⬆️
pkg/datastore/helper.go 54.60% <50.00%> (ø)
pkg/dbrole/dbrole.go 53.33% <31.03%> (-42.51%) ⬇️

krishnamiriyala and others added 2 commits September 22, 2023 21:52
- New roles added are,
  * INSTANCE_READER
  * INSTANCE_WRITER
  * TENANT_INSTANCE_READER
  * TENANT_INSTANCE_WRITER
- Add dbUsers for all combinations
- Disable tests for transactions with incompatible roles
@krishnamiriyala krishnamiriyala changed the title Add instancer based roles Add instancer based roles and users Sep 23, 2023
@krishnamiriyala krishnamiriyala force-pushed the add-instancer-roles branch 2 times, most recently from 13c58b6 to 481445a Compare September 25, 2023 19:57
@krishnamiriyala krishnamiriyala merged commit b947d67 into main Sep 25, 2023
@krishnamiriyala krishnamiriyala deleted the add-instancer-roles branch September 25, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for tenant_instance_writer and tenant_instance_reader Use versioning and CREATE only methods for RLS configuration

4 participants