Skip to content

Conversation

@frodesundby
Copy link
Contributor

@frodesundby frodesundby commented Jan 16, 2026

Key Changes

🔑 Secret Metadata Without Elevation

  • Adds Secret.keys field to expose key names without requiring elevation
  • Secret values still require elevation to view
  • Implements caching for key names to improve performance
  • New integration test for cross-team secret access control

🔄 Secret Client Refactoring

  • Removes custom ServiceAccountClientCreator abstraction
  • Write operations: Use SystemAuthenticatedClient (service account)
  • Read operations: Use ImpersonatedClient (user elevation)
  • Consistent with application/job workload patterns

🧹 Cleanup

  • Removes obsolete euthanasia labels
  • Cleanes up commented code
  • Updates kill-after label to Unix timestamp

@frodesundby frodesundby requested a review from a team as a code owner January 16, 2026 14:39
@jhrv jhrv changed the title Envmapping Team Viewer Role & RBAC Improvements Jan 19, 2026
Copy link
Contributor

@thokra-nav thokra-nav left a comment

Choose a reason for hiding this comment

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

Approver for å gjøre graphql review grønn, men se over kommentarene

Comment on lines 105 to 119
-- name: UserIsMember :one
-- name: ViewerIsMember :one
SELECT
EXISTS (
SELECT
id
FROM
user_roles
WHERE
user_id = @user_id
AND target_team_slug = @team_slug::slug
AND role_name IN ('Team member', 'Team owner')
)
;

-- name: UserIsOwner :one
Copy link
Contributor

Choose a reason for hiding this comment

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

Synes vi kan fortsette å kalle disse UserIs..

Comment on lines 455 to 463
func ViewerIsOwner(ctx context.Context, teamSlug slug.Slug, userID uuid.UUID) (bool, error) {
return db(ctx).ViewerIsOwner(ctx, teamsql.ViewerIsOwnerParams{
UserID: userID,
TeamSlug: teamSlug,
})
}

func UserIsMember(ctx context.Context, teamSlug slug.Slug, userID uuid.UUID) (bool, error) {
return db(ctx).UserIsMember(ctx, teamsql.UserIsMemberParams{
func ViewerIsMember(ctx context.Context, teamSlug slug.Slug, userID uuid.UUID) (bool, error) {
return db(ctx).ViewerIsMember(ctx, teamsql.ViewerIsMemberParams{
Copy link
Contributor

Choose a reason for hiding this comment

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

Her også, bedre å beholde UserIs... navnene

@frodesundby frodesundby merged commit 38994be into main Jan 21, 2026
10 checks passed
@frodesundby frodesundby deleted the envmapping branch January 21, 2026 13:35
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

Successfully merging this pull request may close these issues.

4 participants