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

[BUG] Generating certificates should be optional for ./gradlew run #726

Closed
owaiskazi19 opened this issue May 4, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working untriaged

Comments

@owaiskazi19
Copy link
Member

owaiskazi19 commented May 4, 2023

What is the bug?

With the current changes merged to main #619. To run helloWorld from here the SSL certificates needs to be generated. Generation of this certificates should be optional and not impact the current ./gradlew run.

Exception in thread "main" OpenSearchSecurityException[Error while initializing transport SSL layer from PEM: OpenSearchException[Unable to read /Users/kazabdu/opensearch-sdk/config/certs/extension-01.pem (/Users/kazabdu/opensearch-sdk/config/certs/extension-01.pem). Please make sure this files exists and is readable regarding to permissions. Property: ssl.transport.pemcert_filepath]]; nested: OpenSearchException[Unable to read /Users/kazabdu/opensearch-sdk/config/certs/extension-01.pem (/Users/kazabdu/opensearch-sdk/config/certs/extension-01.pem). Please make sure this files exists and is readable regarding to permissions. Property: ssl.transport.pemcert_filepath];
        at org.opensearch.sdk.ssl.DefaultSslKeyStore.initTransportSSLConfig(DefaultSslKeyStore.java:395)
        at org.opensearch.sdk.ssl.DefaultSslKeyStore.initSSLConfig(DefaultSslKeyStore.java:230)
        at org.opensearch.sdk.ssl.DefaultSslKeyStore.<init>(DefaultSslKeyStore.java:152)
        at org.opensearch.sdk.NettyTransport.getNetty4Transport(NettyTransport.java:83)
        at org.opensearch.sdk.NettyTransport.initializeExtensionTransportService(NettyTransport.java:109)
        at org.opensearch.sdk.ExtensionsRunner.run(ExtensionsRunner.java:769)
        at org.opensearch.sdk.sample.helloworld.HelloWorldExtension.main(HelloWorldExtension.java:82)
Caused by: OpenSearchException[Unable to read /Users/kazabdu/opensearch-sdk/config/certs/extension-01.pem (/Users/kazabdu/opensearch-sdk/config/certs/extension-01.pem). Please make sure this files exists and is readable regarding to permissions. Property: ssl.transport.pemcert_filepath]
        at org.opensearch.sdk.ssl.DefaultSslKeyStore.checkPath(DefaultSslKeyStore.java:785)
        at org.opensearch.sdk.ssl.DefaultSslKeyStore.resolve(DefaultSslKeyStore.java:208)
        at org.opensearch.sdk.ssl.DefaultSslKeyStore.initTransportSSLConfig(DefaultSslKeyStore.java:365)
        ... 6 more

> Task :run FAILED

How can one reproduce the bug?

  1. Clone the repo
  2. Do a ./gradlew run

What is the expected behavior?

./gradlew run should run smoothly. Security settings should be commented and documented if requires to be run.

What is your host/environment?

MacOS

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Add any other context about the problem.

@owaiskazi19 owaiskazi19 added bug Something isn't working untriaged labels May 4, 2023
@owaiskazi19 owaiskazi19 changed the title [BUG] ./gradlew run requires generated certificates to run [BUG] ./gradlew run should not require to generate certificates May 4, 2023
@owaiskazi19 owaiskazi19 changed the title [BUG] ./gradlew run should not require to generate certificates [BUG] Generating certificates should be optional for ./gradlew run May 4, 2023
@owaiskazi19 owaiskazi19 changed the title [BUG] Generating certificates should be optional for ./gradlew run [BUG] Generating certificates should be optional for gradlew run May 4, 2023
@owaiskazi19 owaiskazi19 changed the title [BUG] Generating certificates should be optional for gradlew run [BUG] Generating certificates should be optional for ./gradlew run May 4, 2023
@owaiskazi19 owaiskazi19 self-assigned this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant