Internet of Things
AWS IoT Core device identity, fleet provisioning and Device Defender audit, detect and mitigation.
AWS IoT Core connects devices that prove their identity with X.509 certificates. IoT policies then decide what each certificate may do. AWS IoT Device Defender audits the fleet configuration and watches device behavior.
Service table
| Service | What it is | Exam fact | Security controls |
|---|---|---|---|
| AWS IoT Core | Device gateway, message broker, rules engine and registry | Devices authenticate with X.509 client certificates. IoT policies authorize them | X.509 certificate chains for server and client authentication, IoT policies, TLS 1.2 required, data encrypted at rest under AWS owned keys by default with a customer managed KMS key option, interface VPC endpoints, CloudWatch Logs, CloudTrail |
| AWS IoT Device Defender | Fleet security service with Audit and Detect | Audit checks configuration. Detect watches behavior against security profiles | Scheduled or on-demand audits, behavior alarms, mitigation actions with their own execution role |
Fleet provisioning
Fleet provisioning gets unique certificates onto devices that ship without one. A provisioning template defines the things, certificates and policies to create.
| Method | Flow |
|---|---|
| By claim | Device ships with a shared provisioning claim certificate and key. It connects, swaps them for a unique certificate by calling CreateKeysAndCertificate or CreateCertificateFromCsr, then calls RegisterThing and reconnects with the new certificate |
| By trusted user | An installer or end user signs in to an app. The app calls CreateProvisioningClaim and passes a temporary claim certificate, valid five minutes, to the device |
- The claim certificate's IoT policy should allow only the provisioning topics. Guard its private key and deactivate the certificate if you see misuse.
- The ownership token from certificate creation expires after one hour. An unactivated, unattached certificate is deleted at expiry.
- A pre-provisioning hook is a Lambda function that returns
allowProvisioningto approve or reject a device and can override template parameters. - The provisioning role carries the
AWSIoTThingsRegistrationmanaged policy and trusts the IoT service.
Legacy
Some study notes describe just-in-time provisioning as a temporary certificate swapped for a permanent one. That swap is what fleet provisioning by claim does. Fleet provisioning has two options, claim and trusted user, with an optional pre-provisioning hook.
Device Defender
| Capability | What it does |
|---|---|
| Audit | Checks account and fleet configuration. Examples are device certificates expiring, revoked certificates still active, certificates shared by devices and weak key quality |
| Detect | Compares device behavior with a security profile and raises violations |
| Mitigation actions | Automated responses tied to findings or violations. UPDATE_DEVICE_CERTIFICATE can only deactivate the certificate. ADD_THINGS_TO_THING_GROUP moves devices into a named group such as a quarantine group |
- Each mitigation action runs under an execution role. Certificate updates need
iot:UpdateCertificate. Group changes neediot:ListPrincipalThingsandiot:AddThingToThingGroup. - Device Defender does not roll mitigations back. Reactivating a certificate is manual.
Exam signal
"Compromised device keeps connecting" is deactivate its certificate, or quarantine it by moving it to a thing group whose policy denies everything. "Find certificates shared across devices" is a Device Defender audit check.
Exam trap
IAM policies do not authorize devices that connect with certificates. An IoT policy attached to the certificate does. IAM and Cognito credentials suit apps and AWS callers, not constrained devices.
Related
Application integration covers SNS alerts. GuardDuty covers account-level threats that Device Defender does not.
Further reading
- https://docs.aws.amazon.com/iot/latest/developerguide/security.html
- https://docs.aws.amazon.com/iot/latest/developerguide/authentication.html
- https://docs.aws.amazon.com/iot/latest/developerguide/data-protection.html
- https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html
- https://docs.aws.amazon.com/iot-device-defender/latest/devguide/dd-mitigation-actions.html