Skip to content

Require a name on every API key policy#1082

Merged
jviotti merged 3 commits into
mainfrom
api-key-policy-name
Jun 23, 2026
Merged

Require a name on every API key policy#1082
jviotti merged 3 commits into
mainfrom
api-key-policy-name

Conversation

@jviotti

@jviotti jviotti commented Jun 23, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

jviotti added 2 commits June 23, 2026 13:02
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@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: 875134e Previous: a6f74b0 Ratio
Add one schema (0 existing) 296 ms 414 ms 0.71
Add one schema (100 existing) 24 ms 30 ms 0.80
Add one schema (1000 existing) 76 ms 88 ms 0.86
Add one schema (10000 existing) 1274 ms 708 ms 1.80
Update one schema (1 existing) 17 ms 22 ms 0.77
Update one schema (101 existing) 27 ms 29 ms 0.93
Update one schema (1001 existing) 82 ms 89 ms 0.92
Update one schema (10001 existing) 807 ms 738 ms 1.09
Cached rebuild (1 existing) 5 ms 7 ms 0.71
Cached rebuild (101 existing) 7 ms 9 ms 0.78
Cached rebuild (1001 existing) 24 ms 32 ms 0.75
Cached rebuild (10001 existing) 222 ms 276 ms 0.80
Index 100 schemas 890 ms 478 ms 1.86
Index 1000 schemas 1401 ms 1489 ms 0.94
Index 10000 schemas 16786 ms 13648 ms 1.23
Index 10000 schemas (custom meta-schema) 16014 ms 15918 ms 1.01
Index 10000 schemas ($ref fan-out) 14761 ms 16287 ms 0.91

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review June 23, 2026 17:22

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 27 files

Re-trigger cubic

@augmentcode

augmentcode Bot commented Jun 23, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR makes API key authentication policies explicitly named in configuration, and adds validation to prevent ambiguous policy references.

Changes:

  • Require a name field for every authentication entry with type: "apiKey" in the configuration schema (pattern ^[a-z0-9-]+$).
  • Extend Configuration::AuthenticationEntry with a name field and parse it for API key policies.
  • Add parsing-time validation to reject duplicate API key policy names and to reserve the name public.
  • Introduce dedicated configuration error types for duplicate/reserved names and surface them in the CLI with clear error output.
  • Update enterprise E2E fixtures and existing CLI tests to include the new name field.
  • Add new CLI regression tests covering missing/empty/invalid/duplicate/reserved policy names.
  • Expand unit tests to assert name parsing and to validate the new duplicate/reserved-name errors.

Technical Notes: The configuration is still schema-validated first; the duplicate/reserved name checks run immediately after parsing the authentication array.

🤖 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 (enterprise)

Details
Benchmark suite Current: 875134e Previous: a6f74b0 Ratio
Add one schema (0 existing) 382 ms 377 ms 1.01
Add one schema (100 existing) 34 ms 31 ms 1.10
Add one schema (1000 existing) 90 ms 81 ms 1.11
Add one schema (10000 existing) 752 ms 725 ms 1.04
Update one schema (1 existing) 26 ms 24 ms 1.08
Update one schema (101 existing) 34 ms 30 ms 1.13
Update one schema (1001 existing) 93 ms 83 ms 1.12
Update one schema (10001 existing) 761 ms 633 ms 1.20
Cached rebuild (1 existing) 9 ms 7 ms 1.29
Cached rebuild (101 existing) 11 ms 9 ms 1.22
Cached rebuild (1001 existing) 35 ms 30 ms 1.17
Cached rebuild (10001 existing) 301 ms 244 ms 1.23
Index 100 schemas 650 ms 663 ms 0.98
Index 1000 schemas 1666 ms 1654 ms 1.01
Index 10000 schemas 14118 ms 13898 ms 1.02
Index 10000 schemas (custom meta-schema) 16370 ms 16975 ms 0.96
Index 10000 schemas ($ref fan-out) 16891 ms 17004 ms 0.99

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

@jviotti jviotti merged commit 3524c2a into main Jun 23, 2026
5 checks passed
@jviotti jviotti deleted the api-key-policy-name branch June 23, 2026 17:45
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