Socket
Socket
Sign inDemoInstall

github.com/Ion-Mobility-Systems/golang-samples/iot

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Ion-Mobility-Systems/golang-samples/iot


Version published
Created
Source

Google Cloud IoT Core Device Manager Sample

Authentication

  • Create a project with the Google Cloud Console, and enable the Cloud IoT Core API.

  • From the Cloud Console, create a service account, download its json credentials file, then set the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS environment variable:

    export GCLOUD_PROJECT=your-project-id
    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json
    

Run the sample

To build and run the sample:

go run manager.go

Before you can connect devices, you will need to generate public / private key credentials to register and connect.

The following commands generate keys suitable for use on a single device.

openssl req -x509 -newkey rsa:2048 -days 3650 -keyout rsa_private.pem -nodes -out \
    rsa_cert.pem -subj "/CN=unused"
openssl ecparam -genkey -name prime256v1 -noout -out ec_private.pem
openssl ec -in ec_private.pem -pubout -out ec_public.pem

FAQs

Package last updated on 06 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc