freezerwatch 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/freezerwatch +9 -0
- data/bin/setup +7 -0
- data/freezerwatch.gemspec +23 -0
- data/lib/freezerwatch.rb +5 -0
- data/lib/freezerwatch/version.rb +3 -0
- data/node_modules/.bin/freezerwatch +139 -0
- data/node_modules/freezerwatch/.npmignore +3 -0
- data/node_modules/freezerwatch/.ruby-version +1 -0
- data/node_modules/freezerwatch/Gemfile +4 -0
- data/node_modules/freezerwatch/Gemfile.lock +79 -0
- data/node_modules/freezerwatch/LICENSE +23 -0
- data/node_modules/freezerwatch/README.md +41 -0
- data/node_modules/freezerwatch/Rakefile +13 -0
- data/node_modules/freezerwatch/freezerwatch.js +139 -0
- data/node_modules/freezerwatch/metrics/bigfiles_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/cane_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flay_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flog_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/punchlist_high_water_mark +2 -0
- data/node_modules/freezerwatch/metrics/reek_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/rubocop_high_water_mark +1 -0
- data/node_modules/freezerwatch/node_modules/async/.jshintrc +25 -0
- data/node_modules/freezerwatch/node_modules/async/.travis.yml +6 -0
- data/node_modules/freezerwatch/node_modules/async/CHANGELOG.md +65 -0
- data/node_modules/freezerwatch/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/async/README.md +1803 -0
- data/node_modules/freezerwatch/node_modules/async/bower.json +43 -0
- data/node_modules/freezerwatch/node_modules/async/component.json +17 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/async.js.html +3900 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov.info +1452 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/async.js.html +3597 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/lib/async.js +1191 -0
- data/node_modules/freezerwatch/node_modules/async/nyc_output/5074.json +1 -0
- data/node_modules/freezerwatch/node_modules/async/package.json +96 -0
- data/node_modules/freezerwatch/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/.npmignore +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Client.js +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Device.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceRawReadStream.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceSingleRawReadStream.js +29 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceStream.js +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/LICENSE +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/README.md +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.travis.yml +12 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/README.md +364 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/index.js +156 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/copy.js +8 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/debug.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/getSafe.js +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/optional.js +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/.bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/Readme.md +175 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/README.md +1647 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/bower.json +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/component.json +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/package.json +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +188 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/package.json +80 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/README.md +627 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +101 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +1078 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +359 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/browser.js +771 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/client.js +206 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/crypto.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/index.js +316 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/message.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/readme.js +98 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/server.js +686 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/uri.js +456 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/utils.js +120 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/README.md +79 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/index.js +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/util.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/package.json +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/README.md +66 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/mime.js +114 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/package.json +57 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/test.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/README.md +243 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bower.json +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/package.json +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.gitmodules +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/index.js +366 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/package.json +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.jshintrc +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.npmignore +3 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +176 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +81 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +530 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/package.json +74 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/request.js +1244 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/package.json +34 -0
- data/node_modules/freezerwatch/node_modules/optparse/README.md +163 -0
- data/node_modules/freezerwatch/node_modules/optparse/TODO +1 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/browser-test.html +75 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/nodejs-test.js +86 -0
- data/node_modules/freezerwatch/node_modules/optparse/lib/optparse.js +309 -0
- data/node_modules/freezerwatch/node_modules/optparse/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/optparse/seed.yml +5 -0
- data/node_modules/freezerwatch/node_modules/osenv/.npmignore +13 -0
- data/node_modules/freezerwatch/node_modules/osenv/.travis.yml +9 -0
- data/node_modules/freezerwatch/node_modules/osenv/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/osenv/README.md +63 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/index.js +24 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/readme.md +33 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/index.js +25 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/readme.md +36 -0
- data/node_modules/freezerwatch/node_modules/osenv/osenv.js +72 -0
- data/node_modules/freezerwatch/node_modules/osenv/package.json +76 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/unix.js +71 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/windows.js +74 -0
- data/node_modules/freezerwatch/node_modules/osenv/x.tap +39 -0
- data/node_modules/freezerwatch/package.json +37 -0
- metadata +384 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
// Load modules
|
2
|
+
|
3
|
+
var Lab = require('lab');
|
4
|
+
var Hawk = require('../lib');
|
5
|
+
var Package = require('../package.json');
|
6
|
+
|
7
|
+
|
8
|
+
// Declare internals
|
9
|
+
|
10
|
+
var internals = {};
|
11
|
+
|
12
|
+
|
13
|
+
// Test shortcuts
|
14
|
+
|
15
|
+
var expect = Lab.expect;
|
16
|
+
var before = Lab.before;
|
17
|
+
var after = Lab.after;
|
18
|
+
var describe = Lab.experiment;
|
19
|
+
var it = Lab.test;
|
20
|
+
|
21
|
+
|
22
|
+
describe('Hawk', function () {
|
23
|
+
|
24
|
+
describe('Utils', function () {
|
25
|
+
|
26
|
+
describe('#parseHost', function () {
|
27
|
+
|
28
|
+
it('returns port 80 for non tls node request', function (done) {
|
29
|
+
|
30
|
+
var req = {
|
31
|
+
method: 'POST',
|
32
|
+
url: '/resource/4?filter=a',
|
33
|
+
headers: {
|
34
|
+
host: 'example.com',
|
35
|
+
'content-type': 'text/plain;x=y'
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(80);
|
40
|
+
done();
|
41
|
+
});
|
42
|
+
|
43
|
+
it('returns port 443 for non tls node request', function (done) {
|
44
|
+
|
45
|
+
var req = {
|
46
|
+
method: 'POST',
|
47
|
+
url: '/resource/4?filter=a',
|
48
|
+
headers: {
|
49
|
+
host: 'example.com',
|
50
|
+
'content-type': 'text/plain;x=y'
|
51
|
+
},
|
52
|
+
connection: {
|
53
|
+
encrypted: true
|
54
|
+
}
|
55
|
+
};
|
56
|
+
|
57
|
+
expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443);
|
58
|
+
done();
|
59
|
+
});
|
60
|
+
|
61
|
+
it('returns port 443 for non tls node request (IPv6)', function (done) {
|
62
|
+
|
63
|
+
var req = {
|
64
|
+
method: 'POST',
|
65
|
+
url: '/resource/4?filter=a',
|
66
|
+
headers: {
|
67
|
+
host: '[123:123:123]',
|
68
|
+
'content-type': 'text/plain;x=y'
|
69
|
+
},
|
70
|
+
connection: {
|
71
|
+
encrypted: true
|
72
|
+
}
|
73
|
+
};
|
74
|
+
|
75
|
+
expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443);
|
76
|
+
done();
|
77
|
+
});
|
78
|
+
|
79
|
+
it('parses IPv6 headers', function (done) {
|
80
|
+
|
81
|
+
var req = {
|
82
|
+
method: 'POST',
|
83
|
+
url: '/resource/4?filter=a',
|
84
|
+
headers: {
|
85
|
+
host: '[123:123:123]:8000',
|
86
|
+
'content-type': 'text/plain;x=y'
|
87
|
+
},
|
88
|
+
connection: {
|
89
|
+
encrypted: true
|
90
|
+
}
|
91
|
+
};
|
92
|
+
|
93
|
+
var host = Hawk.utils.parseHost(req, 'Host');
|
94
|
+
expect(host.port).to.equal('8000');
|
95
|
+
expect(host.name).to.equal('[123:123:123]');
|
96
|
+
done();
|
97
|
+
});
|
98
|
+
});
|
99
|
+
|
100
|
+
describe('#version', function () {
|
101
|
+
|
102
|
+
it('returns the correct package version number', function (done) {
|
103
|
+
|
104
|
+
expect(Hawk.utils.version()).to.equal(Package.version);
|
105
|
+
done();
|
106
|
+
});
|
107
|
+
});
|
108
|
+
|
109
|
+
describe('#unauthorized', function () {
|
110
|
+
|
111
|
+
it('returns a hawk 401', function (done) {
|
112
|
+
|
113
|
+
expect(Hawk.utils.unauthorized('kaboom').response.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"');
|
114
|
+
done();
|
115
|
+
});
|
116
|
+
});
|
117
|
+
});
|
118
|
+
});
|
119
|
+
|
120
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Copyright Joyent, Inc. All rights reserved.
|
2
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3
|
+
of this software and associated documentation files (the "Software"), to
|
4
|
+
deal in the Software without restriction, including without limitation the
|
5
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
6
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
7
|
+
furnished to do so, subject to the following conditions:
|
8
|
+
|
9
|
+
The above copyright notice and this permission notice shall be included in
|
10
|
+
all copies or substantial portions of the Software.
|
11
|
+
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
17
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
18
|
+
IN THE SOFTWARE.
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# node-http-signature
|
2
|
+
|
3
|
+
node-http-signature is a node.js library that has client and server components
|
4
|
+
for Joyent's [HTTP Signature Scheme](http_signing.md).
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
Note the example below signs a request with the same key/cert used to start an
|
9
|
+
HTTP server. This is almost certainly not what you actually want, but is just
|
10
|
+
used to illustrate the API calls; you will need to provide your own key
|
11
|
+
management in addition to this library.
|
12
|
+
|
13
|
+
### Client
|
14
|
+
|
15
|
+
```js
|
16
|
+
var fs = require('fs');
|
17
|
+
var https = require('https');
|
18
|
+
var httpSignature = require('http-signature');
|
19
|
+
|
20
|
+
var key = fs.readFileSync('./key.pem', 'ascii');
|
21
|
+
|
22
|
+
var options = {
|
23
|
+
host: 'localhost',
|
24
|
+
port: 8443,
|
25
|
+
path: '/',
|
26
|
+
method: 'GET',
|
27
|
+
headers: {}
|
28
|
+
};
|
29
|
+
|
30
|
+
// Adds a 'Date' header in, signs it, and adds the
|
31
|
+
// 'Authorization' header in.
|
32
|
+
var req = https.request(options, function(res) {
|
33
|
+
console.log(res.statusCode);
|
34
|
+
});
|
35
|
+
|
36
|
+
|
37
|
+
httpSignature.sign(req, {
|
38
|
+
key: key,
|
39
|
+
keyId: './cert.pem'
|
40
|
+
});
|
41
|
+
|
42
|
+
req.end();
|
43
|
+
```
|
44
|
+
|
45
|
+
### Server
|
46
|
+
|
47
|
+
```js
|
48
|
+
var fs = require('fs');
|
49
|
+
var https = require('https');
|
50
|
+
var httpSignature = require('http-signature');
|
51
|
+
|
52
|
+
var options = {
|
53
|
+
key: fs.readFileSync('./key.pem'),
|
54
|
+
cert: fs.readFileSync('./cert.pem')
|
55
|
+
};
|
56
|
+
|
57
|
+
https.createServer(options, function (req, res) {
|
58
|
+
var rc = 200;
|
59
|
+
var parsed = httpSignature.parseRequest(req);
|
60
|
+
var pub = fs.readFileSync(parsed.keyId, 'ascii');
|
61
|
+
if (!httpSignature.verifySignature(parsed, pub))
|
62
|
+
rc = 401;
|
63
|
+
|
64
|
+
res.writeHead(rc);
|
65
|
+
res.end();
|
66
|
+
}).listen(8443);
|
67
|
+
```
|
68
|
+
|
69
|
+
## Installation
|
70
|
+
|
71
|
+
npm install http-signature
|
72
|
+
|
73
|
+
## License
|
74
|
+
|
75
|
+
MIT.
|
76
|
+
|
77
|
+
## Bugs
|
78
|
+
|
79
|
+
See <https://github.com/joyent/node-http-signature/issues>.
|
@@ -0,0 +1,296 @@
|
|
1
|
+
# Abstract
|
2
|
+
|
3
|
+
This document describes a way to add origin authentication, message integrity,
|
4
|
+
and replay resistance to HTTP REST requests. It is intended to be used over
|
5
|
+
the HTTPS protocol.
|
6
|
+
|
7
|
+
# Copyright Notice
|
8
|
+
|
9
|
+
Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors.
|
10
|
+
All rights reserved.
|
11
|
+
|
12
|
+
Code Components extracted from this document must include MIT License text.
|
13
|
+
|
14
|
+
# Introduction
|
15
|
+
|
16
|
+
This protocol is intended to provide a standard way for clients to sign HTTP
|
17
|
+
requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication
|
18
|
+
mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely
|
19
|
+
employed on the Internet today. However, it is common place that the burdens of
|
20
|
+
PKI prevent web service operators from deploying that methodology, and so many
|
21
|
+
fall back to Basic authentication, which has poor security characteristics.
|
22
|
+
|
23
|
+
Additionally, OAuth provides a fully-specified alternative for authorization
|
24
|
+
of web service requests, but is not (always) ideal for machine to machine
|
25
|
+
communication, as the key acquisition steps (generally) imply a fixed
|
26
|
+
infrastructure that may not make sense to a service provider (e.g., symmetric
|
27
|
+
keys).
|
28
|
+
|
29
|
+
Several web service providers have invented their own schemes for signing
|
30
|
+
HTTP requests, but to date, none have been placed in the public domain as a
|
31
|
+
standard. This document serves that purpose. There are no techniques in this
|
32
|
+
proposal that are novel beyond previous art, however, this aims to be a simple
|
33
|
+
mechanism for signing these requests.
|
34
|
+
|
35
|
+
# Signature Authentication Scheme
|
36
|
+
|
37
|
+
The "signature" authentication scheme is based on the model that the client must
|
38
|
+
authenticate itself with a digital signature produced by either a private
|
39
|
+
asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme
|
40
|
+
is parameterized enough such that it is not bound to any particular key type or
|
41
|
+
signing algorithm. However, it does explicitly assume that clients can send an
|
42
|
+
HTTP `Date` header.
|
43
|
+
|
44
|
+
## Authorization Header
|
45
|
+
|
46
|
+
The client is expected to send an Authorization header (as defined in RFC 2617)
|
47
|
+
with the following parameterization:
|
48
|
+
|
49
|
+
credentials := "Signature" params
|
50
|
+
params := 1#(keyId | algorithm | [headers] | [ext] | signature)
|
51
|
+
digitalSignature := plain-string
|
52
|
+
|
53
|
+
keyId := "keyId" "=" <"> plain-string <">
|
54
|
+
algorithm := "algorithm" "=" <"> plain-string <">
|
55
|
+
headers := "headers" "=" <"> 1#headers-value <">
|
56
|
+
ext := "ext" "=" <"> plain-string <">
|
57
|
+
signature := "signature" "=" <"> plain-string <">
|
58
|
+
|
59
|
+
headers-value := plain-string
|
60
|
+
plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E )
|
61
|
+
|
62
|
+
### Signature Parameters
|
63
|
+
|
64
|
+
#### keyId
|
65
|
+
|
66
|
+
REQUIRED. The `keyId` field is an opaque string that the server can use to look
|
67
|
+
up the component they need to validate the signature. It could be an SSH key
|
68
|
+
fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is
|
69
|
+
out of scope for this document.
|
70
|
+
|
71
|
+
#### algorithm
|
72
|
+
|
73
|
+
REQUIRED. The `algorithm` parameter is used if the client and server agree on a
|
74
|
+
non-standard digital signature algorithm. The full list of supported signature
|
75
|
+
mechanisms is listed below.
|
76
|
+
|
77
|
+
#### headers
|
78
|
+
|
79
|
+
OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers
|
80
|
+
used to sign the request. If specified, it should be a quoted list of HTTP
|
81
|
+
header names, separated by a single space character. By default, only one
|
82
|
+
HTTP header is signed, which is the `Date` header. Note that the list MUST be
|
83
|
+
specified in the order the values are concatenated together during signing. To
|
84
|
+
include the HTTP request line in the signature calculation, use the special
|
85
|
+
`request-line` value. While this is overloading the definition of `headers` in
|
86
|
+
HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from
|
87
|
+
headers in useful signature calculation, it is deemed simpler to simply use
|
88
|
+
`request-line` than to add a separate parameter for it.
|
89
|
+
|
90
|
+
#### extensions
|
91
|
+
|
92
|
+
OPTIONAL. The `extensions` parameter is used to include additional information
|
93
|
+
which is covered by the request. The content and format of the string is out of
|
94
|
+
scope for this document, and expected to be specified by implementors.
|
95
|
+
|
96
|
+
#### signature
|
97
|
+
|
98
|
+
REQUIRED. The `signature` parameter is a `Base64` encoded digital signature
|
99
|
+
generated by the client. The client uses the `algorithm` and `headers` request
|
100
|
+
parameters to form a canonicalized `signing string`. This `signing string` is
|
101
|
+
then signed with the key associated with `keyId` and the algorithm
|
102
|
+
corresponding to `algorithm`. The `signature` parameter is then set to the
|
103
|
+
`Base64` encoding of the signature.
|
104
|
+
|
105
|
+
### Signing String Composition
|
106
|
+
|
107
|
+
In order to generate the string that is signed with a key, the client MUST take
|
108
|
+
the values of each HTTP header specified by `headers` in the order they appear.
|
109
|
+
|
110
|
+
1. If the header name is not `request-line` then append the lowercased header
|
111
|
+
name followed with an ASCII colon `:` and an ASCII space ` `.
|
112
|
+
2. If the header name is `request-line` then append the HTTP request line,
|
113
|
+
otherwise append the header value.
|
114
|
+
3. If value is not the last value then append an ASCII newline `\n`. The string
|
115
|
+
MUST NOT include a trailing ASCII newline.
|
116
|
+
|
117
|
+
# Example Requests
|
118
|
+
|
119
|
+
All requests refer to the following request (body omitted):
|
120
|
+
|
121
|
+
POST /foo HTTP/1.1
|
122
|
+
Host: example.org
|
123
|
+
Date: Tue, 07 Jun 2011 20:51:35 GMT
|
124
|
+
Content-Type: application/json
|
125
|
+
Content-MD5: h0auK8hnYJKmHTLhKtMTkQ==
|
126
|
+
Content-Length: 123
|
127
|
+
|
128
|
+
The "rsa-key-1" keyId refers to a private key known to the client and a public
|
129
|
+
key known to the server. The "hmac-key-1" keyId refers to key known to the
|
130
|
+
client and server.
|
131
|
+
|
132
|
+
## Default parameterization
|
133
|
+
|
134
|
+
The authorization header and signature would be generated as:
|
135
|
+
|
136
|
+
Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))"
|
137
|
+
|
138
|
+
The client would compose the signing string as:
|
139
|
+
|
140
|
+
date: Tue, 07 Jun 2011 20:51:35 GMT
|
141
|
+
|
142
|
+
## Header List
|
143
|
+
|
144
|
+
The authorization header and signature would be generated as:
|
145
|
+
|
146
|
+
Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="request-line date content-type content-md5",signature="Base64(RSA-SHA256(signing string))"
|
147
|
+
|
148
|
+
The client would compose the signing string as (`+ "\n"` inserted for
|
149
|
+
readability):
|
150
|
+
|
151
|
+
POST /foo HTTP/1.1 + "\n"
|
152
|
+
date: Tue, 07 Jun 2011 20:51:35 GMT + "\n"
|
153
|
+
content-type: application/json + "\n"
|
154
|
+
content-md5: h0auK8hnYJKmHTLhKtMTkQ==
|
155
|
+
|
156
|
+
## Algorithm
|
157
|
+
|
158
|
+
The authorization header and signature would be generated as:
|
159
|
+
|
160
|
+
Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))"
|
161
|
+
|
162
|
+
The client would compose the signing string as:
|
163
|
+
|
164
|
+
date: Tue, 07 Jun 2011 20:51:35 GMT
|
165
|
+
|
166
|
+
# Signing Algorithms
|
167
|
+
|
168
|
+
Currently supported algorithm names are:
|
169
|
+
|
170
|
+
* rsa-sha1
|
171
|
+
* rsa-sha256
|
172
|
+
* rsa-sha512
|
173
|
+
* dsa-sha1
|
174
|
+
* hmac-sha1
|
175
|
+
* hmac-sha256
|
176
|
+
* hmac-sha512
|
177
|
+
|
178
|
+
# Security Considerations
|
179
|
+
|
180
|
+
## Default Parameters
|
181
|
+
|
182
|
+
Note the default parameterization of the `Signature` scheme is only safe if all
|
183
|
+
requests are carried over a secure transport (i.e., TLS). Sending the default
|
184
|
+
scheme over a non-secure transport will leave the request vulnerable to
|
185
|
+
spoofing, tampering, replay/repudiation, and integrity violations (if using the
|
186
|
+
STRIDE threat-modeling methodology).
|
187
|
+
|
188
|
+
## Insecure Transports
|
189
|
+
|
190
|
+
If sending the request over plain HTTP, service providers SHOULD require clients
|
191
|
+
to sign ALL HTTP headers, and the `request-line`. Additionally, service
|
192
|
+
providers SHOULD require `Content-MD5` calculations to be performed to ensure
|
193
|
+
against any tampering from clients.
|
194
|
+
|
195
|
+
## Nonces
|
196
|
+
|
197
|
+
Nonces are out of scope for this document simply because many service providers
|
198
|
+
fail to implement them correctly, or do not adopt security specifications
|
199
|
+
because of the infrastructure complexity. Given the `header` parameterization,
|
200
|
+
a service provider is fully enabled to add nonce semantics into this scheme by
|
201
|
+
using something like an `x-request-nonce` header, and ensuring it is signed
|
202
|
+
with the `Date` header.
|
203
|
+
|
204
|
+
## Clock Skew
|
205
|
+
|
206
|
+
As the default scheme is to sign the `Date` header, service providers SHOULD
|
207
|
+
protect against logged replay attacks by enforcing a clock skew. The server
|
208
|
+
SHOULD be synchronized with NTP, and the recommendation in this specification
|
209
|
+
is to allow 300s of clock skew (in either direction).
|
210
|
+
|
211
|
+
## Required Headers to Sign
|
212
|
+
|
213
|
+
It is out of scope for this document to dictate what headers a service provider
|
214
|
+
will want to enforce, but service providers SHOULD at minimum include the
|
215
|
+
`Date` header.
|
216
|
+
|
217
|
+
# References
|
218
|
+
|
219
|
+
## Normative References
|
220
|
+
|
221
|
+
* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1
|
222
|
+
* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication
|
223
|
+
* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2
|
224
|
+
|
225
|
+
## Informative References
|
226
|
+
|
227
|
+
Name: Mark Cavage (editor)
|
228
|
+
Company: Joyent, Inc.
|
229
|
+
Email: mark.cavage@joyent.com
|
230
|
+
URI: http://www.joyent.com
|
231
|
+
|
232
|
+
# Appendix A - Test Values
|
233
|
+
|
234
|
+
The following test data uses the RSA (2048b) keys, which we will refer
|
235
|
+
to as `keyId=Test` in the following samples:
|
236
|
+
|
237
|
+
-----BEGIN PUBLIC KEY-----
|
238
|
+
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3
|
239
|
+
6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6
|
240
|
+
Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw
|
241
|
+
oYi+1hqp1fIekaxsyQIDAQAB
|
242
|
+
-----END PUBLIC KEY-----
|
243
|
+
|
244
|
+
-----BEGIN RSA PRIVATE KEY-----
|
245
|
+
MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF
|
246
|
+
NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F
|
247
|
+
UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB
|
248
|
+
AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA
|
249
|
+
QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK
|
250
|
+
kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg
|
251
|
+
f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u
|
252
|
+
412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc
|
253
|
+
mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7
|
254
|
+
kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA
|
255
|
+
gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW
|
256
|
+
G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI
|
257
|
+
7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA==
|
258
|
+
-----END RSA PRIVATE KEY-----
|
259
|
+
|
260
|
+
And all examples use this request:
|
261
|
+
|
262
|
+
POST /foo?param=value&pet=dog HTTP/1.1
|
263
|
+
Host: example.com
|
264
|
+
Date: Thu, 05 Jan 2012 21:31:40 GMT
|
265
|
+
Content-Type: application/json
|
266
|
+
Content-MD5: Sd/dVLAcvNLSq16eXua5uQ==
|
267
|
+
Content-Length: 18
|
268
|
+
|
269
|
+
{"hello": "world"}
|
270
|
+
|
271
|
+
### Default
|
272
|
+
|
273
|
+
The string to sign would be:
|
274
|
+
|
275
|
+
date: Thu, 05 Jan 2012 21:31:40 GMT
|
276
|
+
|
277
|
+
The Authorization header would be:
|
278
|
+
|
279
|
+
Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="ATp0r26dbMIxOopqw0OfABDT7CKMIoENumuruOtarj8n/97Q3htHFYpH8yOSQk3Z5zh8UxUym6FYTb5+A0Nz3NRsXJibnYi7brE/4tx5But9kkFGzG+xpUmimN4c3TMN7OFH//+r8hBf7BT9/GmHDUVZT2JzWGLZES2xDOUuMtA="
|
280
|
+
|
281
|
+
### All Headers
|
282
|
+
|
283
|
+
Parameterized to include all headers, the string to sign would be (`+ "\n"`
|
284
|
+
inserted for readability):
|
285
|
+
|
286
|
+
POST /foo?param=value&pet=dog HTTP/1.1 + "\n"
|
287
|
+
host: example.com + "\n"
|
288
|
+
date: Thu, 05 Jan 2012 21:31:40 GMT + "\n"
|
289
|
+
content-type: application/json + "\n"
|
290
|
+
content-md5: Sd/dVLAcvNLSq16eXua5uQ== + "\n"
|
291
|
+
content-length: 18
|
292
|
+
|
293
|
+
The Authorization header would be:
|
294
|
+
|
295
|
+
Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="H/AaTDkJvLELy4i1RujnKlS6dm8QWiJvEpn9cKRMi49kKF+mohZ15z1r+mF+XiKS5kOOscyS83olfBtsVhYjPg2Ei3/D9D4Mvb7bFm9IaLJgYTFFuQCghrKQQFPiqJN320emjHxFowpIm1BkstnEU7lktH/XdXVBo8a6Uteiztw="
|
296
|
+
|