I am hoping to automate the install of Ignition, including creating a unique SQL Server local user per instance. I have the password securely stored within our backend, however through automation I will be retrieving it and then adding it to the config.json for the database connection. In this file, I see under the password section there are the following fields:
ciphertext
encrypted_key
iv
protected
tag
I assume this do what I need, however Im not sure how to do this. Lets say I have a plain text password and need to encrypt it in a format that I can add to this file that then Ignition can decrypt to create the connection. How would I go about this? Thanks!
Thanks. I will test this out, but also wondering if there is a library on the server that can be utilized, such as one of the .py files, vs calling the web url? The automation will be running on the same server Ignition is installed on. Also if using the api key approach, just add that to a post body?
Ok .. Im trying to test out the api approach but I cant seem to format the api key correctly. Its a post message right? Ive tried to pass in as header, in the body and as a api token, but I always get 401?
Yeah Ive tried most of what is in these docs and I keep getting a 401. Ive tried in Powershell, Curl and Postman with all same results. From everything I can I have this set up correctly. Ive tried several variations of including the key, such as a param and as a header.
Are you including the name portion of the API key you generated?
They look something like "MyKey:abcd1234..." and you need to include all of it, not just the stuff after the name.
When I set up my API keys I've always made sure the "API" security level I create had read, write, and access permissions, not just write... maybe that matters, though this endpoint in particular does require write access so not sure that's relevant.