Logo: Relish

  1. Sign in

Project: Possum-api

List a role's public keys

  • @logged-in
Background
Given
a new user "alice"
And
I create a new "public_key" resource called "user/[email protected]:user_namespace/workstation"
And
I create a new "public_key" resource called "user/[email protected]:user_namespace/laptop"
Scenarios
Public keys can be added and queried through the REST API.

Adding a public key for a role requires update privilege on the public_key resource.

Listing the public keys of a role doesn't require authentication.

Given
I POST "/secrets/:account/public_key/user/[email protected]:user_namespace/workstation" with body:
ssh-rsa AAAAB3NzagKagJ+JTg2LzKz3WzEe49HhIqxF workstation
And
I POST "/secrets/:account/public_key/user/[email protected]:user_namespace/laptop" with body:
ssh-rsa AAAAB3NzagKagJ+JTg2LzKz3WzEe49HhIqxF laptop
And
I log out
When
I GET "/public_keys/:account/user/[email protected]:user_namespace"
Then
the text result is:
ssh-rsa AAAAB3NzagKagJ+JTg2LzKz3WzEe49HhIqxF laptop
ssh-rsa AAAAB3NzagKagJ+JTg2LzKz3WzEe49HhIqxF workstation

Last published almost 4 years ago by Kevin Gilpin.