Skip to content

Auto-generate test PEM files at runtime for OpenSearch sink mTLS tests #6826

Closed

Description

@srikanthpadakanti

Description

The mTLS client certificate tests added in #6755 commit static PEM files to the test resources directory (test-client-cert.pem, test-client-key.pem, test-client-ca.pem, test-client-ca-key.pem). Per review feedback from @sb2k16 and @dlvenable , these should be generated programmatically at test runtime using BouncyCastle, following the pattern already established in ConnectionConfiguration_ServerTest.createTrustStoreFromPem().

What needs to change

  • Remove the committed PEM files from data-prepper-plugins/opensearch/src/test/resources/
  • Generate client CA, client certificate, and client key at test startup using BouncyCastle JcaX509CertificateConverter and JcaPKCS8Generator
  • Update ConnectionConfiguration_ServerTest.ClientCertificateConfiguration and ConnectionConfigurationTests to use the generated certs
  • Update the integration test OpenSearchClientCertIT to generate certs in its @BeforeAll setup

Context

This was identified during the review of #6755. The PR was merged with the static PEM files to unblock the feature, with agreement to follow up.

References

Activity

  1. srikanthpadakanti commented on May 7, 2026

    @srikanthpadakanti
    CollaboratorAuthor

    @sb2k16 Can you please remove the label untriage and add 2.16 version tag

  2. srikanthpadakanti commented on May 7, 2026

    @srikanthpadakanti
    CollaboratorAuthor

    @sb2k16 Also assign this to me.

  3. added
    maintenanceIssues to help maintain the project, such as improving builds, testing, etc.
    and removed on May 11, 2026
  4. added this to the v2.16 milestone on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

maintenanceIssues to help maintain the project, such as improving builds, testing, etc.

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions