-
Notifications
You must be signed in to change notification settings - Fork 21
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
Import pre-existing access from providers #206
Comments
@ravisuhag @AkarshSatija @mabdh @bsushmith @singhvikash11 need your help to go through this rfc 🙏 |
Draft PR which addresses this issues. #167 |
@rahmatrhd Flag to identify whether it is imported or not can be generalized. maybe something like. |
@Chief-Rishab I think adding no policies or no approvers associated with these appeals would not be ideal. There should be an admin page and the admin/approver could revoke this access from users later. @rahmatrhd let's set up some time to discuss RFC, we can catch up and go through it. |
@singhvikash11 currently anyone with the revoke API access can revoke any appeals, it's not depending on the policy. Apart from that, a policy is being used to determine the approvers, while those imported access are already active access, so we no longer have to set the approvers. |
found an edge case: since provider resources are not synced to guardian in real time, when importing existing access from provider, there might be a chance it contains access from newly created resources that haven't been synced to guardian yet. Those access can't be added to guardian unless we also add the new resources to the guardian which will add a side-effect to import access api and makes it not clean (first option). Or the easiest one is, to ignore the access from resources that haven't been synced to guardian. |
Can we make a cron job/API to regularly fetch resources first rather than ignoring resources not synced with Guardian.? That would increase the scope for drift management as well but will be good for the end user |
@rahmatrhd As part of import access, we should ignore the access of resources that are not registered in Guardian. The drift of resources can be handled separately. |
Have thought of merging this import access with the existing Reason I come with this proposal is, when fetching access from provider we are also fetching the resources again to get the access entries for each. And I think it could be a signal that these process can be merged together |
as discussed, we will keep both processes decoupled until we see better use cases or requirements for that. Import Access will still be done through an API but user can add filter for resources: The function signature for |
In addition to this, at provider level provider will provide a method that takes resources as input and import access for the provided resources. |
Requirements
Approach:
1. Fetching access
Option 1: add a flag in the provider config to import accessPros : Under the assumption that after the provider is onboarded to guardian there will be no access created outside guardian, this approach would be just sufficient (simpler process)
Cons : Will only run once when the provider is just created
Pros : Can be triggered at any time
Cons : Need to be triggered manually
Option 3: regularly collect existing access with jobsPros : Continuously control those access created outside guardian
Cons : Might increase the scope to the
Track access drift
feature2. Creating the appeals
The appeal going to be like this:
Things to note
Policy
Policy is going to be
null
since there's no approval flow for the imported accessAccount Types
We are going to import pre-existing access for account types that are defined in the
allowed_account_types
field in the provider config only.Role
Assuming this bug has been resolved,
bq-admin
which has two permissions:roles/bigquery.dataViewer
androles/bigquery.dataEditor
.roles/bigquery.dataViewer
androles/bigquery.dataEditor
bq-admin
only. Note that it will also have"permissions": ["roles/bigquery.dataViewer", "roles/bigquery.dataEditor"]
in the appeal objectroles/bigquery.metadataViewer
access in the bigquery, but that permission was not defined in the provider config."role" = "roles/bigquery.metadataViewer"
and"permissions" = ["roles/bigquery.metadataViewer"]
The text was updated successfully, but these errors were encountered: