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

  • -c, --credential [CREDENTIAL] (optional)

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

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
  ✔ Secure Channel at /service/a2b1a2275d02308a7920499b5f49e4ee created successfully
  From /node/n1 to /node/n2/service/api

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