Giter Site home page Giter Site logo

anvilresearch / connect Goto Github PK

View Code? Open in Web Editor NEW
364.0 364.0 86.0 1.18 MB

A modern authorization server built to authenticate your users and protect your APIs

Home Page: http://anvil.io

License: MIT License

JavaScript 41.77% CSS 1.31% CoffeeScript 54.21% HTML 2.57% Shell 0.15%

connect's People

Contributors

adalinesimonian avatar amokrushin avatar anth1y avatar bauglir avatar bmeriaux avatar camfou avatar christiansmith avatar cynfusion avatar dmitrizagidulin avatar eternaldeiwos avatar floby avatar gitter-badger avatar henrjk avatar jonathanlifschutz avatar msamblanet avatar nelsonic avatar nrhope avatar ovi-tamasan-3pg avatar petebot avatar tomkersten avatar tony-evans-enactus 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

connect's Issues

Authorization flow

The following behaviors are present which seem to be out of line with my expectations:

When signing into a client application:

  1. If the visitor has already logged into the auth server, the session is not "remembered" forcing them to log in every time.
  2. When a visitor has logged out of a client application and attempts to log back into an application they have already authorized, they are prompted with an authorization request every time (vs remembering they had previously authorized the application).
  3. Trusted applications are prompting for authorization.

Configurable token expiration

The server needs to support setting the IDToken exp claim and AccessToken ei (expires in) property via the max_age authorization parameter or the client's default_max_age.

JWT Access Tokens

Anvil Connect should optionally issue signed JWT access tokens as a performance optimization. Local JWT verification can be up to two orders of magnitude faster than round trip verification.

nv-commands fail without env variables set

On a clean installation, if the environment variables here are not set, an error is thrown.

The error is:

TypeError: First argument needs to be a number, array or string.
    at new Buffer (buffer.js:188:15)
    at module.exports (/usr/local/lib/node_modules/anvil-connect/config/server.js:564:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/anvil-connect/server.js:15:27)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/anvil-connect/lib/cli/init-db.js:6:14)
Usage: nv [--version] [--help] <command> [<args>]

Info:

$ node -v
v0.10.28
$ nv --version
Anvil Connect v0.1.15
$ echo $ANVIL_CONNECT_PUBLIC_KEY

$ echo $ANVIL_CONNECT_PRIVATE_KEY

After setting these...the command works fine.

Static assets

Anvil Connect should serve static assets from a public directory. This will be used for overriding the styling of views, adding custom javascript behavior, and other kinds of static assets (favicon, policy/tos, etc)

Selecting a template language

We used Jade for view rendering out of the gate, since it's the default template language for Express and it was easy to get started. However, Jade is, by all accounts, the worst performer among JavaScript templating engines and the syntax is controversial and foreign to many developers.

Since performance is a major objective and we're exposing templates to be overridden and customized for a given deployment, it makes sense to evaluate alternatives. I'm leaning strongly toward choosing Hogan.js for its speed (third in the benchmarks among 15 contenders) and simple, familiar syntax.

Does anyone want to weigh in before we go down this path?

Rewrite `nv init db`

Rewrite this command.

  • it should be config/prompt driven
  • it should be called nv migrate instead of nv init db
  • it should not overwrite or recreate existing stuff unless asked to
  • it should write a version property to the database for reference in upgrades
  • it should solve problems we don't know we have yet
  • ...

Issuing API keys

In some cases, a client may want to make API requests of its own account, not on behalf of a user. For example, a protected resource may want to implement metered access to general, non-user-specific data.

Anvil Connect does not presently support this scenario well, because access tokens are obtained via OAuth 2.0 flows.

If we wanted to support generating API keys, there are probably several ways we could go about it. I can think of at least two:

  1. implement an entirely new endpoint for this purpose
  2. add a "grant_type" for "api_key" that could be handled at the /token endpoint
  3. use the "client_registration_token"

