Device certificate management
  • Shell 84.9%
  • Python 12%
  • Dockerfile 3.1%
Find a file
Didier Wenzek 8b4c0dd710 Update the README.md
Signed-off-by: Didier Wenzek <didier.wenzek@acidalie.com>
2022-01-26 17:56:59 +00:00
micro-service Rename est endpoint 2021-10-21 16:39:16 +01:00
scripts Update the README.md 2022-01-26 17:56:59 +00:00
.gitignore Creation of the micro-service image 2021-10-19 18:12:17 +01:00
LICENSE Initial commit 2021-10-15 16:58:25 +01:00
README.md Update the README.md 2022-01-26 17:56:59 +00:00

nexus-thin-edge

A POC to evaluate device certificate creation with thin-edge.io, Cumulocity IoT and Nexus Go IoT.

This repository contains no credentials: you will need an account on Cumulocity and another one on Nexus to run the demo.

Demo

Preparation

Check no certificate, no connection

sudo tedge disconnect c8y
sudo tedge config set device.cert.path /etc/tedge/device-certs/device-cert.pem
sudo tedge config set device.key.path /etc/tedge/device-certs/device-key.pem

User experience

sudo tedge cert show
./tedge cert request c8y latest.stage.c8y.io t398942 didier demo-device-001
sudo tedge cert show
sudo tedge connect c8y

Behind the scene

The first step is to create a signing request

./create-signing-request.sh didier-device t398942 didier-device.key didier-device.csr
./decode-csr.sh didier-device.csr | less

Then one needs to request Cumulocity for a password

curl --user t398942/didier:$(read -s -p "Password: "; echo $REPLY) https://latest.stage.c8y.io/service/tedge-device-registry/register/didier-device

This password can then be used to authenticate the signing request

curl -s -k -H "Content-Type: application/pkcs10" --data-binary @didier-device.csr --digest --user USER:PASS URL
./post-signing-request.sh didier-device.csr thinedge 543210 >didier-device.pem
./decode-pem.sh didier-device.pem | less