Skip to content

Resolve the instance's own schemas without the caller's credential - #1182

Merged
jviotti merged 2 commits into
mainfrom
crash-auth
Jul 31, 2026
Merged

Resolve the instance's own schemas without the caller's credential#1182
jviotti merged 2 commits into
mainfrom
crash-auth

Conversation

@jviotti

@jviotti jviotti commented Jul 31, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

jviotti added 2 commits July 31, 2026 18:12
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Jul 31, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR fixes a crash/regression where MCP requests could bring the server down when the caller’s credential was allowed to access /self/v1/mcp but was not allowed to read the instance’s own schema surface under /self.

Changes:

  • Introduces unauthenticated “structural” schema helpers (structural_template, structural_evaluate, structural_evaluate_fast) to validate request envelopes using the instance’s own bookkeeping schemas without consulting the caller’s gate.
  • Updates MCP and several tool/API actions to use structural validation for request/envelope checking instead of credential-gated schema evaluation.
  • Adds an auth-closed E2E policy/key scoped to /self/v1/mcp (new ONE_E2E_MCP_KEY) to reproduce the narrow-policy scenario.
  • Adds a comprehensive Hurl E2E suite ensuring the scoped key can use MCP transport while still being blocked from /self schemas and the catalog, and that malformed MCP messages are still rejected.

Technical Notes: Structural validation resolves precompiled Blaze artifacts via the unauthenticated resolver (still canonicalized/contained), while any caller-requested schema evaluation remains credential-gated.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode 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.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Benchmark Index (community)

Details
Benchmark suite Current: 5523486 Previous: fe6ab0d Ratio
Add one schema (0 existing) 275 ms 333 ms 0.83
Add one schema (100 existing) 28 ms 28 ms 1
Add one schema (1000 existing) 100 ms 86 ms 1.16
Add one schema (10000 existing) 873 ms 741 ms 1.18
Update one schema (1 existing) 21 ms 21 ms 1
Update one schema (101 existing) 28 ms 28 ms 1
Update one schema (1001 existing) 97 ms 84 ms 1.15
Update one schema (10001 existing) 880 ms 735 ms 1.20
Cached rebuild (1 existing) 6 ms 7 ms 0.86
Cached rebuild (101 existing) 8 ms 9 ms 0.89
Cached rebuild (1001 existing) 27 ms 29 ms 0.93
Cached rebuild (10001 existing) 236 ms 254 ms 0.93
Index 100 schemas 639 ms 612 ms 1.04
Index 1000 schemas 1546 ms 1432 ms 1.08
Index 10000 schemas 13057 ms 13893 ms 0.94
Index 10000 schemas (custom meta-schema) 15556 ms 16772 ms 0.93
Index 10000 schemas ($ref fan-out) 15524 ms 16702 ms 0.93

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Benchmark Index (enterprise)

Details
Benchmark suite Current: 5523486 Previous: fe6ab0d Ratio
Add one schema (0 existing) 392 ms 542 ms 0.72
Add one schema (100 existing) 108 ms 108 ms 1
Add one schema (1000 existing) 157 ms 151 ms 1.04
Add one schema (10000 existing) 865 ms 938 ms 0.92
Update one schema (1 existing) 97 ms 85 ms 1.14
Update one schema (101 existing) 103 ms 92 ms 1.12
Update one schema (1001 existing) 159 ms 162 ms 0.98
Update one schema (10001 existing) 777 ms 1067 ms 0.73
Cached rebuild (1 existing) 8 ms 7 ms 1.14
Cached rebuild (101 existing) 11 ms 10 ms 1.10
Cached rebuild (1001 existing) 31 ms 29 ms 1.07
Cached rebuild (10001 existing) 258 ms 234 ms 1.10
Index 100 schemas 668 ms 646 ms 1.03
Index 1000 schemas 1591 ms 1502 ms 1.06
Index 10000 schemas 13795 ms 14232 ms 0.97
Index 10000 schemas (custom meta-schema) 17271 ms 18496 ms 0.93
Index 10000 schemas ($ref fan-out) 17035 ms 17633 ms 0.97

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti
jviotti merged commit 868f8a0 into main Jul 31, 2026
5 checks passed
@jviotti
jviotti deleted the crash-auth branch July 31, 2026 21:44
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