•  
      request #12198 Add REST endpoints to manage user SSH keys
    Infos
    #12198
    jed hammi (hammij)
    2022-12-07 18:52
    2018-08-29 14:19
    12877
    Details
    Add REST endpoints to manage user SSH keys
    Hello,
    We would like to add a new entry point to add a SSH key for a user , in order to automatize the process,
    I have two alternatives:
    The first one :Just modify /users/{id} entry,
    The second one : To add a new entry point,like /users/{id}/preferences,
    What do you think ,
    Thank you in advance for your support,
    Regards,
    Jed


    API
    Empty
    Empty
    • [x] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Acknowledged
    Empty
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar

    For an instance administrator, such feature is useful, mandatory. The related UI in the administration view too.

    Use case: As an administrator, I would like to remove an SSH key (API Token?) that was compromised, even if the related user is unable to do it (holidays).

    User avatar
    Thomas Gerbet (tgerbet)2018-08-31 14:46

    Hi,

    Thanks for the interest and the proposal! We had a quick chat with the rest of the team about it and we would be more inclined to accept a contribution with the following REST routes:

    GET /users/:id/ssh_keys
     

    [
      {
        "id": 1,
        "key": "ssh-rsa AAA..."
      }
    ]
    

    POST /ssh_keys

    DELETE /ssh_keys/:id

     

    These routes are more coherent with the rest of the Tuleap API and SSH keys are exposed as a proper resources instead being mixed with the user preferences.


    I also took the liberty to edit the summary of the artifact to make it a bit more explicit.


    • Summary
      -Add new entry point in the rest API  
      +Add REST endpoints to manage user SSH keys 
    • Status changed from New to Acknowledged
    • Is an Enhancement or an internal improvement? set to enhancement