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

RBAC Admin API Swagger and handler stubs #16781

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

oleiman
Copy link
Member

@oleiman oleiman commented Feb 28, 2024

This PR introduces swagger JSON describing Admin API extensions for RBAC.
Includes stub handlers for the new API surface and stub integration tests.

Closes https://github.com/redpanda-data/core-internal/issues/1103

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

@oleiman
Copy link
Member Author

oleiman commented Feb 29, 2024

/dt

@oleiman oleiman requested a review from BenPope February 29, 2024 06:56
@vbotbuildovich
Copy link
Collaborator

@oleiman oleiman marked this pull request as ready for review February 29, 2024 20:02
src/v/redpanda/admin/api-doc/security.def.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.def.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.def.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.def.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.def.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.json Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/security.json Outdated Show resolved Hide resolved
Superuser only (with the exception of list_user_roles)

Each handler returns an error or empty list as approprate for an empty,
not yet implemented collection of roles.
@oleiman
Copy link
Member Author

oleiman commented Feb 29, 2024

force push swagger cleanup

A starting point for building out tests for RBAC extensions

API wrappers:
- list_user_roles
- create_role
- get_role (by name)
- delete_role (by name)
- update_role (takes a RoleUpdate tuple)
- list_roles (with optional name prefix and membership filters)
- update_role_members
- list_role_members

Includes some structure for API surface:
- RoleErrorCode
- RoleError
- RoleUpdate
- RoleDescription
- RolesList
Testing route wiring and superuser-only access.
@oleiman
Copy link
Member Author

oleiman commented Mar 1, 2024

force push to fix janky url param encoding

Copy link
Contributor

@michael-redpanda michael-redpanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@oleiman
Copy link
Member Author

oleiman commented Mar 4, 2024

@BenPope - any objections?

@oleiman oleiman merged commit 6da3141 into redpanda-data:dev Mar 4, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants