Skip to content
This repository was archived by the owner on Aug 7, 2019. It is now read-only.

Cant enable github authentication on ibmblockchain/composer-rest-server #127

Open
simonmullaney opened this issue Jun 27, 2018 · 4 comments

Comments

@simonmullaney
Copy link

I have my blockchain network setup up on the IBM blockchain starter plan using the starter kit (https://github.com/sstone1/blockchain-starter-kit)

I'm trying to setup up GitHub passport authentication on my ibmblockchain/composer-rest-server but I cant install the passport-github package on my composer-rest server.

If I ssh into my server I don't have the permission to use npm as I'm the composer user and I don't know where to find the password to change to the root user.

I tried to install the npm package by adding 'npm install -g passport-github' in the deploy_composer_rest_server in the pipeline-DEPLOY.sh file in https://github.com/sstone1/blockchain-starter-kit/blob/master/.bluemix/pipeline-DEPLOY.sh but it still didn't work.

I also tried running a task ( bx cf run-task composer-rest-server-block-aviation-network "cd /home/composer/.npm-global/lib/node_modules/@ibmblockchain/composer-rest-server/node_modules && npm install --production -g passport-github") on the server but it didnt work for some reason even though the output was as expected when I looked for the package i couldnt find it.

If I look at the logs of my ibmblockchain/composer-rest-server I keep getting the error:

Cannot find module 'passport-github'

Do you now a way to get around this or know how to install the 'passport-github' package on the ibmblockchain/composer-rest-server?

@davidkel
Copy link

The starter kit deploys the standard docker image composer rest server. I'm guessing that if you restart the service then it would create a new container from the image. This image doesn't have any passport authentication included such as github. It looks like you are trying to connect to the running container to install passport-githup (and I note you are in the wrong directory when you try to perform the npm install) but that only modifies the running container.

You could create your own custom rest server docker image, publish it to dockerhub and then modify the DEPLOY script to use your image.

@simonmullaney
Copy link
Author

Hey David, thanks for the comment - thats exactly what I did - I created my own custom rest server docker image, published it to dockerhub and then modified the deploy script to use my image.

I know its a little off topic but do you know of a easy way to change the starter kit to deploy more than two organisations?

@davidkel
Copy link

davidkel commented Aug 3, 2018

@simonmullaney sorry I don't know of an easy way.

@simonmullaney
Copy link
Author

thanks @davidkel!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants