Add sharing-aware RBAC authorization for secrets#37
Merged
jeffmccune merged 2 commits intomainfrom Jan 31, 2026
Merged
Conversation
Implement per-user and per-group sharing grants using Kubernetes annotations (holos.run/share-users, holos.run/share-groups). The sharing model follows Google Docs-style access: users/groups receive a role (viewer, editor, owner) granting the corresponding permissions. - Add RoleFromString() to convert string role names to Role enum - Add CheckAccessSharing() with email/group grant evaluation and legacy allowedRoles fallback - Add GetShareUsers/GetShareGroups annotation parsing helpers - Add sharing-aware authz wrappers (CheckReadAccessSharing, etc.) - Wire all handlers to use sharing-aware authorization - Full test coverage for all new functions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ShareGrant proto message and UpdateSharing RPC to SecretsService. The UpdateSharing handler requires owner-level access (PERMISSION_SECRETS_ADMIN) and persists per-user and per-group sharing grants as Kubernetes annotations. - Add ShareGrant, UpdateSharingRequest/Response proto messages - Add UpdateSharing RPC to SecretsService - Add CheckAdminAccessSharing authz wrapper - Add K8sClient.UpdateSharing() to persist sharing annotations - Implement UpdateSharing handler with RBAC and audit logging - Add helper functions: shareGrantsToMap, buildSecretMetadata, protoRoleFromString - Full test coverage: 7 handler tests + 2 audit logging tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
holos.run/share-users,holos.run/share-groups)CheckAccessSharing()onGroupMappingwith email/group grant evaluation and legacyallowedRolesfallbackRoleFromString,CheckAccessSharing,GetShareUsers,GetShareGroups, and all sharing-aware authz wrappersTest plan
RoleFromString(9 cases)CheckAccessSharing(9 cases covering email, group, legacy, case-insensitivity, deny paths)GetShareUsersandGetShareGroupsannotation parsing (8 cases)🤖 Generated with Claude Code