strongloop / strong-remoting

Communicate between objects in servers, mobile apps, and other servers.
www.strongloop.com
Other
105 stars 93 forks source link

Add support for pass-through authentication #430

Closed Traksewt closed 6 years ago

Traksewt commented 7 years ago

Description

Allow the rest connector to call other loopback services by passing on the user authorization from the options where available. This is the fallback if no other authorization is specified.

This allows loopback servers to communicate securely with other loopback servers by passing on the auth token. Useful for using loopback as microservices.

Related issues

Checklist

slnode commented 7 years ago

Can one of the admins verify this patch?

slnode commented 7 years ago

Can one of the admins verify this patch?

slnode commented 7 years ago

Can one of the admins verify this patch?

Traksewt commented 7 years ago

recreated #421 to be based on master branch

bajtos commented 7 years ago

@Traksewt great, thank you for the updated patch. I'm short on time today and off work tomorrow, I'll take a look next week.

bajtos commented 7 years ago

@slnode ok to test

Traksewt commented 6 years ago

@bajtos I'm not sure how to fix the PR Builder as I don't have access to see the Details on the build machine.

bajtos commented 6 years ago

Hey, sorry for the delay, I am going to review this right now.

I'm not sure how to fix the PR Builder as I don't have access to see the Details on the build machine.

Unfortunately those CI machines are accessible only from the internal IBM network :(

The error seems unrelated to your changes to me, I think we can safely ignore it.

Installing dependencies in preparation for tests and possibly publishing...
+ npm install --ignore-scripts
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-89-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--ignore-scripts"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code E404

npm ERR! 404 no such package available : restore-cursor
npm ERR! 404 
npm ERR! 404  'restore-cursor' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'cli-cursor'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

cc @rmg is this a known problem of our CI?

bajtos commented 6 years ago

The changes look good to me at high level. I cleaned the code a bit for you, PTAL at b7c3564 and let me know if this is ok with you.

Traksewt commented 6 years ago

thanks @bajtos looks good. Good to hear we can use let & const. I was used to the 2.x codebase.

bajtos commented 6 years ago

[cis-jenkins] x64 && linux && nvm,4 — Failed! (e8ef11e)

This failure is unrelated to the changes made by this patch. I am going to ignore it.

bajtos commented 6 years ago

Landed, thank you for the contribution!