Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a service which provides below operations related to Health-Ids for MCI and other Organizations.

...

  1. Make sure a vagrant box is running with the same IP given in inventories/local for tr-server i.e. 192.168.33.19.
  2. Go to Freeshr-Playbooks folder. Start the vagrant box and ssh into it.
  3. 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.
  4. Start the provision

    Code Block
    languagebash
    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.

  5. Generate few HealthIds:-
    1. Login to IdP as an SHR System Admin

      Code Block
      languagebash
      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"


    2. 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

      1. X-Auth-Token:{the token you received in the previous step}
      2. client_id:18700 { this is client id for the user who signed in}
      3. From: local-shr-system-admin@test.com

    3. The above should return you a message saying "Generated 100 HIDs".
    4. You can login to cassandra and check the same

      Code Block
      languagebash
      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.