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

deck sync --rbac-resources-only doesn't add back actions for the role permissions #621

Closed
pmutyala opened this issue Mar 18, 2022 · 2 comments
Assignees

Comments

@pmutyala
Copy link

deck version
decK v1.11.0 (4235c73)

  1. Take a backup of rbac resources
    2022-03-18 15:10:20 [8] [INFO] helpers.commands cmd from generate_deck_dump_rbac_cmd is deck dump --rbac-resources-only --all-workspaces --headers "kong-admin-token: xxxxxx" --kong-addr http://kube-kong-admin.service.intraiad1.devconsul.csnzoo.com --format yaml --tls-skip-verify

cat demospace.yaml
_format_version: "1.1"
_workspace: demospace
rbac_roles:

  • endpoint_permissions:
    • actions:
      • read
        endpoint: '*'
        negative: false
        workspace: demospace
        name: demospace-workspace-readonly

Screen Shot 2022-03-18 at 3 20 24 PM

  1. delete the role

Screen Shot 2022-03-18 at 3 21 29 PM

  1. Restore the role through deck sync

deck sync --workspace demospace --rbac-resources-only --kong-addr http://kube-kong-admin.service.intraiad1.devconsul.service.com --headers 'kong-admin-token:{{token}}' --tls-skip-verify -s /wayfair/data/codebase/backups/20220318141020/rbac/demospace.yaml
creating rbac-role demospace-workspace-readonly
creating rbac-endpoint-permission eff2e4aa-0fb6-4df0-938a-4a2c12aaa44d-demospace-*
Summary:
Created: 2
Updated: 0
Deleted: 0

  1. Check role and permissions

Screen Shot 2022-03-18 at 3 23 07 PM

5. actions is an empty array it doesn't configure anything..

If we need to edit and add back action, Kong doesn't allow and have to delete the whole permission and add it back with required actions.

@GGabriele
Copy link
Collaborator

Hi @pmutyala , thanks for opening this issue.

I already opened a couple of PRs for this, so hopefully we should solve this soon!

#619

@GGabriele GGabriele self-assigned this Mar 21, 2022
@GGabriele
Copy link
Collaborator

Fixed this here. It will be included in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants