adityamparikh opened a new pull request, #277: URL: https://github.com/apache/solr-mcp/pull/277
## Summary `solr.url` / `SOLR_URL` accepted a URL with user info, such as `http://admin:secret@solr:8983/solr/`. Those credentials never authenticate anything: SolrJ's `HttpJdkSolrClient` takes Basic auth only from `withBasicAuthCredentials`, which `SolrConfig` feeds from `solr.username` / `solr.password`. They do leak. SolrJ quotes the URL verbatim in its errors, and those reach logs, exported telemetry and MCP tool errors: ```text Error from server at http://admin:secret@solr:8983/solr/books: undefined field foo ``` `SolrConfigurationProperties` now rejects a `solr.url` with user info at startup: ```diff solr.url = http://solr:8983/solr/ → starts -solr.url = http://admin:secret@solr:8983/solr/ → starts; credentials ignored, then leaked +solr.url = http://admin:secret@solr:8983/solr/ → fails: use solr.username / solr.password ``` The message names `SOLR_USERNAME` / `SOLR_PASSWORD` and does not repeat the URL. `THREAT_MODEL.md` records the rule in the `SOLR_USERNAME` / `SOLR_PASSWORD` row and in invariant 5. #273 separately strips Solr URLs out of tool errors for everything else. ## Evidence - **Before:** a `SOLR_URL` with `admin:secret@` starts the server with no backend auth, and the first Solr error carries the password. **After:** `SolrConfigurationPropertiesTest` rejects a URL with a password and one with a username only, and asserts that the message contains neither. - `./gradlew build`: 521 tests, 0 failures, 0 skipped. ## Merge Danger **Door:** two-way **Blast Radius:** startup A deployment that puts credentials in `SOLR_URL` stops starting. Those credentials were never used, so its Solr calls were already unauthenticated. Moving them to `SOLR_USERNAME` / `SOLR_PASSWORD` turns auth on. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
