Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-2223

Privileged API user cannot edit SSH key

    XMLWordPrintable

Details

    Description

      With both 3.3.4 and 4.0.0-rc1 a CO privileged API user cannot edit an existing SSH key.

      Here is an example for 4.0.0-rc1:

      curl \
      --verbose \
      -u 'co_2.rest_user_01:XXXXXXXX' \
      -X PUT \
      -H 'Content-Type: application/json' \
      -d @ssh_key_edit.json \
      'https://registry-dev.skoranda.scgvm.net/registry/ssh_key_authenticator/ssh_keys/1.json'

      The file ssh_key_edit.json is

      {
      "RequestType":"SshKeys",
      "Version":"1.0",
      "SshKeys":
      [
      {
      "Version":"1.0",
      "Person":

      { "Type":"CO", "Id":"2" }

      ,
      "Comment":"Uploaded via REST call",
      "Type":"ssh-rsa",
      "Skey":"AAAAB3NzaC1yc2EAAAABIwAAAQEAr9amUAycDrDj2f2kLkK6b5X5DYr+4kmRcYfjcOQG9capsUDh44E8C1KKKRtVZNCM4QAXjHHuIQhb7/YysH6XpjUypzHciDNyJ6f3H0Phrcu9X5HSXlPNuyHlq1rtxtuXnd/UPmrZlSuy1Kt4bjjk5EYI6XMXQjlZMet9mT8y0kB1NALGqfLm1LesjShEmKCqP97fj//jRakm661TDdphjKR7e/O6wB80BHZAUznd+4XqYoQ8wPMWFKk21ZtwNWEpgooPhwC956BmsGRXHzySct/LISNAwbQdNaxTKeWdLGvsD6uivBsbBe2egrkCB0UKzcyXTuQv3W4cElAzDFROEQ==",
      "SshKeyAuthenticatorId":"1"
      }
      ]
      }

      I have verified that the CO Person ID is 2 and that the existing SSH key has ID 1.

      The server returns a 401.

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            scott.koranda@at.internet2.edu Scott Koranda (uwm.edu/illinois.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: