Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/content/docs/reconcile.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ Because the file is the full list, `spec: []` removes every platform user. The b
service account is the exception: it is never removed. Keep `app.admin.bootstrap` configured,
since that account is the recovery path if a file ever empties the list.

Disabled users are out of scope. A disabled user does not appear in the platform-user
listing the reconciler reads, so it cannot see or manage their platform access: a disabled
admin is not exported, and an empty file does not remove their grant. Do not list a disabled
user in the file. Re-enable them first if you need to reconcile their access. This only
concerns users. Service users cannot be disabled today, so they are always listed.

## The Permission kind

A permission is an identity: a `service/resource` namespace plus a verb. There is nothing
Expand Down
6 changes: 6 additions & 0 deletions internal/reconcile/platformuser_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ func (r *PlatformUserReconciler) Export(ctx context.Context) (any, error) {
return specs, nil
}

// fetchCurrent lists the platform principals the reconciler manages. Disabled
// users are out of scope: ListPlatformUsers resolves users through a store
// query that filters out disabled accounts, so a disabled admin never appears
// here. It is therefore neither exported nor removed by an empty file, and a file
// that lists a disabled user cannot converge. Re-enable the user to manage their
// platform access. Service users cannot be disabled today, so they are always listed.
func (r *PlatformUserReconciler) fetchCurrent(ctx context.Context) ([]platformPrincipal, error) {
resp, err := r.client.ListPlatformUsers(ctx, authReq(&frontierv1beta1.ListPlatformUsersRequest{}, r.header))
if err != nil {
Expand Down
Loading