-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
var fs = require('fs')
var smartdc = require('smartdc')
var home = process.env.HOME
var key = fs.readFileSync(home + '/.ssh/id_rsa', 'ascii')
var client = smartdc.createClient({
url: 'https://api.joyentcloud.com',
key: key,
keyId: '/[joyent username]/keys/luke2'
})
client.listMachines(function (err, res) {
if (err) return console.log(err)
console.log(res)
})The response contains
{ message: 'Invalid signature',
body: { code: 'InvalidCredentials', message: 'Invalid signature' },
httpCode: 401,
statusCode: 401,
restCode: 'InvalidCredentials',
code: 'InvalidCredentials' }node v0.8.22
If I change the keyId to a key not on the account, the API will correctly respond with invalid key name [key].
I can use the same account info on the sdc command line scripts and it functions normally.
Metadata
Metadata
Assignees
Labels
No labels