Skip to content

Invalid signature response #25

@luk-

Description

@luk-

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions