version: fix ill-formed User-Agent header (#8796)

resolve: https://github.com/open-policy-agent/opa/issues/8792

I added a note in the Changelog that should hopefully be enough?

---------

Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
This commit is contained in:
Sebastian Spaink
2026-06-23 08:18:19 -05:00
committed by GitHub
parent 1fdbb77dd6
commit 02ce276093
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -5,6 +5,13 @@ project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased
### Breaking: Fix User-Agent according to RFC9110
> OPA's outbound HTTP requests (bundle, discovery, decision log, status, `http.send`, AWS KMS/ECR)
> previously sent `User-Agent: Open Policy Agent/<version> (<os>, <arch>)`, which is not a valid
> RFC 9110 `User-Agent` value because the `product` token cannot contain spaces. The header is now
> `Open-Policy-Agent/<version> (<os>, <arch>)`. Server-side log filters or WAF rules that
> exact-match the old string will need to be updated.
## 1.17.1
This release uses the latest version of Go (1.26.4) to build OPA, fixing stdlib vulnerabilities in
+1 -1
View File
@@ -33,4 +33,4 @@ func Write(ctx context.Context, store storage.Store, txn storage.Transaction) er
}
// UserAgent defines the current OPA instances User-Agent default header value.
var UserAgent = fmt.Sprintf("Open Policy Agent/%s (%s, %s)", version.Version, runtime.GOOS, runtime.GOARCH)
var UserAgent = fmt.Sprintf("Open-Policy-Agent/%s (%s, %s)", version.Version, runtime.GOOS, runtime.GOARCH)