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

ABAC #1169

Open
moshloop opened this issue Jul 16, 2024 · 0 comments
Open

ABAC #1169

moshloop opened this issue Jul 16, 2024 · 0 comments
Labels
Milestone

Comments

@moshloop
Copy link
Member

See https://casbin.org/docs/abac

Where request is:

playbook:
  name: name
  id: 
  labels: {}
config:
  name: name
  owners: []
  id
  type: Kubernetes::Pod 
  tags: {}
  path: []
teams: [] # teams the user is member of

Which would allow policies to be added like:

kind: Permission
metadata: 
   uid: abc
permissions:
   - action: playbook:run
     team: everyone
     inherited: true
     config:
         #...selectorFields
         id: def # id of aws cluster
    - action: playbook:run
       owner: true
    - action: playbook:run
       team: SRE Team
       playbook: name or ID

Which corresponds to:

p, r.playbook.id == 'abc' && 'def' in r.config.path
p, r.playbook.id == 'abc' && r.sub.id in r.config.owners
p, r.playbook.id == 'abc' && 'everyone' in r.sub.teams && ' 'def' in r.config.path

And then from a UI perspective on a config item there would be a permission tab/table with:

action playbook User/Team
playbook:run * editors (default global policy)

And on the playbook permissions tab

action playbook User/Team
playbook:run * editors (default policy)
playbook:run playbook id $owners
playbook:run playbook id SRE Team

The permission table would need:

  • playbook_id (optional, if empty all playbooks)
  • config_id (optional if empty all configs)
  • config_selector (
  • inherited (id in r.config.id) or (id in r.config.path)
  • deny
  • action
  • user
  • team
@moshloop moshloop added this to the v1.0.0 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant