Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
| 3 | .. Copyright 2018 Intel Corporation, Inc |
| 4 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 5 | Usage Scenario |
Kiran Kamineni | d977f32 | 2018-05-23 11:05:08 -0700 | [diff] [blame^] | 6 | -------------- |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 7 | |
| 8 | **Create a Domain** |
| 9 | |
| 10 | This is the root where you will store your secrets. |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 11 | |
| 12 | .. code-block:: guess |
| 13 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 14 | curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 15 | -X POST \ |
| 16 | -d '{ |
| 17 | "name": "mysecretdomain" |
| 18 | }' |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 19 | https://aaf-sms.onap:10443/v1/sms/domain |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 20 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 21 | .. end |
| 22 | |
| 23 | --------------- |
| 24 | |
| 25 | **Add a new Secret** |
| 26 | |
| 27 | Store a new secret in your created Domain. |
| 28 | Secrets have a name and a map containing key value pairs. |
| 29 | |
| 30 | .. code-block:: guess |
| 31 | |
| 32 | curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 33 | -X POST \ |
| 34 | -d '{ |
| 35 | "name": "mysecret", |
| 36 | "values": { |
| 37 | "name": "rah", |
| 38 | "age": 35, |
| 39 | "password": "mypassword" |
| 40 | } |
| 41 | }' |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 42 | https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 43 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 44 | .. end |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 45 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 46 | --------------- |
| 47 | |
| 48 | **List all Secret Names in a Domain** |
| 49 | |
| 50 | .. code-block:: guess |
| 51 | |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 52 | curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key |
| 53 | -X GET \ |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 54 | https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 55 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 56 | .. end |
| 57 | |
| 58 | --------------- |
| 59 | |
| 60 | **Get a previously stored Secret from Domain** |
| 61 | |
| 62 | .. code-block:: guess |
| 63 | |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 64 | curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key |
| 65 | -X GET \ |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 66 | https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret/<PREVIOUSLY CREATED SECRET NAME> |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 67 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 68 | .. end |
| 69 | |
| 70 | --------------- |
| 71 | |
| 72 | **Delete a Secret in specified Domain** |
| 73 | |
| 74 | .. code-block:: guess |
| 75 | |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 76 | curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key |
| 77 | -X DELETE \ |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 78 | https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret/<PREVIOUSLY CREATED SECRET NAME> |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 79 | |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 80 | .. end |
| 81 | |
| 82 | --------------- |
| 83 | |
| 84 | **Delete a Domain** |
| 85 | |
| 86 | .. code-block:: guess |
| 87 | |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 88 | curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key |
| 89 | -X DELETE \ |
Kiran Kamineni | 78d594b | 2018-05-22 17:38:16 -0700 | [diff] [blame] | 90 | https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME> |
Kiran Kamineni | ac134cb | 2018-05-04 16:50:39 -0700 | [diff] [blame] | 91 | .. end |