Repository navigation
Add AWS-LC support #990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add AWS-LC support #990
Changes from all commits
c2a61aa
48ad09c
a49c9ba
14aa7b5
698b29b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| package acceptance_tests | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "regexp" | ||
| "strings" | ||
|
|
||
| . "github.com/onsi/ginkgo/v2" | ||
| . "github.com/onsi/gomega" | ||
| ) | ||
|
|
||
| // Verifies that the SSL backend actually running on the VM matches the variant | ||
| // the release was assembled with (config.Variant, from the VARIANT env var). | ||
| // | ||
| // The signal is the running binary's `haproxy -vv`, which reports two dedicated | ||
| // lines describing the library loaded at runtime (verified against real output | ||
| // from AWS-LC 4.0.0 / OpenSSL 3.0.13): | ||
| // | ||
| // variant "Running on SSL library version : ..." "SSL library FIPS mode : ..." | ||
| // openssl OpenSSL 3.0.13 30 Jan 2024 (line absent) | ||
| // awslc AWS-LC 4.0.0 no | ||
| // awslc-fips AWS-LC FIPS 4.0.0 yes | ||
| var ( | ||
| runningSSLLibRe = regexp.MustCompile(`Running on SSL library version\s*:\s*(.+)`) | ||
| sslFIPSModeOnRe = regexp.MustCompile(`SSL library FIPS mode\s*:\s*yes`) | ||
| ) | ||
|
|
||
| var _ = Describe("SSL variant", func() { | ||
| It("Runs the HAProxy binary for the configured SSL variant", func() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very minor note regarding the output of the single test. It will be like: The first message could be shortened to "Tests the configured SSL variant" to avoid very long test case messages :) But as I mentioned above, very minor note, and it is your choice if you want to change it. |
||
| haproxyInfo, _ := deployHAProxy(baseManifestVars{ | ||
| haproxyBackendPort: 12000, | ||
| haproxyBackendServers: []string{"127.0.0.1"}, | ||
| deploymentName: deploymentNameForTestNode(), | ||
| }, []string{}, map[string]interface{}{}, true) | ||
|
|
||
| By("Reading the SSL library from the running HAProxy binary (haproxy -vv)") | ||
| versionInfo := runningHAProxyVersionInfo(haproxyInfo) | ||
| fmt.Fprintf(GinkgoWriter, "----- haproxy -vv (variant %q) -----\n%s\n", config.Variant, versionInfo) | ||
|
|
||
| match := runningSSLLibRe.FindStringSubmatch(versionInfo) | ||
| Expect(match).NotTo(BeNil(), "no 'Running on SSL library version' line in haproxy -vv:\n%s", versionInfo) | ||
| runningSSL := strings.TrimSpace(match[1]) | ||
|
|
||
| isAWSLC := strings.Contains(runningSSL, "AWS-LC") | ||
| fipsMode := sslFIPSModeOnRe.MatchString(versionInfo) | ||
|
|
||
| switch { | ||
| case strings.HasPrefix(config.Variant, "awslc-fips"): | ||
| By("Expecting AWS-LC FIPS") | ||
| Expect(isAWSLC).To(BeTrue(), "expected AWS-LC, running SSL library was %q", runningSSL) | ||
| Expect(fipsMode).To(BeTrue(), "expected FIPS mode on; haproxy -vv was:\n%s", versionInfo) | ||
| case strings.HasPrefix(config.Variant, "awslc"): | ||
| By("Expecting AWS-LC (non-FIPS)") | ||
| Expect(isAWSLC).To(BeTrue(), "expected AWS-LC, running SSL library was %q", runningSSL) | ||
| Expect(fipsMode).To(BeFalse(), "expected FIPS mode off; haproxy -vv was:\n%s", versionInfo) | ||
| default: | ||
| // openssl (VARIANT unset/openssl); patches are an orthogonal axis and don't change the library. | ||
| By("Expecting system OpenSSL") | ||
| Expect(runningSSL).To(ContainSubstring("OpenSSL"), "expected OpenSSL, running SSL library was %q", runningSSL) | ||
| Expect(isAWSLC).To(BeFalse(), "expected OpenSSL but found AWS-LC, running SSL library was %q", runningSSL) | ||
| Expect(fipsMode).To(BeFalse(), "expected FIPS mode off; haproxy -vv was:\n%s", versionInfo) | ||
| } | ||
| }) | ||
| }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,6 +135,6 @@ For creating a new release please follow the versioning guide based on the [Sema | |
|
|
||
| Used for documentation updates, changes in the test suite or any updates in the testing frameworks (e.g. ginkgo). | ||
|
|
||
| Since releases `11.16.3` and `11.17.5` the build metadata has been included into the version number. The build metadata denotes the contained HAProxy version. As an example, `11.16.2+2.6.9` means that HAProxy 2.6.9 is used. | ||
| Since releases `11.16.3` and `11.17.5` the build metadata (everything after the `+`) has been included in the version number to denote the contained upstream versions. Since version 17.0.0, it records both the HAProxy and the AWS-LC version: `17.0.0+3.2.26-awslc-4.0.0` means HAProxy 3.2.26 and AWS-LC 4.0.0. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it still true? I guess the release name will not continue the AWS-LS version after moving to a single release with multiple SSL libs.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it is. Because now, besides HAProxy, the AWS-LC version is the main pillar that denotes the release. I would like to keep it so that it's clear which versions we use in a release. E.g. we might bump AWS-LC but keep HAProxy version, and this bump was not obvious without this change. |
||
|
|
||
| The `haproxy-boshrelease` also contains patches (see [haproxy-patches](../haproxy-patches)). The patched version is a part of the build metadata and is denoted by appending a hyphen and key word `patched`, like `11.17.4+2.6.9-patched`. | ||
| The release bundles every SSL variant and the HAProxy community patches (see [haproxy-patches](../src/haproxy-patches)). One build is selected at deploy time via the `ha_proxy.ssl_variant` (`openssl` | `awslc` | `awslc-fips`) and `ha_proxy.include_haproxy_patches` (`true` | `false`) job properties. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any need of specific script to build dev release if
bosh create-release --force --timestamp-versionproduces the same?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really arguable with the single release now!
What this script now additionally does is proper release naming including the haproxy and awslc versions, and uploading to bosh, but we could decide to drop it entirely.