Register cnspec
If you install cnspec on an asset using a system package instead of Mondoo’s automated installation script, you must register the asset manually.
If you need to automate registering cnspec, read Registering cnspec Using a Credentials File.
-
Log into the Mondoo Console.
-
Navigate to the region, organization, and space where you want to see the new asset's scan results.
-
In the left navigation, under Integrations, select Add New Integration.
-
Select your operating system and copy the registration token.
-
Open a terminal and run this command:
Register cnspeccnspec login --token "<PASTE_YOUR_TOKEN_HERE>"
This command uses the token to create a service account that lets cnspec report results to Mondoo Platform.
For cnspec to continuously transmit results to the Mondoo Platform, the Mondoo configuration must be stored in a specific location. To do this, use the cnspec --config
parameter:
- Windows:
cnspec login --token "<PASTE_YOUR_TOKEN_HERE>" --config "C:\ProgramData\Mondoo\mondoo.yml"
- Linux:
cnspec login --token "<PASTE_YOUR_TOKEN_HERE>" --config "/etc/opt/mondoo/mondoo.yml"
Communication with Mondoo Platform is encrypted using HTTPS. The payload is signed to ensure it has not been tampered with.
Validate registration
The cnspec status
command validates cnspec registration and ensures that communication with Mondoo Platform is successful.
cnspec status
→ loaded configuration from /Users/stella/.config/mondoo/mondoo.yml using source default
→ Platform: macos
→ Version: 13.4.1
→ Hostname: stella.home
→ IP: 192.168.254.21
→ Time: 2024-03-23T12:07:41-08:00
→ Version: 10.8.4 (API Version: 10)
→ Latest Version: 10.8.4