Skip to content
Open
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
14 changes: 14 additions & 0 deletions docs/encyclopedia/nexus/nexus-security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ See the [encryption sample](https://github.com/temporalio/samples-go/blob/main/e
Use wrapper types (for example, `EndpointValue`) so the Data Converter selects an Endpoint-specific encryption key.
This encrypts only Nexus traffic with a dedicated key, without sharing Namespace keys across teams.

:::warning Limited to string-based operation names

When calling `ExecuteOperation` with a non-string operation (for example, an operation definition or reference), the wrapper changes the input type and `ExecuteOperation` fails type-checking:

```
cannot assign argument of type "<WrapperType>" to type "<ActualInputType>"
```

This approach only works when the operation is passed as a string name.
For typed operations, pass the Nexus endpoint info through the workflow context instead of the wrapped input.
This requires a Nexus workflow outbound interceptor and a context-aware codec converter, and does not work with synchronous operations.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does not work with synchronous operations

Is this true? I don't have enough knowledge to know for sure, will need to get someone from the Nexus team to confirm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we have a concept of a context-aware codec converter so I don't think this section is correct? Where did this information come from?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AH but that requires a whole customer DataConverter, not just a context-aware codec converter.


:::

See the [draft endpoint-based encryption sample](https://github.com/temporalio/samples-go/compare/main...bergundy:samples-go:nexus-encryption-by-endpoint).

### Choosing an approach
Expand Down