Skip to content

Schema grants of few principals are merged #17

Closed
@arshvin

Description

@arshvin

This line of code has a bug: if a catalog schema_grants map contains few principals with required grants, then these grants will be merged and applied for all of mentioned principals.
Let's imagine we have following:

...
    schema_grants = {
      "some-user-group1"                             = ["USE_SCHEMA", "EXECUTE", "REFRESH"],
      "some-user-name1"                              = ["SELECT", "APPLY_TAG"],
      "11111111-1111-1111-1111-111111111111" = ["ALL_PRIVILEGES"],
    }
...

Finally, all of these users will have following list of grants to mentioned schemas:

"some-user-group1"                             => ["USE_SCHEMA", "EXECUTE", "REFRESH","SELECT", "APPLY_TAG", "ALL_PRIVILEGES"]
"some-user-name1"                              => ["USE_SCHEMA", "EXECUTE", "REFRESH","SELECT", "APPLY_TAG", "ALL_PRIVILEGES"]
"11111111-1111-1111-1111-111111111111" => ["USE_SCHEMA", "EXECUTE", "REFRESH","SELECT", "APPLY_TAG", "ALL_PRIVILEGES"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions