Skip to content
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

feat(scalingengine): Integrate cf api with scalingengine #3425

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

bonzofenix
Copy link
Contributor

@bonzofenix bonzofenix commented Dec 15, 2024

Overview

Patches TLS config to send identity cert provided by cf when API component performs a request to scaling engine

Key changes

  • Security schemes for APIKey and Bearer authentication were added to the OpenAPI specification.
  • Enhanced test coverage for the Scaling History API, including new tests for the scaling_histories endpoint.
  • loads CF_INSTANCE_CERT and CF_INSTANCE_KEY env variable in API scaling engine client TLS config.

bonzofenix and others added 30 commits December 3, 2024 13:52
Co-authored-by: Silvestre Zabala <[email protected]>
Co-authored-by: Silvestre Zabala <[email protected]>
 • Remove direct sha256 usage in PublicApiHandler and replace with new auth.Cert abstraction.
 • Add auth.NewCert and auth.Cert.GetXFCCHeader to manage certificate encoding and header creation.
 • Update PublicApiHandler and tests to use the new auth.Cert methods for setting the X-Forwarded-Client-Cert header.
 • Adjust testhelpers.GenerateClientCert and testhelpers.SetXFCCCertHeader to align with new certificate handling logic.
 - handle CF_INSTANCE_CERT and CF_INSTANCE_KEY
 - Remove `CfInstanceCert` from `Config` struct and related code
 - Generate RSA keys and certificates for testing in `api_test.go` and `config_test.go`
 - Set environment variables for instance keys and certs in tests
 - Update `config#configureEventGenerator` to use environment variables for TLS config
 - Remove unused `auth` import and related code in `public_api_handler.go`
 - Create `MaterializeContentInFile` function in `configutil` for file operations
 - Add `GenerateClientCertWithPrivateKey` and `GenerateClientKeyWithPrivateKey` in `testhelpers`
@bonzofenix bonzofenix changed the title Integrate cf api with scalingengine feat(scalingengine): Integrate cf api with scalingengine Dec 15, 2024
@bonzofenix bonzofenix self-assigned this Dec 15, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
10.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant