Skip to content

feat: add GuardStepUp node type to node-type-registry#1265

Merged
pyramation merged 1 commit into
mainfrom
feat/guard-step-up-node
Jun 6, 2026
Merged

feat: add GuardStepUp node type to node-type-registry#1265
pyramation merged 1 commit into
mainfrom
feat/guard-step-up-node

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Adds a new guard category to the node-type-registry with GuardStepUp — a BEFORE trigger node that enforces require_step_up() (recent password/MFA verification) before allowing DML operations.

// Blueprint usage:
{ $type: 'GuardStepUp', data: { events: ['UPDATE', 'DELETE'], step_up_type: 'password_or_mfa' } }

// With compound conditions (require step-up only when role changes to admin):
{ $type: 'GuardStepUp', data: {
    events: ['UPDATE'],
    conditions: { AND: [
      { field: 'role', op: '=', value: 'admin', row: 'NEW' },
      { field: 'role', op: '!=', value: 'admin', row: 'OLD' }
    ]}
}}

Uses the existing conditionDefs/conditionProperties from conditions/ for compound AND/OR/NOT support, watch_fields, and simple leaf conditions.

Added 'guard' to categoryOrder in generate-types.ts so GuardStepUpParams interface is emitted during codegen.

Mirrors the generator implementation in constructive-db #1541.

Link to Devin session: https://app.devin.ai/sessions/05f55404de8b435db075244b6edb4006
Requested by: @pyramation

Introduces the 'guard' category with GuardStepUp — a BEFORE trigger that
calls require_step_up() to enforce recent password/MFA verification before
DML. Supports compound conditions (AND/OR/NOT), watch_fields, and simple
condition_field/condition_value leaf conditions.

Mirrors constructive-db PR #1541.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation pyramation merged commit 81aca3e into main Jun 6, 2026
35 checks passed
@pyramation pyramation deleted the feat/guard-step-up-node branch June 6, 2026 05:07
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