gnodet opened a new pull request, #14205: URL: https://github.com/apache/maven/pull/14205
Port of #14203 (`maven-3.10.x`) to `master`. ## Summary Wire `<configuration><httpHeaders>` entries into `AuthenticationBuilder` token headers, so that bearer tokens and custom HTTP authentication headers stored in `settings.xml` are: - **Origin-scoped** by the Resolver's `addBearerToken`/`addTokenHeader` path, so tokens are never sent to cross-origin redirects - **RFC 9110 validated** by `HttpTransporterUtils.isValidTokenHeaderName` before being added to the `Authentication` - Moved `authSelector.add()` to after the headers loop so token headers are included in the built `Authentication` object ## Difference from 3.10.x port No change to `compat/maven-settings-builder` or any decryption code needed here. `DefaultSettingsBuilder` in `impl/maven-impl` already decrypts all `configuration` XmlNode values via its `DecryptingSettingsTransformer`, which walks the DOM tree recursively and calls `transform(String)` on every leaf value — including `httpHeaders` property values. The only changes are: 1. `impl/maven-core` — `DefaultRepositorySystemSessionFactory`: wire token headers into `AuthenticationBuilder` 2. `pom.xml`: bump `resolverVersion` to `2.0.27-SNAPSHOT` (required for `isValidTokenHeaderName`, `addBearerToken`, `addTokenHeader`) Licensed under the Apache License, Version 2.0. I confirm that my contribution is made under the terms of the Apache License Version 2.0. -- 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]
