We should convert our SSO code so that it can be run in Python 3 and not only in Python 2.
The core SSO module has now been converted to support python 3. Tested functionality: - Initial password set by `tl-set-sso-helper' - Password can be retrieved using `tl-sso-password | cat' - Password can be cleared using `tl-sso-password --remove' - `tl-sso-password --check' returns 0 if SSO password is set and 1 otherwise - Password can be manually set using `tl-sso-update-password'
tl-sso-password has now been converted to python 3. Tested functionality: - Password can be retrieved using `tl-sso-password | cat' - Password can be cleared using `tl-sso-password --remove' - `tl-sso-password --check' returns 0 if SSO password is set and 1 otherwise - Password can be manually set using `tl-sso-update-password' `tl-sso-token-passphrase', which is yet to be converted to python 3, has also been tested using the above tests without any issues.
tl-set-sso-helper has now been converted to python 3 ---------------------------------------------------- Functionality tested: - `tl-sso-password | cat' prints the current password using the system encoding. Tested using utf-8 and latin-9. - `tl-sso-token-passphrase | cat' prints the current token passphrase using the system locale. Tested using utf-8 and latin-9. All SSO scripts in vsm, along with the SSO module, are now converted to python 3. Marking as resolved.
Tested with build 2005 on Ubuntu 20.04 and it works well. I tested only non-ascii passwords with UTF-8 locale, since non-ascii passwords was tested through bug 7674. ✓ Initial password set by tl-set-sso-helper ✓ tl-sso-password | cat ✓ tl-sso-password --check ✓ tl-sso-password --remove ✓ tl-sso-token-passphrase | cat ✓ Outputs PIN if smartcard credentials are passed ✓ No output if smartcard credentials are not passed ✓ tl-sso-token-passphrase --check ✓ tl-sso-token-passphrase --remove ✓ tl-sso-update-password * On Ubuntu 20.04, I get this error: 'Error initializing PyGTK'. This is expected behaviour at the moment, see bug 7508. * On RHEL 8 with UTF-8 locale the command works as expected.
I missed testing upgrading the server with active sessions in comment 21. Tested upgrading from 4.12.1 to server build 2005 on RHEL 8, everything works as expected. ✓ tl-sso-password | cat ✓ tl-sso-password --check ✓ tl-sso-password --remove ✓ tl-sso-token-passphrase | cat ✓ Outputs PIN if smartcard credentials are passed ✓ No output if smartcard credentials are not passed ✓ tl-sso-token-passphrase --check ✓ tl-sso-token-passphrase --remove ✓ tl-sso-update-password