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

Clarify about private and encryption #49

Open
Mellbourn opened this issue May 25, 2023 · 1 comment
Open

Clarify about private and encryption #49

Mellbourn opened this issue May 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Mellbourn
Copy link

Mellbourn commented May 25, 2023

It seems like a great tool, but I don't think the documentation around security is unambiguous.
It could clarify the following:

  1. Is the code encrypted in the database?
  2. What does --private do?
  3. Is it possible to password-protect the snippets?
  4. Can anyone download any snippet that they have the filename for?
@Mellbourn Mellbourn added the enhancement New feature or request label May 25, 2023
@robherley
Copy link
Owner

👋 Thanks for using snips! I agree, maybe a high level overview (or even an FAQ) might help.

To answer your questions.

Is the code encrypted in the database?

No, the content in the database is not encrypted.

What does --private do?

It prevents your snippet from being publicly accessible. You will need to use the TUI or the sign -ttl parameters to do so. That will issue an HMAC-signed URL that only lives for the specified amount of time (the TTL).

For instance, this is a private snippet:
https://snips.sh/f/c7fEXkXXtO

Here is a signed URL (ttl of 72 hours from when I post this):
https://snips.sh/f/c7fEXkXXtO?exp=1685289305&sig=-OmATLr-R8ZPwvJGV5K89GJ16gbNSXrCuCU2nacVpPs%3D

The URL path + parameters use an HMAC signature. If any part of it is changed, the server will automatically 404.

Is it possible to password-protect the snippets?

No it is not. The private/ttl combination is used.

Can anyone download any snippet that they have the filename for?

If the snippet is public, yes anyone can use the ttl. But as you see above if the snippet is private, it will 404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants