This is a service which provides below operations related to Health-Ids for MCI and other Organizations.
...
- Make sure a vagrant box is running with the same IP given in inventories/local for tr-server i.e. 192.168.33.19.
- Go to Freeshr-Playbooks folder. Start the vagrant box and ssh into it.
- Put the health-id server RPM into
/tmp/
folder. Under development version can be built locally or can be downloaded from CI-Server. Released versions are published to github-releases. Start the provision
Code Block language bash cd /vagrant/ cp group_vars/all_example group_vars/all #make sure this is not commited touch ~/.vaultpass.txt ansible-playbook mci.yml -i inventories/local -t healthid-server --vault-password-file ~/.vaultpass.txt -k -vvvv
The above will install the HealthId Server.
- Generate few HealthIds:-
Login to IdP as an SHR System Admin
Code Block language bash curl -X POST http://192.168.33.19:8084/signin -H "X-Auth-Token:local-shr-system-admin_auth_token" -H "client_id:18700" --form "email=local-shr-system-admin@test.com" --form "password=password"
With the above token for SHR System Admin, now you can POST to the http://192.168.33.19:8086/healthIds/generateBlock?start=9800000000&totalHIDs=100 to generate Health IDs with below headers
- X-Auth-Token:{the token you received in the previous step}
- client_id:18700 { this is client id for the user who signed in}
- The above should return you a message saying "Generated 100 HIDs".
You can login to cassandra and check the same
Code Block language bash cqlsh 192.168.33.19 -ucassandra -ppassword use healthid ; select count(*) from mci_healthid ; #Above should return count as 100.
The stub IdP doesn't expire the token unless the Identity-Service is restarted. So you can keep using the "access_token". In reality, the access_token is short-lived and also can be invalidated.