Authenticate the Gateway After Manual Registration

This example starts the Gateway, and authenticates it. The Gateway must have an asymmetric key pair for signing. This is provided in the /path/to/iot-edge/examples/resources directory. The source code for this example is in /path/to/iot-edge/cmd/gateway/main.go.

Before you run the example, register the Gateway manually (using manual-gateway as the ID):

  1. Start the Gateway:

    cd /path/to/iot-edge
    ./ gateway \
    --name "manual-gateway" \
    --url "" \
    --audience "/" \
    --realm "/" \
    --tree "auth-tree" \
    --kid "pop.cnf" \
    --key "./examples/resources/eckey1.key.pem" \
    --address ":5683" \
    commandline options
      realm: /
      tree: auth-tree
      name: manual-gateway
      address: :5683
      key: ./examples/resources/eckey1.key.pem
      kid: pop.cnf
      timeout 5s
      debug: true
    IoT Gateway server started.

    The Gateway is now started and has authenticated itself to AM.

  2. In a separate terminal window, connect a Thing to the Gateway.

  3. To stop the gateway process, press Ctrl+C in the terminal window where the process is running.

Read a different version of :