Questions:

  1. Should API keys expire and/or be refreshed?
  2. Can we issue signed JWTs as API keys and reuse existing methods for verifying API requests?

I'm not sure what's the best approach. Anyone care to discuss?

When I npm install in my test of anvil-connect in my windows7 box, it fails as below

D:\dev\codebase\cn\xdf\centrum>npm install
npm http GET https://registry.npmjs.org/anvil-connect
npm http 304 https://registry.npmjs.org/anvil-connect
npm http GET https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/base64url
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/connect-redis
npm http GET https://registry.npmjs.org/bucker
npm http GET https://registry.npmjs.org/cookie-parser
npm http GET https://registry.npmjs.org/cors
npm http GET https://registry.npmjs.org/fs-extra
npm http GET https://registry.npmjs.org/iniparser
npm http GET https://registry.npmjs.org/inquirer
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/jwa
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/mellt
npm http GET https://registry.npmjs.org/modinha
npm http GET https://registry.npmjs.org/modinha-redis
npm http GET https://registry.npmjs.org/passport
npm http GET https://registry.npmjs.org/passport-facebook
npm http GET https://registry.npmjs.org/passport-google
npm http GET https://registry.npmjs.org/passport-google-oauth
npm http GET https://registry.npmjs.org/passport-http-bearer
npm http GET https://registry.npmjs.org/passport-local
npm http GET https://registry.npmjs.org/passport-twitter
npm http GET https://registry.npmjs.org/uri-js
npm http GET https://registry.npmjs.org/redis
npm http GET https://registry.npmjs.org/express-session
npm http GET https://registry.npmjs.org/form-urlencoded
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/yargs
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/body-parser
npm http 304 https://registry.npmjs.org/base64url
npm http 304 https://registry.npmjs.org/connect-redis
npm http 304 https://registry.npmjs.org/cookie-parser
npm http 304 https://registry.npmjs.org/bucker
npm http 304 https://registry.npmjs.org/cors
npm http 304 https://registry.npmjs.org/fs-extra
npm http 304 https://registry.npmjs.org/inquirer
npm http 304 https://registry.npmjs.org/iniparser
npm http 304 https://registry.npmjs.org/jade
npm http 304 https://registry.npmjs.org/jwa
npm http 304 https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/mellt
npm http 304 https://registry.npmjs.org/modinha
npm http 304 https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/modinha-redis
npm http 304 https://registry.npmjs.org/passport
npm http 304 https://registry.npmjs.org/passport-facebook
npm http 304 https://registry.npmjs.org/passport-google-oauth
npm http 304 https://registry.npmjs.org/passport-google
npm http 304 https://registry.npmjs.org/passport-http-bearer
npm http 304 https://registry.npmjs.org/express-session
npm http 304 https://registry.npmjs.org/passport-local
npm http 304 https://registry.npmjs.org/passport-twitter
npm http 304 https://registry.npmjs.org/redis
npm http 304 https://registry.npmjs.org/uri-js
npm http 304 https://registry.npmjs.org/form-urlencoded
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/yargs
npm http GET https://registry.npmjs.org/cookie
npm http GET https://registry.npmjs.org/cookie-signature
npm http GET https://registry.npmjs.org/passport-strategy
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/passport-openid
npm http GET https://registry.npmjs.org/type-is
npm http GET https://registry.npmjs.org/raw-body
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/passport-oauth
npm http GET https://registry.npmjs.org/passport-oauth1
npm http GET https://registry.npmjs.org/xtraverse
npm http GET https://registry.npmjs.org/passport-oauth2
npm http GET https://registry.npmjs.org/uid2
npm http GET https://registry.npmjs.org/utils-merge
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/cookie
npm http GET https://registry.npmjs.org/buffer-crc32
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cookie-signature
npm http 304 https://registry.npmjs.org/cookie
npm http GET https://registry.npmjs.org/revalidator
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/passport-openid
npm http 304 https://registry.npmjs.org/type-is
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/jsonfile
npm http GET https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/passport-oauth
npm http GET https://registry.npmjs.org/pause
npm http 304 https://registry.npmjs.org/passport-strategy
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/moment
npm http GET https://registry.npmjs.org/nodemailer
npm http 304 https://registry.npmjs.org/uid2
npm http 304 https://registry.npmjs.org/raw-body
npm http 304 https://registry.npmjs.org/passport-oauth2
npm http 304 https://registry.npmjs.org/xtraverse
npm http 304 https://registry.npmjs.org/utils-merge
npm http 304 https://registry.npmjs.org/cookie
npm http 304 https://registry.npmjs.org/buffer-crc32
npm http 304 https://registry.npmjs.org/passport-oauth1
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/revalidator
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/jsonfile
npm http 304 https://registry.npmjs.org/pause
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/moment
npm http 304 https://registry.npmjs.org/nodemailer
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/readline2
npm http GET https://registry.npmjs.org/cli-color
npm http GET https://registry.npmjs.org/through
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/bytes
npm http GET https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/through
npm http GET https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/cli-color
npm http 304 https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/openid
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/readline2
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bytes
npm http GET https://registry.npmjs.org/merge-descriptors
npm http GET https://registry.npmjs.org/escape-html
npm http GET https://registry.npmjs.org/serve-static
npm http GET https://registry.npmjs.org/path-to-regexp
npm http GET https://registry.npmjs.org/parseurl
npm http GET https://registry.npmjs.org/accepts
npm http GET https://registry.npmjs.org/range-parser
npm http GET https://registry.npmjs.org/fresh
npm http GET https://registry.npmjs.org/methods
npm http GET https://registry.npmjs.org/send
npm http 304 https://registry.npmjs.org/openid
npm http 304 https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/serve-static
npm http 304 https://registry.npmjs.org/path-to-regexp
npm http GET https://registry.npmjs.org/oauth
npm http 304 https://registry.npmjs.org/accepts
npm http 304 https://registry.npmjs.org/range-parser
npm http 304 https://registry.npmjs.org/parseurl
npm http 304 https://registry.npmjs.org/fresh
npm http 304 https://registry.npmjs.org/methods
npm http 304 https://registry.npmjs.org/merge-descriptors
npm http 304 https://registry.npmjs.org/send
npm http 304 https://registry.npmjs.org/escape-html
npm http GET https://registry.npmjs.org/xmldom
npm http 304 https://registry.npmjs.org/oauth
npm http GET https://registry.npmjs.org/ms
npm http GET https://registry.npmjs.org/ansi-styles
npm http GET https://registry.npmjs.org/has-color
npm http GET https://registry.npmjs.org/strip-ansi
npm http 304 https://registry.npmjs.org/xmldom

