mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2025-10-31 01:28:30 +08:00
Sync original
This commit is contained in:
@ -881,15 +881,15 @@ Toutes les déclarations ci-dessus renverront false si elles sont utilisées ave
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## ![✔] 6.11. Support blacklisting JWTs
|
||||
## ![✔] 6.11. Support blocklisting JWTs
|
||||
|
||||
<a href="https://www.owasp.org/index.php/Top_10-2017_A2-Broken_Authentication" target="_blank"><img src="https://img.shields.io/badge/%E2%9C%94%20OWASP%20Threats%20-%20A9:Broken%20Authentication%20-green.svg" alt=""/></a>
|
||||
|
||||
**TL;DR:** When using JSON Web Tokens (for example, with [Passport.js](https://github.com/jaredhanson/passport)), by default there's no mechanism to revoke access from issued tokens. Once you discover some malicious user activity, there's no way to stop them from accessing the system as long as they hold a valid token. Mitigate this by implementing a blacklist of untrusted tokens that are validated on each request.
|
||||
**TL;DR:** When using JSON Web Tokens (for example, with [Passport.js](https://github.com/jaredhanson/passport)), by default there's no mechanism to revoke access from issued tokens. Once you discover some malicious user activity, there's no way to stop them from accessing the system as long as they hold a valid token. Mitigate this by implementing a blocklist of untrusted tokens that are validated on each request.
|
||||
|
||||
**Otherwise:** Expired, or misplaced tokens could be used maliciously by a third party to access an application and impersonate the owner of the token.
|
||||
|
||||
🔗 [**Read More: Blacklist JSON Web Tokens**](/sections/security/expirejwt.md)
|
||||
🔗 [**Read More: Blocklist JSON Web Tokens**](/sections/security/expirejwt.md)
|
||||
|
||||
<br/><br/>
|
||||
|
||||
@ -1052,7 +1052,7 @@ Toutes les déclarations ci-dessus renverront false si elles sont utilisées ave
|
||||
|
||||
<a href="https://www.owasp.org/index.php/Top_10-2017_A6-Security_Misconfiguration" target="_blank"><img src="https://img.shields.io/badge/%E2%9C%94%20OWASP%20Threats%20-%20A6:Security%20Misconfiguration%20-green.svg" alt=""/></a>
|
||||
|
||||
**TL;DR:** Precautions should be taken to avoid the risk of accidentally publishing secrets to public npm registries. An `.npmignore` file can be used to blacklist specific files or folders, or the `files` array in `package.json` can act as a whitelist.
|
||||
**TL;DR:** Precautions should be taken to avoid the risk of accidentally publishing secrets to public npm registries. An `.npmignore` file can be used to ignore specific files or folders, or the `files` array in `package.json` can act as an allow list.
|
||||
|
||||
**Otherwise:** Your project's API keys, passwords or other secrets are open to be abused by anyone who comes across them, which may result in financial loss, impersonation, and other risks.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user