GithubHelp home page GithubHelp logo

node-auth's Introduction

Client side SSL certificate authentication in Node.js

Includes

  • server.js: Example HTTPS Node.js server that validates the client cert
  • express-server.js: Example express version
  • client.sh: A bash script that demonstrates using curl as a client
  • client.js: A Node.js client example
  • ssl: Directory with a bunch of sample certs

More coming soon. Wanted to recreate the work I did to demonstrate client cert auth in nginx. You can check it out for more info about the client side certs process.

Notes

  • The passphrase on these keys are all "password"
  • All examples run on port 5678 for the sake of simplicity (port 443 works just as well assuming you have access)

node-auth's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-auth's Issues

certs have expired

Thanks for making this. Do you think you could take a look at this?

$ node client.js 

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: CERT_HAS_EXPIRED
    at SecurePair.<anonymous> (tls.js:1356:32)
    at SecurePair.EventEmitter.emit (events.js:92:17)
    at SecurePair.maybeInitFinished (tls.js:968:10)
    at CleartextStream.read [as _read] (tls.js:462:15)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.write [as _write] (tls.js:366:25)
    at doWrite (_stream_writable.js:221:10)
    at writeOrBuffer (_stream_writable.js:211:5)
    at EncryptedStream.Writable.write (_stream_writable.js:180:11)
    at write (_stream_readable.js:583:24)

client.js doesn't work

node client.js

crypto.js:129
c.context.setKey(options.key, options.passphrase);
^
Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
at Object.exports.createCredentials (crypto.js:129:17)

Client.js not working

The client.sh bash/curl client seems to be working fine with the server, however the node client is not authenticating. Have tried multiple configurations and am starting to suspect there may be an underlying issue in node.

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.