Copilot commented on code in PR #13:
URL: 
https://github.com/apache/gravitino-mcp-gateway/pull/13#discussion_r4624652641


##########
docs/gravitino-mcp-gateway.md:
##########
@@ -98,7 +98,7 @@ The main settings are:
 | `GATEWAY_OAUTH_CLIENT_ID`, `GATEWAY_OAUTH_CLIENT_SECRET` | The gateway's 
OAuth client, for browser sign-in and token exchange. |
 | `TOKEN_EXCHANGE_STYLE` | `rfc8693`, or `entra_obo` for Entra's on-behalf-of 
flow, which is the default with `OIDC_PROVIDER=azure`. |
 | `JWT_AUDIENCE` | The audience that people's tokens must carry. Required. |
-| `GATEWAY_API_SCOPES` | Scopes that put `JWT_AUDIENCE` in a token, 
space-separated. MCP clients read them from the gateway's metadata, and the 
gateway's own sign-in asks for them too. With `OIDC_PROVIDER=azure`, 
`user_access` by default. |
+| `GATEWAY_API_SCOPES` | Scopes that put `JWT_AUDIENCE` in a token, 
space-separated. MCP clients read them from the gateway's metadata, and the 
gateway's own sign-in asks for them too. Add `offline_access` for clients that 
ask for a refresh token, such as Claude Code: Keycloak refuses a client that 
registered itself any scope it didn't register with. With 
`OIDC_PROVIDER=azure`, `user_access` by default. |

Review Comment:
   Please scope the `offline_access` recommendation to Keycloak. With 
`OIDC_PROVIDER=azure` and a configured client ID, `gateway_api_scopes` prefixes 
every bare scope with `api://<client ID>/` (`mcp_gateway/config.py:472–473`). 
Following this instruction with `GATEWAY_API_SCOPES="user_access 
offline_access"` therefore advertises `api://<client ID>/offline_access`, not 
the standard refresh-token scope, and can cause Entra authorization requests to 
fail with an invalid scope.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to