[email protected] install D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bcrypt
node-gyp rebuild

D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bcrypt>node "D:\dev\nodejs\node_modules\npm\bin\node-gyp-bin....\n
ode_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable
from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [D:\dev\codebase\cn\xdf\centrum\nod
e_modules\anvil-connect\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.targets(146,5): error MSB6006: "CL.exe" exited with code
-1073741515. [D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\dev\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "D:\dev\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bcrypt
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/ms
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/has-color
npm http GET https://registry.npmjs.org/negotiator
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/negotiator
npm http 304 https://registry.npmjs.org/strip-ansi
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/d
npm http GET https://registry.npmjs.org/memoizee
npm http GET https://registry.npmjs.org/timers-ext
npm http GET https://registry.npmjs.org/es5-ext
npm http GET https://registry.npmjs.org/directmail
npm http GET https://registry.npmjs.org/simplesmtp
npm http GET https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/he
npm http GET https://registry.npmjs.org/public-address
npm http GET https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/memoizee
npm http 304 https://registry.npmjs.org/d
npm http 304 https://registry.npmjs.org/es5-ext
npm http 304 https://registry.npmjs.org/simplesmtp
npm http 304 https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/transformers
npm http GET https://registry.npmjs.org/character-parser
npm http GET https://registry.npmjs.org/with
npm http GET https://registry.npmjs.org/monocle
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/directmail
npm http GET https://registry.npmjs.org/constantinople
npm http 304 https://registry.npmjs.org/he
npm http 304 https://registry.npmjs.org/transformers
npm http 304 https://registry.npmjs.org/character-parser
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/with
npm http 304 https://registry.npmjs.org/public-address
npm http 304 https://registry.npmjs.org/monocle
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/constantinople
npm http 304 https://registry.npmjs.org/timers-ext
npm http GET https://registry.npmjs.org/readdirp
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/promise
npm http GET https://registry.npmjs.org/css
npm http GET https://registry.npmjs.org/mimelib
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/follow-redirects
npm http GET https://registry.npmjs.org/dkim-signer
npm http GET https://registry.npmjs.org/isarray
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/next-tick
npm http GET https://registry.npmjs.org/rai
npm http GET https://registry.npmjs.org/xoauth2
npm http 304 https://registry.npmjs.org/readdirp
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/promise
npm http 304 https://registry.npmjs.org/css
npm http 304 https://registry.npmjs.org/mimelib
npm http 304 https://registry.npmjs.org/isarray
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/follow-redirects
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/next-tick
npm http 304 https://registry.npmjs.org/dkim-signer
npm http GET https://registry.npmjs.org/is-promise
npm http 304 https://registry.npmjs.org/xoauth2
npm http GET https://registry.npmjs.org/css-parse
npm http GET https://registry.npmjs.org/css-stringify
npm http GET https://registry.npmjs.org/punycode
npm http GET https://registry.npmjs.org/event-emitter
npm http GET https://registry.npmjs.org/lru-queue
npm http GET https://registry.npmjs.org/encoding
npm http GET https://registry.npmjs.org/addressparser
npm http 304 https://registry.npmjs.org/is-promise
npm http 304 https://registry.npmjs.org/css-parse
npm http 304 https://registry.npmjs.org/css-stringify
npm http 304 https://registry.npmjs.org/rai
npm http 304 https://registry.npmjs.org/lru-queue
npm http 304 https://registry.npmjs.org/event-emitter
npm http 304 https://registry.npmjs.org/addressparser
npm http 304 https://registry.npmjs.org/encoding
npm http 304 https://registry.npmjs.org/punycode
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/uglify-to-browserify
npm http GET https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/uglify-to-browserify
npm ERR! Error: ENOENT, chmod 'D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\inquirer\node_modules\cli-color\node_m
odules\es5-ext\object\assign\shim.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\inquirer\node_modules\cli-color\node_modules\es5-ext\ob
ject\assign\shim.js
npm ERR! fstream_path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\inquirer\node_modules\cli-color\node_modules\es
5-ext\object\assign\shim.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\with\node_modules\ug
lify-js\test\compress\concat-strings.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\with\node_modules\uglify-js\test\comp
ress\concat-strings.js
npm ERR! fstream_path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\with\node_modules\uglify-js\t
est\compress\concat-strings.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! EEXIST, mkdir 'D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bucker\node_modules\moment\test\moment'
File exists: D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bucker\node_modules\moment\test\moment
Move it away, and try again.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bucker\node_modules\moment\test\moment
npm ERR! fstream_path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\bucker\node_modules\moment\test\moment\getters_
setters.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:171:23
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\mkdirp\index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\monocle\node_modules
\readdirp\examples\node_modules\tap-stream\node_modules\through\LICENSE.APACHE2'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\monocle\node_modules\readdirp\example
s\node_modules\tap-stream\node_modules\through\LICENSE.APACHE2
npm ERR! fstream_path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\monocle\node_modules\readdirp
\examples\node_modules\tap-stream\node_modules\through\LICENSE.APACHE2
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/wordwrap
npm ERR! Error: ENOENT, lstat 'D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\transformers\node_mo
dules\uglify-js\node_modules\source-map\build\test-suffix.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\transformers\node_modules\uglify-js\n
ode_modules\source-map\build\test-suffix.js
npm ERR! fstream_path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\transformers\node_modules\ugl
ify-js\node_modules\source-map\build\test-suffix.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\transformers\node_mo
dules\uglify-js\node_modules\optimist\node_modules\wordwrap\test\idleness.txt'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\transformers\node_modules\uglify-js\n
ode_modules\optimist\node_modules\wordwrap\test\idleness.txt
npm ERR! fstream_path D:\dev\codebase\cn\xdf\centrum\node_modules\anvil-connect\node_modules\jade\node_modules\transformers\node_modules\ugl
ify-js\node_modules\optimist\node_modules\wordwrap\test\idleness.txt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\dev\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/amdefine
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\dev\nodejs\node.exe" "D:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\dev\codebase\cn\xdf\centrum
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/amdefine

.gitignore on `nv init deployment`

When I run nv init deployment it does not generate all the necessary files. I have tracked it down to 2 issues:

  1. #28
  2. When I install v0.1.5, the .gitignore file from lib/cli/deployments is not present. However, when I view 0eed81a (v0.1.5's associated commit)...it's present. I'm not sure if this is a git issue, npm, ...or something with this release in particular.

This error causes the RSA keys not to be generated as well...but when both of these missing files/dirs are present, it works fine.

Key pair environment variable values

@tomkersten

140431805724480:error:0906D06C:PEM routines:PEM_read_bio:no start line:../deps/openssl/openssl/crypto/pem/pem_lib.c:703:Expecting: ANY PRIVATE KEY

Environment variables ANVIL_CONNECT_[PUBLIC|PRIVATE]_KEY are being read correctly when the server bootstraps, but the values we assigned to those variables are invalid.

I suspect the cause is that values selected/copied from the terminal or a text editor replace line break characters with spaces when pasted. Removing the spaces didn't work, because line breaks are expected. Try firing up a REPL and logging the values there.

$ node
> var fs = require('fs');
> fs.readFile('keys/public.pem', 'ascii', function (err, file) { console.log(err, file); })
> null '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhki...etc...AQAB\n-----END PUBLIC KEY-----\n'

Copying this value with the \ns included should solve the problem. Can you give this a try and let me know if it solves the problem for you?

To make getting these values easier and less error prone, I'm thinking about a CLI command that would copy the correct value onto a users clipboard. For example:

$ nv copy public-key

Thoughts?

Hybrid Authorization Flow

Anvil Connect currently implements authorization code and implicit flows. It should also support the hybrid flow.

Make password signin optional

Some deployments may want to avoid password signups altogether. It should be possible to disable password signups by configuration, so long as at least one third party provider is configured.

Signin via third party where there is an existing account with the same email

When a user has already registered with an email address and they try to auth via a third party that's registered with the same email address, we get a unique error.

What's the sensible way to handle this situation? Do we want to automatically merge the accounts? Prompt to merge? Require additional authentication with the existing account? To connect an account, should we require a user to already be signed in?

Project/deployment generator

We should be able to initialize a new deployment via CLI. This tool should generate/copy:

  1. a deployment directory
  2. a git repository
  3. .gitignore
  4. package.json
  5. configuration files for dev and production environments
  6. server.js
  7. default view templates and public assets
  8. keypairs for signing and encryption

cli help

The cli tool has subcommands, similar to git or npm, and should support command-specific help.

$ nv assign --help

Keyfiles

Any thoughts on migrating the public/private keys for the server to be loaded only from environment variables (vs paths in the config file)?

"Requires login" prompt?

When going to a "protected page" on a client application, you generally want to forward the person to the login page with a message to the effect of "You must sign in to see this content."

Any ideas on how we can accomplish this with the anvil-connect server?

Logging

Anvil Connect should support configurable logging for each environment.

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.