-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bridge and API server support #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…QTT relay settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There is a lot of unwraps on the code. You can handle all fatal errors or use expect to show a better message.
- You can improve the logs using env_logger or tracing-subscriber to make level of debug (info, debug, error, etc...)
Added docker and ci
…microservice-mqtt-bridge into feat/mqttRelayPrototype#SRV-534
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for bridges and an API server. It includes the necessary code changes and configuration updates.
Tutorial: Setting Up MQTT Relay within TagoIO
This tutorial will guide you through setting up an MQTT Relay within TagoIO. This setup allows for seamless communication between your devices and the TagoIO platform using MQTT. Follow the steps carefully to ensure proper configuration and functionality.
Step 1: Setup a Broker
Step 2: Create a Network in TagoIO
serial
. Use the following example:Step 3: Create a Connector
Step 4: Create a Device
Step 5: Generate Device Authorization
Step 6: Get the TagoIO API Server
Step 7: Configure the Relay
config.toml
file.Step 8: Run the Relay
Step 9: Connect to the Broker
Step 10: Monitor Data
Step 11: Test Downlink Behavior
/integration/network/publish
.By following these steps, you should have a fully functional MQTT Relay setup within TagoIO. This will enable efficient communication between your devices and the TagoIO platform.
Certificates
The API Endpoint for receiving publish messages from TagoIO requires the use of Certificates. TagoIO Certificates are currently stored at
Below are the instructions if you ever need to generate new certificates:
Step 1: Create the Root Certificate Authority (CA)
Generate the root key:
Create the root certificate:
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 3650 -out rootCA.pem -subj "/C=US/ST=North Carolina/L=Raleigh/O=TagoIO Inc./OU=IT/CN=TagoIO Root CA"
Step 2: Create the Server Certificate
Generate the server key:
Create a certificate signing request (CSR) for the server:
openssl req -new -key server.key -out server.csr -subj "/C=US/ST=North Carolina/L=Raleigh/O=TagoIO Inc./OU=IT/CN=TagoIO Server"
Create the server certificate using the root CA:
Step 3: Create the Client Certificate
Generate the client key:
Create a certificate signing request (CSR) for the client:
openssl req -new -key client.key -out client.csr -subj "/C=US/ST=North Carolina/L=Raleigh/O=TagoIO Inc./OU=IT/CN=TagoIO Client"
Create the client certificate using the root CA:
Step 4: Renew the Client Certificate
When the client certificate is about to expire, you can renew it by generating a new CSR and signing it with the root CA again.
Generate a new CSR for the client:
openssl req -new -key client.key -out client.csr -subj "/C=US/ST=North Carolina/L=Raleigh/O=TagoIO Inc./OU=IT/CN=TagoIO Client"
Create a new client certificate using the root CA:
Step 2: Store Certificates in Environment Variables
Store the Root CA Certificate in the Rust API environment:
Store the Client Certificate and Key in the NodeJS environment:
Step 3: Renew Client Certificate Annually
Generate a new Client Certificate signed by the Root CA by repeating step 1.2
Update the environment variables with the new certificate and key: