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: support testing TLS options with two new capabilities #208

Merged
merged 22 commits into from
May 10, 2024

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Apr 26, 2024

So far we haven't tested SDKs using https protocol in contract tests.

This is usually not a problem since each language has some http library that is probably well tested. But, it's a bit more manual in some languages, including C++.

This PR adds two new capabilities. The first is tls:skip-verify-peer. If provided, then the SDK under test will receive:

  • skipVerifyPeer bool: whether or not the peer should be verified

This allows for tests of streaming/polling/events under the https protocol using a self-signed certificate.

The second is tls:verify-peer. If provided, the harness will make the SDK under test connect using https and present a self-signed certificate. This should be rejected by the SDK.

In this initial PR, there is no support for configuring a CA. When I add that support, it will be a 3rd capability that interacts with the other two.

"github.com/launchdarkly/sdk-test-harness/v2/framework"
)

// TestServiceInfo is status information returned by the test service from the initial status query.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been refactored out into a new single-purpose serviceinfo package because I needed to introduce a circular dependency.

certificate/cert.crt Outdated Show resolved Hide resolved
@cwaldren-ld cwaldren-ld marked this pull request as ready for review May 8, 2024 23:47
@cwaldren-ld cwaldren-ld requested a review from a team May 8, 2024 23:47
@cwaldren-ld cwaldren-ld changed the title feat: support https feat: support testing TLS options with two new capabilities May 9, 2024
framework/harness/certificate/cert.crt Outdated Show resolved Hide resolved
framework/harness/certificate/gen.sh Outdated Show resolved Hide resolved
sdktests/common_tests_base.go Show resolved Hide resolved
@tanderson-ld tanderson-ld self-requested a review May 10, 2024 19:50
@cwaldren-ld cwaldren-ld merged commit 6a90eb0 into v2 May 10, 2024
2 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/sc-239174/tls branch May 10, 2024 21:00
cwaldren-ld pushed a commit that referenced this pull request May 10, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.13.0](v2.12.0...v2.13.0)
(2024-05-10)


### Features

* support testing TLS options with two new capabilities
([#208](#208))
([6a90eb0](6a90eb0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants