update mcp-gateway authn/authz guides#110677
update mcp-gateway authn/authz guides#110677Patryk-Stefanski wants to merge 1 commit intoopenshift:mcp-gateway-docs-tpfrom
Conversation
|
🤖 Thu Apr 23 15:47:53 - Prow CI generated the docs preview: https://110677--ocpdocs-pr.netlify.app/rhcl/latest/mcp_gateway_config/mcp-gateway-authentication.html |
Signed-off-by: Patryk Stefanski <pstefans@redhat.com>
2f17d5e to
cd1c260
Compare
|
@Patryk-Stefanski: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| + | ||
| [source,json,subs="+quotes"] | ||
| ---- | ||
| $ oc patch gateway _<mcp_gateway>_ -n _<gateway_system>_ --type json -p '[ |
There was a problem hiding this comment.
should this section, lines 44-50 in the install doc be updated to match this?
- we can make the listener a prereq to this procedure
- add a note to the install doc that you need to config this listener to create authorization
- then we can remove the step from this procedure
WDYT?
| ---- | ||
| + | ||
| * The `"mcp-ns/arithmetic-mcp-server"` specification must match the namespaced name of the `MCPServerRegistration` CR. | ||
| * The `"mcp-ns/arithmetic-mcp-server"` specification must match the namespaced name of the `MCPServerRegistration` CR in the format `{namespace}/{name}`. For example, if your `MCPServerRegistration` is named `arithmetic-mcp-server` in the `mcp-ns` namespace, the {keycloak} client ID must be `mcp-ns/arithmetic-mcp-server`. |
There was a problem hiding this comment.
| * The `"mcp-ns/arithmetic-mcp-server"` specification must match the namespaced name of the `MCPServerRegistration` CR in the format `{namespace}/{name}`. For example, if your `MCPServerRegistration` is named `arithmetic-mcp-server` in the `mcp-ns` namespace, the {keycloak} client ID must be `mcp-ns/arithmetic-mcp-server`. | |
| * The `"mcp-ns/arithmetic-mcp-server"` specification must match the namespaced name of the `MCPServerRegistration` CR in the format `{namespace}/{name}`. For example, if your `MCPServerRegistration` CR is named `arithmetic-mcp-server` and is applied in the `mcp-ns` namespace, the {keycloak} client ID must be `mcp-ns/arithmetic-mcp-server`. |
| + | ||
| [IMPORTANT] | ||
| ==== | ||
| The authorization `AuthPolicy` must target the `mcps` listener, not the `mcp` listener. The `mcp` listener handles public traffic (`initialize`, `tools/list`, `/.well-known`) and has the authentication-only `AuthPolicy`. |
There was a problem hiding this comment.
| The authorization `AuthPolicy` must target the `mcps` listener, not the `mcp` listener. The `mcp` listener handles public traffic (`initialize`, `tools/list`, `/.well-known`) and has the authentication-only `AuthPolicy`. | |
| The authorization `AuthPolicy` CR must target the `mcps` listener, not the `mcp` listener. The `mcp` listener only handles public traffic and has an authentication-only `AuthPolicy` CR. |
| * Replace `spec.targetRef.name:` with the name of the `Gateway` CR. | ||
| * The `spec.targetRef.sectionName:` value targets the MCP server listener. | ||
| * Authentication: Validates the JWT token using the configured issuer URL | ||
| * The `spec.targetRef.sectionName:` value must be `mcps`, the internal listener for tool-call authorization. This listener must exist on your `Gateway` object. |
There was a problem hiding this comment.
| * The `spec.targetRef.sectionName:` value must be `mcps`, the internal listener for tool-call authorization. This listener must exist on your `Gateway` object. | |
| * The `spec.targetRef.sectionName:` value must be `mcps`, which is the internal listener for `tool/call` authorization. This listener must exist on your `Gateway` object. |
| ---- | ||
| $ oc apply -f _<mcp_tool_auth_policy.yaml>_ | ||
| $ oc apply -f - <<EOF | ||
| <AuthPolicy CR from the previous step> |
There was a problem hiding this comment.
| <AuthPolicy CR from the previous step> | |
| _<mcp_tool_auth_policy.yaml>_ |
user-replaceable values can only look like this
I also don't think the EOF works when we separate file creation from application? (having the yaml in one step and application of the resource in a second step is preferred in docs)
Version(s):
mcp-gateway-docs-tp
Issue:
OSDOCS-17719
OSDOCS-17718
Link to docs preview:
https://110677--ocpdocs-pr.netlify.app/rhcl/latest/mcp_gateway_config/mcp-gateway-authentication.html
https://110677--ocpdocs-pr.netlify.app/rhcl/latest/mcp_gateway_config/mcp-gateway-authorization.html
QE review:
Additional information:
See #109794 and #109672 for context.