Bug 7663 - Our SSO code still uses Python 2
Summary: Our SSO code still uses Python 2
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.13.0
Assignee: William Sjöblom
URL:
Keywords: linma_tester, prosaic
Depends on: 7674
Blocks: 7572
  Show dependency treegraph
 
Reported: 2021-03-17 09:42 CET by Niko Lehto
Modified: 2021-06-22 16:37 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Niko Lehto cendio 2021-03-17 09:42:17 CET
We should convert our SSO code so that it can be run in Python 3 and not only in Python 2.
Comment 5 William Sjöblom cendio 2021-04-07 14:16:00 CEST
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'
Comment 11 William Sjöblom cendio 2021-04-09 14:11:03 CEST
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.
Comment 20 William Sjöblom cendio 2021-04-13 14:10:34 CEST
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.
Comment 21 Linn cendio 2021-04-15 09:02:02 CEST
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.
Comment 22 Linn cendio 2021-04-19 08:42:00 CEST
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

Note You need to log in before you can comment on or make changes to this bug.