Code Monkey home page Code Monkey logo

Comments (8)

kr1sp1n avatar kr1sp1n commented on June 9, 2024

@marcoslopes OK, will have a look at it asap...thanx for finding this issue 👍

from node-vault.

marcoslopes avatar marcoslopes commented on June 9, 2024

@kr1sp1n no, thank you for the prompt reply! =]

from node-vault.

kr1sp1n avatar kr1sp1n commented on June 9, 2024

@marcoslopes Should be fixed now since version 0.5.5
Please verify! Thanks 👍

from node-vault.

marcoslopes avatar marcoslopes commented on June 9, 2024

@kr1sp1n yeah it works like a charm! thanks heaps for that! 👍

from node-vault.

dishcandanty avatar dishcandanty commented on June 9, 2024

This broken again? Using userpass authentication. Which seems to succeed, but further calls fail.

node-vault@^0.5.6

Unhandled rejection Error: missing client token
    at handleVaultResponse (node_modules/node-vault/dist/index.js:36:19)
    at tryCatcher (node_modules/request-promise/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/request-promise/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (node_modules/request-promise/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (node_modules/request-promise/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (node_modules/request-promise/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (node_modules/request-promise/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (node_modules/request-promise/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

from node-vault.

kr1sp1n avatar kr1sp1n commented on June 9, 2024

@dishcandanty Will have a look asap.

from node-vault.

kr1sp1n avatar kr1sp1n commented on June 9, 2024

@dishcandanty I tested it and improved the examples in the develop branch.
Here is how it works for me now:

  1. Start vault
    docker-compose up --force-recreate vault
  2. Initialize vault and copy root_token from the response
    node example/init.js
  3. Set env var VAULT_TOKEN
    export VAULT_TOKEN=[root_token]
  4. Add policy mypolicy
    node example/addPolicy.js
  5. Enable userpass auth
    node example/enableAuth_userpass.js
  6. Login via userpass auth
    node example/userpassLogin.js

It is required that you set vault.token to the client_token value from the login response.
That is at the moment far from perfect. Would be better to set the token automatically after any login strategy (e.g. github etc.).

from node-vault.

kr1sp1n avatar kr1sp1n commented on June 9, 2024

Ok, will close this issue for now.

from node-vault.

Related Issues (20)

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.