I’m afraid that in order to use zato.security.basic-auth.change-password to change the password for the pubapi user I need to authenticate using pubapi.
So I need to know the automatically created password in order to change it.
Its a catch 22.
So far I used the web interface to setup Zato.
It works well for experimentation.
But now I want to roll out services using git version tags and Ansible.
So part of installing a service is a script that checks that the required entities (channels, security definitions, roles and whatnot) are present and configured correctly for the service.
And thus I need to know the password for pubapi.
Since this script can access the database it can find the password.
But that is not the proper way in my opinion.
So I tried to find a way to control the password, preferably when Zato is installed using Ansible.
zato service invoke might let me do just that.
I’m going to give it a try first thing tomorrow morning.
Thanks for the pointer!
There is still a lot to learn about Zato.
Certainly, this is all understood and you are right that there is no need to manually update anything in the database.
It’s just that you need to somehow prove that you can access the environment:
In web-admin you log in with credentials that let you do it
From command line, you have access to the server from an SSH session so you are already authenticated
From API, you need to provide a password
So in your situation with Ansible, I would just go for command line to change the initial password and follow up with API calls that could now use the newly configured password.