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

chore: update docs #28

Merged
merged 4 commits into from
Dec 18, 2020
Merged

chore: update docs #28

merged 4 commits into from
Dec 18, 2020

Conversation

salmanm
Copy link
Member

@salmanm salmanm commented Dec 17, 2020

Checklist

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated
- Stored in some external services like KMS, Vault or something similar
- Read at run-time and supplied in this option
- Long enough
- Truly random sequence of characters
Copy link
Member

Choose a reason for hiding this comment

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

Is there a module or service we can recommend to generate this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added hyperid & crypto-random-string

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think hyperid can be considered a truly random char sequence generator in the sense we intend here. It does generate unique ids, just not random

Copy link
Member Author

@salmanm salmanm Dec 18, 2020

Choose a reason for hiding this comment

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

I just thought a generated hyperid string is good enough for a cookie secret, but yes, technically you're right.
Removed it.

Copy link
Contributor

Choose a reason for hiding this comment

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

In this context it isn't. If you can guess what id is generated and you get hold of an encrypted cookie, you can decrypt it. In this context we need cryptographically secure secrets.

README.md Outdated
- Long enough
- Truly random sequence of characters

Apart from these safeguards, it's extremely important to use HTTPS for your website/app to avoid a bunch of other potential security issues like [MITM](https://en.wikipedia.org/wiki/Man-in-the-middle_attack) etc.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a link to letsencrypt

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit bf5da95 into fastify:master Dec 18, 2020
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