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

Fix nexus sample TLS settings #688

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/io/temporal/samples/nexus/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ temporal operator nexus endpoint create \
--name my-nexus-endpoint-name \
--target-namespace my-target-namespace \
--target-task-queue my-handler-task-queue \
--description-file ./service/description.md
--description-file ./core/src/main/java/io/temporal/samples/nexus/service/description.md
```

## Getting started with a self-hosted service or Temporal Cloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package io.temporal.samples.nexus.options;

import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts;
import io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
import io.grpc.netty.shaded.io.netty.handler.ssl.util.InsecureTrustManagerFactory;
import io.temporal.client.WorkflowClient;
Expand All @@ -27,13 +28,11 @@
import io.temporal.serviceclient.WorkflowServiceStubsOptions;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Arrays;
import javax.net.ssl.SSLException;
import org.apache.commons.cli.*;

public class ClientOptions {
public static WorkflowClient getWorkflowClient(String[] args) {
System.out.println(Arrays.toString(args));
Options options = new Options();
Option targetHostOption = new Option("target-host", true, "Host:port for the Temporal service");
targetHostOption.setRequired(false);
Expand Down Expand Up @@ -107,7 +106,7 @@ public static WorkflowClient getWorkflowClient(String[] args) {
if (insecureSkipVerify) {
sslContext.trustManager(InsecureTrustManagerFactory.INSTANCE);
}
serviceStubOptionsBuilder.setSslContext(sslContext.build());
serviceStubOptionsBuilder.setSslContext(GrpcSslContexts.configure(sslContext).build());
} catch (SSLException e) {
throw new RuntimeException(e);
} catch (FileNotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Service Name:
my-hello-service
NexusService
Operation Names:
echo
say-hello
hello

Input / Output arguments are in the following repository:
https://github.com/temporalio/samples-java/core/src/main/java/io/temporal/samples/nexus/service/NexusService.java
Loading