feat(auth): support manual PRM override#2717
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the authentication capabilities by introducing the option to provide a manual Protected Resource Metadata (PRM) file. This allows for greater flexibility and control over the PRM configuration, enabling users to define custom metadata instead of relying solely on the auto-generated version. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a useful feature to allow overriding the auto-generated Protected Resource Metadata (PRM) with a manually provided JSON file. The implementation is straightforward, adding a new command-line flag and handling the file serving logic in the prmHandler. The changes are well-tested with a new unit test covering the happy path.
I have one suggestion to improve the robustness of this feature by adding validation for the provided JSON file.
8aafe81 to
a6c368b
Compare
69ea36f to
aea7626
Compare
b28949b to
2f760ec
Compare
|
🚀 Cloudflare Preview Ready! 🔎 View Preview: https://pr-2717.toolbox-docs-6xc.pages.dev (Note: Subsequent pushes to this PR will automatically update the preview at this same URL) |
|
🧨 Preview deployments removed. |
|
🧨 Preview deployments removed. Cloudflare Pages environments for |
Add flag to allow manual PRM override. 283e4e3
Add flag to allow manual PRM override. 283e4e3
Add flag to allow manual PRM override. 283e4e3
Add flag to allow manual PRM override. 283e4e3
🤖 I have created a release *beep* *boop* --- ## [0.31.0](v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([#2831](#2831)) * **http:** sanitize non-2xx error output ([#2654](#2654)) * add a new `enable-api` flag ([#2846](#2846)) * remove deprecations and update tools-file flag ([#2806](#2806)) ### Features * Add a new `enable-api` flag ([#2846](#2846)) ([7a070da](7a070da)) * **auth:** Add generic `authService` type for MCP ([#2619](#2619)) ([f6678f8](f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([#2698](#2698)) ([b53dcf2](b53dcf2)) * **auth:** Support manual PRM override ([#2717](#2717)) ([283e4e3](283e4e3)) * **dataplex:** Add support for lookup context tool. ([#2744](#2744)) ([facb69d](facb69d)) * Remove deprecations and update tools-file flag ([#2806](#2806)) ([ab64c95](ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([#2859](#2859)) ([f8891b8](f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([#2853](#2853)) ([9ebd93a](9ebd93a)) * **http:** Sanitize non-2xx error output ([#2654](#2654)) ([5bef954](5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([#2847](#2847)) ([4564efe](4564efe)) ### Documentation * Release upgraded docsite ([#2831](#2831)) ([5b25ce0](5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.31.0](v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([#2831](#2831)) * **http:** sanitize non-2xx error output ([#2654](#2654)) * add a new `enable-api` flag ([#2846](#2846)) * remove deprecations and update tools-file flag ([#2806](#2806)) ### Features * Add a new `enable-api` flag ([#2846](#2846)) ([7a070da](7a070da)) * **auth:** Add generic `authService` type for MCP ([#2619](#2619)) ([f6678f8](f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([#2698](#2698)) ([b53dcf2](b53dcf2)) * **auth:** Support manual PRM override ([#2717](#2717)) ([283e4e3](283e4e3)) * **dataplex:** Add support for lookup context tool. ([#2744](#2744)) ([facb69d](facb69d)) * Remove deprecations and update tools-file flag ([#2806](#2806)) ([ab64c95](ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([#2859](#2859)) ([f8891b8](f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([#2853](#2853)) ([9ebd93a](9ebd93a)) * **http:** Sanitize non-2xx error output ([#2654](#2654)) ([5bef954](5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([#2847](#2847)) ([4564efe](4564efe)) ### Documentation * Release upgraded docsite ([#2831](#2831)) ([5b25ce0](5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([#2831](#2831)) * **http:** sanitize non-2xx error output ([#2654](#2654)) * add a new `enable-api` flag ([#2846](#2846)) * remove deprecations and update tools-file flag ([#2806](#2806)) ### Features * Add a new `enable-api` flag ([#2846](#2846)) ([7a070da](7a070da)) * **auth:** Add generic `authService` type for MCP ([#2619](#2619)) ([f6678f8](f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([#2698](#2698)) ([b53dcf2](b53dcf2)) * **auth:** Support manual PRM override ([#2717](#2717)) ([283e4e3](283e4e3)) * **dataplex:** Add support for lookup context tool. ([#2744](#2744)) ([facb69d](facb69d)) * Remove deprecations and update tools-file flag ([#2806](#2806)) ([ab64c95](ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([#2859](#2859)) ([f8891b8](f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([#2853](#2853)) ([9ebd93a](9ebd93a)) * **http:** Sanitize non-2xx error output ([#2654](#2654)) ([5bef954](5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([#2847](#2847)) ([4564efe](4564efe)) ### Documentation * Release upgraded docsite ([#2831](#2831)) ([5b25ce0](5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](googleapis/mcp-toolbox@v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([googleapis#2831](googleapis#2831)) * **http:** sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) * add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) * remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ### Features * Add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) ([7a070da](googleapis@7a070da)) * **auth:** Add generic `authService` type for MCP ([googleapis#2619](googleapis#2619)) ([f6678f8](googleapis@f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([googleapis#2698](googleapis#2698)) ([b53dcf2](googleapis@b53dcf2)) * **auth:** Support manual PRM override ([googleapis#2717](googleapis#2717)) ([283e4e3](googleapis@283e4e3)) * **dataplex:** Add support for lookup context tool. ([googleapis#2744](googleapis#2744)) ([facb69d](googleapis@facb69d)) * Remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ([ab64c95](googleapis@ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([googleapis#2859](googleapis#2859)) ([f8891b8](googleapis@f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([googleapis#2853](googleapis#2853)) ([9ebd93a](googleapis@9ebd93a)) * **http:** Sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) ([5bef954](googleapis@5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([googleapis#2847](googleapis#2847)) ([4564efe](googleapis@4564efe)) ### Documentation * Release upgraded docsite ([googleapis#2831](googleapis#2831)) ([5b25ce0](googleapis@5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](googleapis/mcp-toolbox@v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([googleapis#2831](googleapis#2831)) * **http:** sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) * add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) * remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ### Features * Add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) ([7a070da](googleapis@7a070da)) * **auth:** Add generic `authService` type for MCP ([googleapis#2619](googleapis#2619)) ([f6678f8](googleapis@f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([googleapis#2698](googleapis#2698)) ([b53dcf2](googleapis@b53dcf2)) * **auth:** Support manual PRM override ([googleapis#2717](googleapis#2717)) ([283e4e3](googleapis@283e4e3)) * **dataplex:** Add support for lookup context tool. ([googleapis#2744](googleapis#2744)) ([facb69d](googleapis@facb69d)) * Remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ([ab64c95](googleapis@ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([googleapis#2859](googleapis#2859)) ([f8891b8](googleapis@f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([googleapis#2853](googleapis#2853)) ([9ebd93a](googleapis@9ebd93a)) * **http:** Sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) ([5bef954](googleapis@5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([googleapis#2847](googleapis#2847)) ([4564efe](googleapis@4564efe)) ### Documentation * Release upgraded docsite ([googleapis#2831](googleapis#2831)) ([5b25ce0](googleapis@5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](googleapis/mcp-toolbox@v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([googleapis#2831](googleapis#2831)) * **http:** sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) * add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) * remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ### Features * Add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) ([7a070da](googleapis@7a070da)) * **auth:** Add generic `authService` type for MCP ([googleapis#2619](googleapis#2619)) ([f6678f8](googleapis@f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([googleapis#2698](googleapis#2698)) ([b53dcf2](googleapis@b53dcf2)) * **auth:** Support manual PRM override ([googleapis#2717](googleapis#2717)) ([283e4e3](googleapis@283e4e3)) * **dataplex:** Add support for lookup context tool. ([googleapis#2744](googleapis#2744)) ([facb69d](googleapis@facb69d)) * Remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ([ab64c95](googleapis@ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([googleapis#2859](googleapis#2859)) ([f8891b8](googleapis@f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([googleapis#2853](googleapis#2853)) ([9ebd93a](googleapis@9ebd93a)) * **http:** Sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) ([5bef954](googleapis@5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([googleapis#2847](googleapis#2847)) ([4564efe](googleapis@4564efe)) ### Documentation * Release upgraded docsite ([googleapis#2831](googleapis#2831)) ([5b25ce0](googleapis@5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](googleapis/mcp-toolbox@v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([googleapis#2831](googleapis#2831)) * **http:** sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) * add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) * remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ### Features * Add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) ([7a070da](googleapis@7a070da)) * **auth:** Add generic `authService` type for MCP ([googleapis#2619](googleapis#2619)) ([f6678f8](googleapis@f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([googleapis#2698](googleapis#2698)) ([b53dcf2](googleapis@b53dcf2)) * **auth:** Support manual PRM override ([googleapis#2717](googleapis#2717)) ([283e4e3](googleapis@283e4e3)) * **dataplex:** Add support for lookup context tool. ([googleapis#2744](googleapis#2744)) ([facb69d](googleapis@facb69d)) * Remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ([ab64c95](googleapis@ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([googleapis#2859](googleapis#2859)) ([f8891b8](googleapis@f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([googleapis#2853](googleapis#2853)) ([9ebd93a](googleapis@9ebd93a)) * **http:** Sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) ([5bef954](googleapis@5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([googleapis#2847](googleapis#2847)) ([4564efe](googleapis@4564efe)) ### Documentation * Release upgraded docsite ([googleapis#2831](googleapis#2831)) ([5b25ce0](googleapis@5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](googleapis/mcp-toolbox@v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([googleapis#2831](googleapis#2831)) * **http:** sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) * add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) * remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ### Features * Add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) ([7a070da](googleapis@7a070da)) * **auth:** Add generic `authService` type for MCP ([googleapis#2619](googleapis#2619)) ([f6678f8](googleapis@f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([googleapis#2698](googleapis#2698)) ([b53dcf2](googleapis@b53dcf2)) * **auth:** Support manual PRM override ([googleapis#2717](googleapis#2717)) ([283e4e3](googleapis@283e4e3)) * **dataplex:** Add support for lookup context tool. ([googleapis#2744](googleapis#2744)) ([facb69d](googleapis@facb69d)) * Remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ([ab64c95](googleapis@ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([googleapis#2859](googleapis#2859)) ([f8891b8](googleapis@f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([googleapis#2853](googleapis#2853)) ([9ebd93a](googleapis@9ebd93a)) * **http:** Sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) ([5bef954](googleapis@5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([googleapis#2847](googleapis#2847)) ([4564efe](googleapis@4564efe)) ### Documentation * Release upgraded docsite ([googleapis#2831](googleapis#2831)) ([5b25ce0](googleapis@5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
🤖 I have created a release *beep* *boop* --- ## [0.31.0](googleapis/mcp-toolbox@v0.30.0...v0.31.0) (2026-03-26) ### ⚠ BREAKING CHANGES * release upgraded docsite ([googleapis#2831](googleapis#2831)) * **http:** sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) * add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) * remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ### Features * Add a new `enable-api` flag ([googleapis#2846](googleapis#2846)) ([7a070da](googleapis@7a070da)) * **auth:** Add generic `authService` type for MCP ([googleapis#2619](googleapis#2619)) ([f6678f8](googleapis@f6678f8)) * **auth:** Add Protected Resource Metadata endpoint ([googleapis#2698](googleapis#2698)) ([b53dcf2](googleapis@b53dcf2)) * **auth:** Support manual PRM override ([googleapis#2717](googleapis#2717)) ([283e4e3](googleapis@283e4e3)) * **dataplex:** Add support for lookup context tool. ([googleapis#2744](googleapis#2744)) ([facb69d](googleapis@facb69d)) * Remove deprecations and update tools-file flag ([googleapis#2806](googleapis#2806)) ([ab64c95](googleapis@ab64c95)) ### Bug Fixes * **ci:** Remove search index generation from preview deployment workflow ([googleapis#2859](googleapis#2859)) ([f8891b8](googleapis@f8891b8)) * **docs:** Skip empty folders in pagination & reduce PR comment noise ([googleapis#2853](googleapis#2853)) ([9ebd93a](googleapis@9ebd93a)) * **http:** Sanitize non-2xx error output ([googleapis#2654](googleapis#2654)) ([5bef954](googleapis@5bef954)) * **skills:** Fix integer parameter parsing through agent skills ([googleapis#2847](googleapis#2847)) ([4564efe](googleapis@4564efe)) ### Documentation * Release upgraded docsite ([googleapis#2831](googleapis#2831)) ([5b25ce0](googleapis@5b25ce0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c6b811c
Add flag to allow manual PRM override.