Skip to content

security: resolve trusted workflow principals - #27

Open
ralphhanna wants to merge 1 commit into
refactor/canonical-api-v1from
security/trusted-principal
Open

security: resolve trusted workflow principals#27
ralphhanna wants to merge 1 commit into
refactor/canonical-api-v1from
security/trusted-principal

Conversation

@ralphhanna

Copy link
Copy Markdown
Collaborator

Summary

Moves workflow identity resolution into the authenticated web integration layer.

  • Adds an injectable PrincipalResolver
  • Rejects caller-supplied body.user
  • Supports separate runtime and administration identities
  • Disables the insecure legacy API unless explicitly enabled
  • Documents the change in CHANGELOG.md

Stack

Depends on refactor/canonical-api-v1 (#3). This is web #4.

Validation

  • 17/17 focused web authentication, versioning, boundary, and integration tests pass.

@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: d3343d5ec5

ℹ️ 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 src/app.ts
Comment on lines +224 to +225
if (process.env.ENABLE_LEGACY_API === 'true')
this.app.use('/api', deprecatedApi('/api/v1'), (new API(this)).config());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Disable the legacy admin API by default

When ADMIN_USER_* restricts an administrative principal by tenant, groups, or model ownership, this opt-in guard disables only the runtime legacy router: /admin/api remains mounted unconditionally below, and its handlers call raw bpmnServer.definitions methods without the newly resolved principal. A client holding ADMIN_API_KEY can therefore bypass the new principal-based model authorization by using /admin/api/definitions/*; guard or remove that legacy admin router as well.

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