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

otel trace source and otel metrics source test coverage #5242

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

jmsusanto
Copy link
Contributor

Description

Adding additional test coverage for otel trace source and otel metrics source. Tests are for authentication handling and SSL/TLS validation

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…csSource authentication

Signed-off-by: Jeremy Michael <jsusanto@amazon.com>
}

@Test
void testHttpsFullJsonWithCustomPathAndAuthHeaderAndSsl_with_unsuccessful_response() throws InvalidProtocolBufferException {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we testing missing credentials (username/password) in this test case? If yes, I would suggest rename the test. If not, missing credentials in client can have a confounding factor causing unauth.

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 is meant for testing that if SSL is enabled on the server and a client attempts to connect without using SSL/TLS ], the connection will fail as expected. Made changes accordingly

}

@Test
void testHttpsFullJsonWithCustomPathAndAuthHeaderAndSsl_with_unsuccessful_response() throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

Signed-off-by: Jeremy Michael <jsusanto@amazon.com>
Copy link
Collaborator

@KarstenSchnitter KarstenSchnitter left a comment

Choose a reason for hiding this comment

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

Thanks for providing the additional tests. Looks good to me.

@dlvenable dlvenable merged commit 09a0528 into opensearch-project:main Dec 11, 2024
44 of 47 checks passed
sb2k16 pushed a commit to sb2k16/data-prepper that referenced this pull request Dec 13, 2024
…roject#5242)

Added security/authentication tests for OtelTraceSource and OTelMetricsSource authentication

Signed-off-by: Jeremy Michael <jsusanto@amazon.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.

4 participants