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

Add resources conditionally #313

Closed
rahmatrhd opened this issue Oct 26, 2022 · 0 comments · Fixed by #323
Closed

Add resources conditionally #313

rahmatrhd opened this issue Oct 26, 2022 · 0 comments · Fixed by #323
Assignees
Labels

Comments

@rahmatrhd
Copy link
Member

this issue is converted from this RFC PR

Summary

Resource in Guardian represents the actual resource in the provider e.g. for BigQuery provider, a resource represents a
dataset or a table. Guardian collects resources from the provider automatically as soon as it registered. While in
parallel, Guardian also has a job for continuously syncing resources.

In current design it fetch all the database/table/resources in configure provider, there is no way to filter out on
resources.

Technical Design

Add a scope of condition in provider configuration to filter out on resources.

Using expression

Expression can be used to check whether Guardian should add the resources or not.

resources:
  filter: $resource.urn endsWith 'keyset'
  type: tables
  policy:
    id: keyset_table_policy

Migration

We can edit or add new providers based on new configuration. For already added resources whom we want to make conditional need to soft-delete it from Guardian db.

singhvikash11 added a commit that referenced this issue Nov 8, 2022
singhvikash11 added a commit that referenced this issue Nov 8, 2022
@ravisuhag ravisuhag linked a pull request Nov 8, 2022 that will close this issue
singhvikash11 added a commit that referenced this issue Jan 4, 2023
* feat: implement the feature #313

* chore: resolve pr feedback

* add test case in expression_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants