secure-channel create


ockam secure-channel create [OPTIONS] --from <NODE> --to <ROUTE>

When a secure channel is created between two nodes they mutually authenticate each other using their Ockam Identity. Once the channel is created, you can send messages through through it using the returned address.

Options

  • --from <NODE>
    Node from which to initiate the secure channel

  • --to <ROUTE>
    Route to a secure channel listener

  • -a, --authorized [IDENTIFIER] (optional)
    Identifiers authorized to be presented by the listener

  • --identity [IDENTITY_NAME] (optional)
    Run the command as the given identity name

  • -c, --credential [CREDENTIAL] (optional)
    Name of a stored Credential to use within this Secure Channel

Examples

Every node, created with Ockam Command, starts a secure channel listener at address /service/api. Let's create a secure channel between two nodes and send a message from one node to another.

$ ockam node create a
$ ockam node create b
$ ockam secure-channel create --from a --to /node/b/service/api
  Created Secure Channel:
  • From: /node/a
  •   To: /node/b/service/api (/ip4/127.0.0.1/tcp/53483/service/api)
  •   At: /service/d92ef0aea946ec01cdbccc5b9d3f2e16

$ ockam message send hello --from a --to /service/d92ef0aea946ec01cdbccc5b9d3f2e16/service/uppercase
HELLO