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

Write 0600 permissions when editing root config #331

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

macmv
Copy link
Contributor

@macmv macmv commented Dec 7, 2023

Ticket(s): FE-4797

Problem

~/.fauna-shell contains secrets, so it should not be readable by everyone by default.

Solution

Write it with mode 0600.

Result

It is not readable by others by default.

Testing

I did fauna cloud-login, and the new file is only readable and writable by me:

$ ls -la ~/.fauna-shell*
-rw------- 1 macmv macmv  232 Dec  7 13:27 .fauna-shell
-rw-r--r-- 1 macmv macmv 1.5K Oct  9 10:49 .fauna-shell.bak
-rw-r--r-- 1 macmv macmv 1.5K Oct 12 15:40 .fauna-shell.old

@macmv macmv requested a review from fauna-chase December 7, 2023 21:33
@yesha-fauna
Copy link
Contributor

Need to add warning if the fauna-shell or ProjectConfig Path does not have 600 permission.

src/lib/config/index.ts Outdated Show resolved Hide resolved
src/lib/config/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor Author

@macmv macmv left a comment

Choose a reason for hiding this comment

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

looks good to me @yesha-fauna

@yesha-fauna yesha-fauna merged commit bd5f014 into main Dec 8, 2023
1 check passed
@yesha-fauna yesha-fauna deleted the make-secrets-non-readable branch December 8, 2023 00:03
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.

3 participants