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

Profile session token should only be readable by the user #130

Closed
ghost opened this issue Jul 6, 2023 · 1 comment
Closed

Profile session token should only be readable by the user #130

ghost opened this issue Jul 6, 2023 · 1 comment
Milestone

Comments

@ghost
Copy link

ghost commented Jul 6, 2023

The session.json file contains a user's access_token, which is used for authentication. At present, on a POSIX system, the file is readable by all users. As I understand it, this is a security issue, as another user on the system could read the file and authenticate as the user.

$ ls -l session.json
-rw-r--r-- 1 user user 110  7月  6 12:06 session.json

I think that this file should be readable only by the user running the program. I'd be happy to have a go submitting a PR for this.

As an aside, how about the option of integration with a password management utility like pass? I see there's a rust crate supporting pass (ripasso), though I haven't used it before.

@ulyssa ulyssa added this to the v0.0.8 milestone Jul 7, 2023
@ulyssa ulyssa changed the title session.json readable by all users Profile session token should only readable by the user Jul 8, 2023
@ulyssa ulyssa changed the title Profile session token should only readable by the user Profile session token should only be readable by the user Jul 8, 2023
@ulyssa ulyssa closed this as completed Jul 8, 2023
@ulyssa
Copy link
Owner

ulyssa commented Jul 8, 2023

Thank you for catching this! I've fixed this by setting a more restrictive umask so that all files and directories created by iamb can only be read by the user.

As for password management, I'd probably use the keyring crate. I don't think I'm going to get to this soon, but I've opened #132 to track it.

@ulyssa ulyssa mentioned this issue Jul 8, 2023
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

No branches or pull requests

1 participant