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

Authorization #72

Closed
oscar60310 opened this issue Sep 14, 2022 · 0 comments · Fixed by #76
Closed

Authorization #72

oscar60310 opened this issue Sep 14, 2022 · 0 comments · Fixed by #76
Assignees
Labels

Comments

@oscar60310
Copy link
Contributor

oscar60310 commented Sep 14, 2022

What’s the problem you're trying to solve

After #71, we have profiles for data sources, we want to do access control for them. For example, admin users can access pg-admin profile, but non-admin users can only access pg-no-admin profile.

Describe the solution you’d like

We can implement a sample attribute-based access control (ABAC) for our profiles.

  1. For each profile, we can set the allow property to indicate what attributes users should have.
    For example, only the user with name admin can access this profile:
    - name: 'pg-admin'
      driver: 'pg'
      connection: xx
      allow:
        - name: admin
  2. Attribute filters are also supported. For example, user should have an attribute group and its value should be admin:
    - name: 'pg-admin'
      driver: 'pg'
      connection: xx
      allow:
        - attribute:
              name: group
              value: admin
  3. Wildcards are supported.
    - name: 'pg-admin'
      driver: 'pg'
      connection: xx
      allow:
        - name: admin-*
  4. Single allow condition are combined with AND logic
    Only the user who has name admin and has group attribute with value admin can access this profile.
    - name: 'pg-admin'
     driver: 'pg'
     connection: xx
     allow:
       - name: admin
         attribute:
             name: group
             value: admin 
    Multiple allow conditions are combined with OR logic.
    admin, someoneelse, and those who have group attribute with value admin can access this profile.
    - name: 'pg-admin'
     driver: 'pg'
     connection: xx
     allow:
       - name: admin
       - name: someoneelse
       - attribute:
             name: group
             value: admin 
  5. We can specify multiple profiles on a single schema now, from top to bottom, users use the first qualified profile. If users can't use any of them, 403 error should be thrown.

Additional context

@oscar60310 oscar60310 self-assigned this Sep 14, 2022
@oscar60310 oscar60310 moved this to Backlog in Vulcan SQL Roadmap Sep 14, 2022
@oscar60310 oscar60310 moved this from Backlog to Committed in Vulcan SQL Roadmap Sep 14, 2022
@oscar60310 oscar60310 moved this from Committed to In process in Vulcan SQL Roadmap Sep 16, 2022
@oscar60310 oscar60310 linked a pull request Sep 16, 2022 that will close this issue
@oscar60310 oscar60310 moved this from In process to Done in Vulcan SQL Roadmap Sep 23, 2022
@oscar60310 oscar60310 moved this from Done to Released in Vulcan SQL Roadmap Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

1 participant