Repository navigation
release: v1.20.1 — credentials in the OAuth URLs refused, and kept out of several startup refusals - #309
Merged
Conversation
…t of several startup refusals Bump all packages 1.20.0 -> 1.20.1 and the pinned image tags (README, quickstart + scaffold docker-compose). Ships the changes already on main since v1.20.0: - #302 `auth.resource` and the `auth.authorizationServers` entries are refused at startup when they carry userinfo - a user name, a password, or both. Since v1.13.0 neither was checked for it. A credential in either one was quoted by the startup refusals and by the `allowInsecureHttp` warning, and when the URL was otherwise accepted it was printed on the startup line and served in the RFC 9728 protected-resource metadata, which is unauthenticated by design. The refusal for a value that does not parse no longer quotes it, nor does the scheme refusal for an `authorizationServers` entry; an entry is named by its index (`auth.authorizationServers[1]`) instead. - #305 an `auth.authorizationServers` entry with a non-empty query or fragment is refused at startup. RFC 8414 defines an issuer identifier as having neither, and the metadata served the entry as given, so anything carried there was published with it. - #305 two startup refusals stop quoting the value they refuse. The `kozou` config check that refuses `server.mcp.http.advertisedUrl` with a query or a fragment now names the key alone, as `startHttpServer`'s option already did. It had quoted the whole value since v1.18.0, and a query or fragment is where a token usually goes. An `allowedHosts` entry that is refused - as a URL, as a path, or because no hostname can be read from it - is now named by its index (`allowedHosts[1]`) rather than quoted, in the `kozou` config check and in `startHttpServer` alike. The same values are refused as before. Behaviour changes for embedders and operators: - An OAuth config (`server.mcp.http.auth`, or `startHttpServer`'s `auth` option) whose `resource` or `authorizationServers` entry carries userinfo, or whose `authorizationServers` entry carries a non-empty query or fragment, now fails at startup. Most such configs used to start. One that was already refused - for plaintext http, or for a query in `resource` - is now refused for the userinfo, or for the query in the entry, first. - The refusals listed above name a key or an index where they quoted a value; other refusals are unchanged. When `KOZOU_MCP_HTTP_ALLOWED_HOSTS` holds empty items, the index counts only the non-empty ones, so it can differ from the item's position in the variable (#308). Not covered: a password made only of digits with no `@` after it (`https://user:4321/mcp`) parses as a host and a port, and cannot be told apart from one, so such a value is still accepted as a host and a port.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump all packages 1.20.0 -> 1.20.1 and the pinned image tags (README,
quickstart + scaffold docker-compose). Ships the changes already on main since
v1.20.0:
auth.resourceand theauth.authorizationServersentries are refusedat startup when they carry userinfo - a user name, a password, or both. Since
v1.13.0 neither was checked for it. A credential in either one was quoted by
the startup refusals and by the
allowInsecureHttpwarning, and when the URLwas otherwise accepted it was printed on the startup line and served in the
RFC 9728 protected-resource metadata, which is unauthenticated by design. The
refusal for a value that does not parse no longer quotes it, nor does the
scheme refusal for an
authorizationServersentry; an entry is named by itsindex (
auth.authorizationServers[1]) instead.auth.authorizationServersentry with a non-empty query or fragmentis refused at startup. RFC 8414 defines an issuer identifier as having
neither, and the metadata served the entry as given, so anything carried
there was published with it.
kozouconfig check that refuses
server.mcp.http.advertisedUrlwith a query or afragment now names the key alone, as
startHttpServer's option already did.It had quoted the whole value since v1.18.0, and a query or fragment is where
a token usually goes. An
allowedHostsentry that is refused - as a URL, as apath, or because no hostname can be read from it - is now named by its index
(
allowedHosts[1]) rather than quoted, in thekozouconfig check and instartHttpServeralike. The same values are refused as before.Behaviour changes for embedders and operators:
server.mcp.http.auth, orstartHttpServer'sauthoption) whose
resourceorauthorizationServersentry carries userinfo, orwhose
authorizationServersentry carries a non-empty query or fragment, nowfails at startup. Most such configs used to start. One that was already
refused - for plaintext http, or for a query in
resource- is now refusedfor the userinfo, or for the query in the entry, first.
other refusals are unchanged. When
KOZOU_MCP_HTTP_ALLOWED_HOSTSholds emptyitems, the index counts only the non-empty ones, so it can differ from the
item's position in the variable (allowedHosts[N] in a refusal does not match the item's position in KOZOU_MCP_HTTP_ALLOWED_HOSTS when the list has empty items #308).
Not covered: a password made only of digits with no
@after it(
https://user:4321/mcp) parses as a host and a port, and cannot be told apartfrom one, so such a value is still accepted as a host and a port.