What encryption mechanism is used for data source password?

  • What Grafana version and what operating system are you using?
    9.2.3

  • What are you trying to achieve?

Hi geeks, I want to know what the mechanism for password encryption is. After
starting a Grafana process, I add a data source for Grafana. Then, the
process will insert a record into the metadata. For defaults, the metadata
stored in data/grafana.db, using SQLite, and the data source record is stored
in the table data_source. One of the table fields is
secure_json_data which records ciphertext for the connection password.
It looks using symmetrical encryption, I think.
I want to know how to decrypt this ciphertext.
And I wonder how I can add a new
data source using a command line. I only understand users can update that using the website, it is not a friendly approach for developers.

  • How are you trying to achieve it?
    As posted above.

  • What happened?
    None

  • What did you expect to happen?
    None

  • Can you copy/paste the configuration(s) that you are having problems with?
    None

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    None

  • Did you follow any online instructions? If so, what is the URL?
    None