User Management
- After the system is installed, the default users are as follows:
- Username: firstuser
- Password: 78495820
- API Access Key:c6bfba3b9ae226482ecc7360c470b77acada28e5f544218c8e431a6ead75
- You can see the default user configuration information in the TeliChatSecRun/conf/public.conf file:
...
USER_LIST = '{"user_name":"firstuser", "ichat":"firstapp", "api_inst_seq_set":"0", "pwd_ak_seq":0, "ext_params":""}'
... - To add a new user, just add a line after the above line in the public.conf file, such as:
Here a new user named "seconduser" is added, and a new application "secondapp" ("ichat":"secondapp") is defined, which means that the new user and firstuser's dialogue applications (i.e. ChatTree and knowledge base, etc.) are independent of each other. The seconduser's application can also be pointed to firstapp ("ichat":"firstapp"), indicating that the two users use the same dialogue application (i.e. shared ChatTree and knowledge base, etc.)
...
USER_LIST = '{"user_name":"firstuser", "ichat":"firstapp", "api_inst_seq_set":"0", "pwd_ak_seq":0, "ext_params":""}'
USER_LIST = '{"user_name":"seconduser", "ichat":"secondapp", "api_inst_seq_set":"0", "pwd_ak_seq":0, "ext_params":""}'
... - Run in the TeliChatSecRun directory:
Then the password and API Access Key information of the new user "seconduser" will be output, just save them.
python gen_pwd_ak.py seconduser - If a user is newly defined, the system must be restarted to take effect; if an application is newly defined at the same time, you must log in with the newly defined user so that the system can automatically create the application directory structure corresponding to the user, and then the API can be called with the new user
- If a user's password or API Access Key information is no longer secure, you can change
"pwd_ak_seq":0in the above user-defined line, change 0 to 1 (you can continue to change it to 2, 3, ..., etc.), then regenerate the password and API Accsee Keypython gen_pwd_ak.py..., and restart the system.