Giter Club home page Giter Club logo

essential-nodejs-security-book's Introduction

Essential Node.js Security

GitHub repository for the book Essential Node.js Security for Express Web Applications which you can get a PDF copy of Leanpub.com.

Essential Node.js Security

Code Samples

All code samples are available at: https://github.com/lirantal/essential-nodejs-security-book

Author

Liran Tal [email protected]

Contributing

Corrections and improvements are welcome. Please fork the repository and submit a merge request: https://github.com/lirantal/essential-nodejs-security-book

When you make a pull request, make sure to add your name to the list of contributors in CONTRIBUTORS.md.

License

The book is licensed under CC's BY-NC-ND version 3.

Creative Commons License

essential-nodejs-security-book's People

Contributors

abdulhannanali avatar adam-moss avatar codydaig avatar lirantal avatar ryanweal avatar sjclemmy avatar sosana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

essential-nodejs-security-book's Issues

Review: salt & hashing - using bcrypt-nodejs vs bcrypt

Reference: original review notes by @SOSANA: #2

salt & hashing - using bcrypt-nodejs vs bcrypt

It has issues with windows and linux os. Mind you it depends on the linux distributions (redhat/ubuntu/debian). Some of the problems for both are os env variables utilizing node-gyp python >=2.5 and <3.0 version

my suggest is to mention that it exists and this is an alternative work around to avoid messing around with compilers, additional c++ packages, and pointing your os env variable to python >=2.5 and <3.0 version as most are preinstalled with python >3.0

Missing topics, thoughts, and discussion

@lirantal hope all is well my brotha from anotha motha :)

Few topics felt I needed to address that were missing.

  • salt & hashing - using bcrypt-nodejs vs bcrypt
  • securing api end-points - using passport-local strategy
  • JWT - using passport-jwt strategy
  • CORS - various express plugins

RE: usage with bcrypt

  • It has issues with windows and linux os. Mind you it depends on the linux distributions (redhat/ubuntu/debian). Some of the problems for both are os env variables utilizing node-gyp python >=2.5 and <3.0 version

my suggest is to mention that it exists and this is an alternative work around to avoid messing around with compilers, additional c++ packages, and pointing your os env variable to python >=2.5 and <3.0 version as most are preinstalled with python >3.0


RE: usage with passport-local strategy

  • probably one of the most straight fwd implementation that quickly wires up securing api-end points with auth module of your choice (JWT or Cookie/Sessions)

my suggestion is to elaborate more on why you would want to consider using this and why its one of the most used local auth stradegy. In a world where everything seems to be going microservices (ex: api servers and seperatation of the front-end) vs monolith architecture.


Re: JWT

  • gotta talk a about use of JSON Web Tokens. Very easy to wire up, ex: using passport-jwt strategy

my suggestion is to elaborate more on this subject and provide example


RE: CORS

  • there should be some mention of this regarding the usage, Several express CORS libraries on the subject. There are various express plugins libraries.

my suggestion is to elaborate more on this subject and provide example


So far enjoy the straight forwardness of the book with clear explanations, and straight to the point recommendations for each topic.

Currently reviewing and re-reviewing...
reviewing

CSRF Feedback

Hey Liran, I have gone through your book and its a masterpiece. But you suggested csurf npm package for CSRF token, but this package is no longer maintained now. Can you suggest a good alternative?

Review: usage with passport-local strategy

Reference: original review notes by @SOSANA: #2

usage with passport-local strategy

probably one of the most straight fwd implementation that quickly wires up securing api-end points with auth module of your choice (JWT or Cookie/Sessions)

my suggestion is to elaborate more on why you would want to consider using this and why its one of the most used local auth stradegy. In a world where everything seems to be going microservices (ex: api servers and seperatation of the front-end) vs monolith architecture.

talk a about use of JSON Web Tokens.

Very easy to wire up, ex: using passport-jwt strategy
my suggestion is to elaborate more on this subject and provide example

Some feedback

Overall, very solid. I love the details you've provided in the clear and concise matter.

Some thing I would like to see discussed:

  • CORS (is there anything wrong with it?)
  • JWT (at least from an overview stand point)

Do you want PRs made for minor grammatical mistakes?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.