Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions pkg/parser/schemas/main_workflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9657,11 +9657,32 @@
"type": "string"
},
"examples": [["*"], ["store_memory", "retrieve_memory"], ["brave_web_search"]]
},
"auth": {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot refactor auth data type and reference in JSON schema

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 02af79f. Extracted the inline auth definition into a new http_mcp_auth $defs type and replaced the inline definition in http_mcp_tool with "$ref": "#/$defs/http_mcp_auth", following the same pattern used by github_token, github_app, etc.

"$ref": "#/$defs/http_mcp_auth"
}
Comment on lines +9661 to 9663
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

The schema change adds support for mcp-servers.*.auth under http_mcp_tool, but there doesn’t appear to be a corresponding test case ensuring frontmatter with auth validates (there are existing MCP schema validation tests for url/headers in pkg/workflow/mcp_fields_schema_test.go). Adding a small test that compiles a workflow (or validates frontmatter) containing auth.type/auth.audience would help prevent future schema regressions.

Copilot uses AI. Check for mistakes.
},
"required": ["url"],
"additionalProperties": false
},
"http_mcp_auth": {
"type": "object",
"description": "Upstream authentication configuration for the HTTP MCP server. When configured, the gateway dynamically acquires tokens and injects them as Authorization headers on every outgoing request to this server. Currently only GitHub Actions OIDC is supported.",
"properties": {
"type": {
"type": "string",
"enum": ["github-oidc"],
"description": "Authentication type. Currently only 'github-oidc' is supported, which acquires short-lived JWTs from the GitHub Actions OIDC endpoint."
},
"audience": {
"type": "string",
"description": "The intended audience for the OIDC token (the 'aud' claim). If omitted, defaults to the server's url field.",
"format": "uri"
Comment on lines +9679 to +9680
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

auth.audience is declared with "format": "uri", but this schema otherwise avoids JSON Schema format validation (this is the only format usage in the file) and many string fields intentionally allow GitHub expressions (e.g., patterns like ...|^\$\{\{.*\}\}$). If the validator enforces formats (jsonschema/v6 typically does), ${{ ... }} audiences or other non-literal URIs will be rejected at frontmatter-parse time. Consider either removing the format constraint for consistency with http_mcp_tool.url, or using an anyOf/pattern that accepts either a URI or a ${{ ... }} expression.

Suggested change
"description": "The intended audience for the OIDC token (the 'aud' claim). If omitted, defaults to the server's url field.",
"format": "uri"
"description": "The intended audience for the OIDC token (the 'aud' claim). If omitted, defaults to the server's url field."

Copilot uses AI. Check for mistakes.
}
},
"required": ["type"],
"additionalProperties": false
},
"github_token": {
"type": "string",
"pattern": "^\\$\\{\\{\\s*(secrets\\.[A-Za-z_][A-Za-z0-9_]*(\\s*\\|\\|\\s*secrets\\.[A-Za-z_][A-Za-z0-9_]*)*|needs\\.[A-Za-z_][A-Za-z0-9_]*\\.outputs\\.[A-Za-z_][A-Za-z0-9_]*)\\s*\\}\\}$",
Expand Down
Loading