Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex IoT Core
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Sending messages
    • Subscribing a device or registry to receive messages
    • Viewing the connection log
    • Creating a trigger for a topic
    • Managing registries
      • Getting information about registries
      • Creating a registry
      • Updating a registry
      • Deleting a registry
    • Managing devices
      • Managing topic aliases
        • Creating an alias
        • Getting a list of aliases
        • Updating an alias
        • Deleting an alias
      • Getting information about devices
      • Creating a device
      • Updating a device
      • Deleting a device
    • Managing certificates
      • Create a certificate
      • Managing registry certificates
      • Managing device certificates
    • Managing passwords
      • Managing registry passwords
      • Managing device passwords
  • Concepts
    • Authorization
    • Relationship between service resources
    • MQTT broker connection parameters
    • Sending messages to an MQTT broker via gRPC
    • Topic
    • Backups
    • Quotas and limits
  • Use cases
    • All use cases
    • Working with Mosquitto
      • Sending messages
      • Subscribing a device or registry to receive messages
    • Working with Yandex IoT Core from an Android device in Java
    • Working with Yandex IoT Core in C#
    • Working with Yandex IoT Core in Java
    • Writing data from a device to Managed Service for PostgreSQL
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DeviceDataService
      • DeviceService
      • RegistryDataService
      • RegistryService
      • OperationService
    • REST
      • Overview
      • Device
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • list
        • listCertificates
        • listOperations
        • listPasswords
        • update
      • DeviceData
        • Overview
        • publish
      • Registry
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • list
        • listCertificates
        • listDeviceTopicAliases
        • listOperations
        • listPasswords
        • update
      • RegistryData
        • Overview
        • publish
  • Questions and answers
  1. Step-by-step instructions
  2. Managing passwords
  3. Managing device passwords

Managing device passwords

  • Adding a password to a device
    • Adding a password to an existing device
    • Setting a password for a device when creating it
  • Getting a list of device passwords
  • Deleting a device password

For devices and registries to begin exchanging data and commands, you need to log in. This section describes how to manage device passwords for the appropriate authorization method.

Note

When using an X.509 certificate along with a password, the password has higher priority.

  • Adding a password
  • Viewing a list of passwords
  • Deleting a password

Adding a password to a device

You can add a password to an already created device or set it when creating a device using the --password parameter.

Note

You can also set a password from the input stream. To do this, use the --read-password flag instead of the --password parameter.

Adding a password to an existing device

Management console
CLI

To add a password to an existing device:

  1. In the management console, select the folder where you want to add a password to an existing device.
  2. Select Yandex IoT Core.
  3. Select the registry with the desired device from the list.
  4. In the left part of the window, select Devices.
  5. Select the desired device from the list.
  6. Under Passwords, click Add password.
  7. In the Password field, set a password that you'll use to access the device.
    To do this, you can use a password generator.
    Don't forget to save your password because you'll need it later.
  8. Click Add.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

To add a password:

  1. Get a list of devices in the registry:

    $ yc iot device --registry-name my-registry list
    +----------------------+--------+
    |          ID          |  NAME  |
    +----------------------+--------+
    | arenak5ciqss6pbas5tm | second |
    | areqjd6un3afc3cefuio | first  |
    +----------------------+--------+
    
  2. Add a password to the device:

    $ yc iot device password add --device-name first --password Passw0rdForDevice
    device_id: areqjd6un3afc3cefcvm
    id: areqjd6un3afc3cefuio
    created_at: "2019-12-16T15:11:36.892167Z"
    

Setting a password for a device when creating it

Management console
CLI

For information about how to set a password for a device when creating it, see Creating a device.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

To set a password when creating a device:

  1. Get a list of registries in the folder:

    $ yc iot registry list
    +----------------------+-------------------+
    |          ID          |       NAME        |
    +----------------------+-------------------+
    | arenou2oj4ct42eq8f4m | my-registry       |
    +----------------------+-------------------+
    
  2. Create a device with a password:

    $ yc iot device create --registry-name my-registry --name device-with-pass --password Passw0rdForDevice
    id: arepomfambsg5biqc25n
    registry_id: arenou2oj4ct42eq8g3n
    created_at: "2019-12-16T15:18:39.358922Z"
    name: device-with-pass
    

Getting a list of device passwords

Management console
CLI

To view the list of device passwords:

  1. In the management console, select the folder where you want to get a list of device passwords.
  2. Select Yandex IoT Core.
  3. Select the registry with the desired device from the list.
  4. In the left part of the window, select Devices.
  5. Select the desired device from the list.
  6. On the Overview page, go to the Passwords section.

The list of device passwords is displayed in the Passwords section.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

To get a list of passwords:

  1. Get a list of devices in the registry:

    $ yc iot device --registry-name my-registry list
    +----------------------+------------------+
    |          ID          |       NAME       |
    +----------------------+------------------+
    | arenak5ciqss6pbas5tm | second           |
    | arepomfambsg5biqc77p | device-with-pass |
    | areqjd6un3afc3cefuio | first            |
    +----------------------+------------------+
    
  2. Get a list of device passwords:

    $ yc iot device password list --device-name device-with-pass
    +----------------------+---------------------+
    |          ID          |     CREATED AT      |
    +----------------------+---------------------+
    | areuin5t7pndvlj6n4tr | 2019-12-16 15:18:39 |
    +----------------------+---------------------+
    

Deleting a device password

Management console
CLI

To delete a device password:

  1. In the management console, select the folder to delete a device password from.
  2. Select Yandex IoT Core.
  3. Select the registry with the desired device from the list.
  4. In the left part of the window, select Devices.
  5. Select the desired device from the list.
  6. To the right of the password to delete, click , and select Delete from the drop-down list.
  7. In the window that opens, click Delete.

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

To delete a password:

  1. Get a list of device passwords:

    $ yc iot device password list --device-name device-with-pass
    +----------------------+---------------------+
    |          ID          |     CREATED AT      |
    +----------------------+---------------------+
    | areuin5t7pndvlj6n4tr | 2019-12-16 15:18:39 |
    +----------------------+---------------------+
    
  2. Delete the password:

    $ yc iot device password delete --device-name device-with-pass --password-id areuin5t7pndvlj6n4tr
    
  3. Make sure that the password was deleted:

    $ yc iot device password list --device-name device-with-pass
    +----+------------+
    | ID | CREATED AT |
    +----+------------+
    +----+------------+
    
In this article:
  • Adding a password to a device
  • Adding a password to an existing device
  • Setting a password for a device when creating it
  • Getting a list of device passwords
  • Deleting a device password
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC