Skip to content

feat: list all accounts/applications regardless of access#9

Merged
BK1031 merged 1 commit into
mainfrom
bk1031/list-all-entries
Jun 26, 2026
Merged

feat: list all accounts/applications regardless of access#9
BK1031 merged 1 commit into
mainfrom
bk1031/list-all-entries

Conversation

@BK1031

@BK1031 BK1031 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
  • ListAccounts / ListApplications no longer filter by access groups — everyone can see what exists so new entries don't collide on names
  • Each list item carries can_access: bool (computed server-side via existing RequestTokenCanAccessAccount/Application)
  • Detail + CRUD endpoints unchanged — still gated by access groups
  • Frontend cards for entries without access render as non-clickable <div>s with a Lock icon (replacing the ArrowUpRight) and opacity-60 muted styling

Stop filtering ListAccounts/ListApplications by access groups so anyone
can see what already exists (prevents accidental name collisions when
creating new entries). Detail/CRUD endpoints stay gated.

Each list item carries a can_access bool computed server-side. The UI
renders locked cards as non-clickable with a lock icon + muted styling
instead of the arrow-out affordance.
@BK1031 BK1031 merged commit 1bccb71 into main Jun 26, 2026
6 checks passed
@BK1031 BK1031 deleted the bk1031/list-all-entries branch June 26, 2026 07:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37de37d8ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vault/api/account.go
authorized = append(authorized, account)
}
response = append(response, accountListItem{
AccountWithSecretCount: account,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Redact secret metadata for locked accounts

When an authenticated caller lacks this account's access group, the new list item still embeds the full AccountWithSecretCount, so /accounts exposes restricted account metadata such as secret_count, URL, description, group names, and creator/updater IDs even though GetAccount would reject the same caller. If access groups are used to keep an account's secret inventory private, any user can now enumerate that inventory from the list response; return a redacted item for CanAccess == false instead of the full counted model.

Useful? React with 👍 / 👎.

Comment thread vault/api/app_secret.go
authorized = append(authorized, application)
}
response = append(response, applicationListItem{
ApplicationWithSecretCount: application,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Redact secret counts for locked applications

When a caller is authenticated but not in an application's access group, this still embeds ApplicationWithSecretCount, so /app-secrets reveals the restricted application's secret count and access-group metadata while GetApplication and the secret endpoints remain denied. That lets any user track the contents of applications they cannot open; build a redacted list shape for CanAccess == false or omit the count until the caller is authorized.

Useful? React with 👍 / 👎.

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.

1 participant