Implementazione open-source del protocollo di Strong Customer Authentication di Poste Italiane, (https://posteid.poste.it), lato client.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.8 KiB

  1. <!-- ABOUT THE PROJECT -->
  2. # pyjod
  3. Open-source implementation of the Strong Customer Authentication client agent used by the italian provider Poste Italiane S.p.A.
  4. ### DISCLAIMER:
  5. * The main purpose of this project is research and understanding of the techniques and protocols used.
  6. * This project is under development and unstable, using it could cause revocation or ban of your user account.
  7. * Using this software would very likely compromise most of the security of having a 2-factor authentication scheme. Also, this software is not security-audited at all and is storing all your private keys and secret UNENCRYPTED on your computer!
  8. In conclusion: USE IT ONLY AT YOUR RISKS, UNDER YOUR RESPONSABILITY, AND IF YOU KNOW VERY WELL WHAT YOU ARE DOING!
  9. ## Installation
  10. All the following instruction assumes that you are using a BASH shell under Linux,
  11. you will have to adapt them if you use a different Operating System or a different shell.
  12. 1. Ensure you have a proper and recent Python (> 3.9) installed.
  13. 2. (Strongly suggested) create a dedicated Python virtual environment
  14. ```sh
  15. mkdir -p ~/.venvs
  16. python3 -m venv ~/.venvs/pyjod
  17. ```
  18. 3. Activate the virtual environment
  19. ```sh
  20. source ~/.venvs/pyjod/bin/activate
  21. ```
  22. 4. Install `pyjod` and the optional dependencies you want
  23. ```sh
  24. # For a basic installation
  25. pip install "git+https://projects.lilik.it/zolfa/pyjod"
  26. # To include QR generator for OTP Authenticator apps
  27. pip install "git+https://projects.lilik.it/zolfa/pyjod#egg=pyjod[qr]"
  28. # To include also the QR screen scanner for instant authentication
  29. pip install "git+https://projects.lilik.it/zolfa/pyjod#egg=pyjod[qr,scanqr]"
  30. ```
  31. 5. Create a symbolic link from a directory available in your `$PATH`
  32. ```sh
  33. ln -s ~/.venvs/pyjod/bin/posteid ~/.local/bin/posteid
  34. ```
  35. ## Basic usage
  36. 1. Execute `posteid` in a terminal, you will be guided into logging in and
  37. configuring the application and enroling the device to your account.
  38. ```sh
  39. posteid
  40. ```
  41. 2. After the first execution, you can call `posteid` again to check the status of
  42. your device-account enrolment.
  43. 2. Generate an OTP-code to authenticate using the "Generate a single-use code" option.
  44. ```sh
  45. posteid otp
  46. ```
  47. 3. List all the pending authentication request, and authorize one of them.
  48. You will only see the requests generated using the "Send a notification to my device"
  49. option.
  50. ```sh
  51. posteid authorize
  52. ```
  53. 4. Export the QR generation seed to a compatible app using a standard provisioning QR-code
  54. _You will need the extra requirements [qr]_
  55. ```sh
  56. posteid qr
  57. ```
  58. 5. Detect a rapid-authentication qr in your screen and authorize the access using it.
  59. _You will need the extra requirements [scanqr]_
  60. ```sh
  61. posteid scanqr
  62. ```
  63. 6. Revoke your device enrolment, disabling private keys and OTP generator.
  64. ```sh
  65. posteid revoke
  66. ```