Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove user credential from keyring #2627

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

divyaajainn
Copy link
Contributor

Purpose of PR?: User password is removed from keyring when account is deleted from MSColab.

Fixes #2624

@@ -39,6 +39,8 @@
from mslib.utils.verify_waypoint_data import verify_waypoint_data
from mslib.mscolab.models import db, Operation, Permission, User, Change, Message
from mslib.mscolab.conf import mscolab_settings
from mslib.utils.auth import del_password_from_keyring
from mslib.utils.config import config_loader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work,

the config_loader belongs to.the MSUI and this is the application which is installed on the client side.

The server MSCOLAB is on some other location and of course has no idea about the passwords the user has in his machines keyring.

You need to lookup where in the MSUI the Delete Account is used and implement it nearby.

delete_account

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of three from the issue.

You need to extend the existing test to verify that the keyring is cleared, see

https://github.com/Open-MSS/MSS/blob/develop/tests/_test_msui/test_mscolab.py#L873

There can be another key/value pair in the keyring when the server has the login protected.

https://mss.readthedocs.io/en/stable/mscolab.html#protecting-login

The auth_username is configured in the users configuration and can be retrieved from there https://github.com/Open-MSS/MSS/blob/develop/mslib/utils/config.py#L208

you need a second delete for this, e.g. keyring del f"MSCOLAB_AUTH_{url}" MSCOLAB_auth_user_name

@divyaajainn divyaajainn marked this pull request as draft February 10, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

on mscolab delete account credentials should be removed from keyring
2 participants