Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Commit

Permalink
Pubkeys show and delete routes
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinmm80 committed Jan 22, 2016
1 parent bc51e6e commit 793890c
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ Only members of the group `pubkeys-1.0/key-managers` can manage public keys.

:[pubkeys.add](pubkeys.add.md)

<!-- :[pubkeys.show](pubkeys.show.md)
:[pubkeys.show](pubkeys.show.md)

:[pubkeys.delete](pubkeys.delete.md)
-->

# Group Group

A `group` represents a collection of users or groups. It is a `role` and a collection of `roles`, in RBAC terms.
Expand Down
2 changes: 1 addition & 1 deletion src/pubkeys.add.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Add [/api/pubkeys/{login}]

### Add a public key for a user [POST]
### Add a key for a user [POST]

Adds a new public key for an existing user.
Multiple keys can be uploaded per user.
Expand Down
32 changes: 32 additions & 0 deletions src/pubkeys.delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Delete [/api/pubkeys/{login}/{key_name}]

### Delete a key for a user [DELETE]

Removes a public key for a specified user.
`key_name` is the comment placed at the end of the public key, usually
an email address.

---

:[conjur_auth_header_table](partials/conjur_auth_header_table.md)

**Request Body**

The public key to add should be the entire request body.

**Response**

|Code|Description|
|----|-----------|
|204|Public key deleted for user|
|403|Permission denied|
|404|User or key not found|

+ Parameters
+ login: alice (string) - The user's login name
+ key_name: [email protected] (string) - Comment at end of SSH key to remove

+ Request
:[conjur_auth_header_code](partials/conjur_auth_header_code.md)

+ Response 204
28 changes: 28 additions & 0 deletions src/pubkeys.show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Show [/api/pubkeys/{login}/]

### Show keys for a user [GET]

Lists all public keys uploaded for a specific user.

---

:[conjur_auth_header_table](partials/conjur_auth_header_table.md)

**Response**

|Code|Description|
|----|-----------|
|200|Public key list returned|
|403|Permission denied|

+ Parameters
+ login: alice (string) - The user's login name

+ Request
:[conjur_auth_header_code](partials/conjur_auth_header_code.md)

+ Response 200 (text/html;charset=utf-8)

```
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFDhYPIMHAqlQghhdmEa98UrfK9HBX8AaW4aSj5sVwigy7wFMs9yjPfK/mGOV5T5g5TuSe8EQfRfX4Mp6yv40ta4ETAJti7cjoh8KwkxnKPUQmhkgWmTJRfwUwYq12yzmqFp7nZ6JNfng39TvD+L6McpFgC+O7O3IeGBHSz8PB6QE7TbvICSbOPU43d1MQpsvtbgIAM6rTC44JAPor9YoHSne1dsaNCsu4xFUXROJpD2V6eSRHw8tpN6vzxgym5ZDRMCWPhhN82xmEwPFt6qi6nN5ky0qTzPtJhsTu0dPjyJbgLfyFOu/iPTPHi9oWXuMJpwry9cMTG/wcAR8JG5lJ [email protected]
```
3 changes: 3 additions & 0 deletions transactions-4.5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ User > Update > Update a user record
User > List/Search > List or search for users
User > Search by UID > Search for users by UID number
User > Show > Retrieve a user's record
Pubkeys > Add > Add a key for a user
Pubkeys > Show > Show keys for a user
Pubkeys > Delete > Delete a key for a user
Group > Create > Create a new group
Group > Update > Update a group record
Group > List/Search > List or search for groups
Expand Down

0 comments on commit 793890c

Please sign in to comment.