Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
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 brokers
      • Getting information about a broker
      • Creating a broker
      • Updating a broker
      • Deleting a broker
    • Managing certificates
      • Create a certificate
      • Managing registry certificates
      • Managing device certificates
      • Managing broker certificates
    • Managing passwords
      • Managing registry passwords
      • Managing device passwords
      • Managing broker passwords
  • Concepts
    • Authorization
    • Relationship between service resources
    • MQTT server connection parameters
    • Sending messages to an MQTT server via gRPC
    • Topic
      • Overview
      • Device topics
      • Registry topics
      • Subtopic
      • Using topics
    • Backups
    • Quotas and limits
  • Practical guidelines
    • All tutorials
    • 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
  • Devices API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DeviceDataService
      • DeviceService
      • RegistryDataService
      • RegistryService
      • OperationService
    • REST
      • Overview
      • DeviceData
        • Overview
        • publish
      • Device
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • getByName
        • list
        • listCertificates
        • listOperations
        • listPasswords
        • update
      • RegistryData
        • Overview
        • publish
      • Registry
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • getByName
        • list
        • listCertificates
        • listDeviceTopicAliases
        • listOperations
        • listPasswords
        • update
  • Broker API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BrokerDataService
      • BrokerService
      • OperationService
    • REST
      • Overview
      • BrokerData
        • Overview
        • publish
      • Broker
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • list
        • listCertificates
        • listOperations
        • listPasswords
        • update
  • Questions and answers
  1. Step-by-step instructions
  2. Managing passwords
  3. Managing broker passwords

Managing broker passwords

Written by
Yandex Cloud
  • Adding a password to a broker
    • Adding a password to an existing broker
    • Setting a password for a broker when creating it
  • Getting a list of broker passwords
  • Deleting a broker password

Note

The broker is at the Preview stage.

To start exchanging messages between broker clients, you must log in. This section describes how to manage broker passwords for the relevant authorization method.

Note

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

  • Adding a password
  • Viewing a password list
  • Deleting a password

Adding a password to a broker

You can add a password to an existing broker or set it when creating a broker 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 broker

Management console
CLI
API
  1. In the management console, select the folder where you want to add a password to an existing broker.
  2. Select Yandex IoT Core.
  3. Select the broker.
  4. Under Passwords, click Add password.
  5. In the Password field, enter the password you will use to access the broker. To create a password, you can use the password generator. Don't forget to save your password, you'll need it.
  6. Click Add.

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 add a password:

  1. Get a list of brokers in the folder:

    yc iot broker list
    

    Result:

    +----------------------+-------------------+
    |          ID          |       NAME        |
    +----------------------+-------------------+
    | arenou2oj4********** | my-broker         |
    +----------------------+-------------------+
    
  2. Add a password to the broker:

    yc iot broker password add --broker-name my-broker --password Passw0rdForBroker
    

    Result:

    	broker_id: arenou2oj4**********
    id: areuu2hgsv6klgbd4e6d
    created_at: "2019-12-16T15:32:46.655139Z"
    

You can add a broker password using the API addPassword method.

Setting a password for a broker when creating it

Management console
CLI
API

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

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.

Create a broker with a password:

yc iot broker create --name broker-with-pass --password Passw0rdForDevice

Result:

	done (1s)
id: areg96c8lo**********
folder_id: b1g88tflru**********
created_at: "2019-12-16T15:34:25.563Z"
name: broker-with-pass
status: ACTIVE
log_group_id: ckghhil3b5**********

You can set a broker password when creating it using the API create method.

Getting a list of broker passwords

Management console
CLI
API
  1. In the management console, select the folder where you want to get a list of broker passwords.
  2. Select Yandex IoT Core.
  3. Select the broker.
  4. On the Overview page, go to 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 brokers in the folder:

    yc iot broker list
    

    Result:

    +----------------------+--------------------+
    |          ID          |        NAME        |
    +----------------------+--------------------+
    | areg96c8lo********** | broker-with-pass   |
    | arenou2oj4********** | my-broker          |
    +----------------------+--------------------+
    
  2. Get a list of broker passwords:

    yc iot broker password list --broker-name broker-with-pass
    

    Result:

    	+----------------------+---------------------+
    |          ID          |     CREATED AT      |
    +----------------------+---------------------+
    | are0gffs95********** | 2019-12-16 15:34:25 |
    +----------------------+---------------------+
    

You can get a list of broker passwords using the API listPasswords method.

Deleting a broker password

Management console
CLI
API
  1. In the management console, select the folder to delete the broker password from.
  2. Select Yandex IoT Core.
  3. Select the broker.
  4. In the row with the password you need, click and select Delete from the drop-down list.
  5. 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 broker passwords:

    yc iot broker password list --broker-name broker-with-pass
    

    Result:

    	+----------------------+---------------------+
    |          ID          |     CREATED AT      |
    +----------------------+---------------------+
    | are0gffs95********** | 2019-12-16 15:34:25 |
    +----------------------+---------------------+
    
  2. Delete the password:

    yc iot broker password delete --broker-name broker-with-pass --password-id are0gffs957egmoksgf4
    
  3. Make sure that the password was deleted:

    yc iot broker password list --broker-name broker-with-pass
    

    Result:

    	+----+------------+
    | ID | CREATED AT |
    +----+------------+
    +----+------------+
    

You can delete a broker password using the API deletePassword method.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Adding a password to a broker
  • Adding a password to an existing broker
  • Setting a password for a broker when creating it
  • Getting a list of broker passwords
  • Deleting a broker password