From 0f6fa0e3d33d21d7dcd3fc5b540b84b124247534 Mon Sep 17 00:00:00 2001 From: Samuel de Medeiros Queiroz Date: Fri, 29 Jul 2016 13:04:51 -0300 Subject: [PATCH] Move Identity Provider API to its own file Change I2423030bd0849c051d22f63bf60b6a5f41f72574 migrated Federation api-ref docs into keystone repository. Moving Identity Provider API to its own file is one of the TODO comments left there, which is being addressed in this change. Change-Id: I5c5b26c2d4c9920d6b9642eaf0fc47ed5bffb3cb --- api-ref/source/v3-ext/federation.inc | 162 ----------------- .../federation/identity-provider/index.inc | 168 ++++++++++++++++++ .../identity-provider/parameters.yaml | 7 + .../samples/add-protocol-request.json} | 0 .../samples/add-protocol-response.json} | 0 .../samples/get-protocol-response.json} | 0 .../samples/get-response.json} | 0 .../samples/list-protocol-response.json} | 0 .../samples/list-response.json} | 0 .../samples/register-request.json} | 0 .../samples/register-response.json} | 0 .../samples/update-protocol-request.json} | 0 .../samples/update-protocol-response.json} | 0 .../samples/update-request.json} | 0 .../samples/update-response.json} | 0 api-ref/source/v3-ext/federation/index.inc | 2 + api-ref/source/v3-ext/index.rst | 2 + 17 files changed, 179 insertions(+), 162 deletions(-) create mode 100644 api-ref/source/v3-ext/federation/identity-provider/index.inc create mode 100644 api-ref/source/v3-ext/federation/identity-provider/parameters.yaml rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-add-protocol-request.json => federation/identity-provider/samples/add-protocol-request.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-add-protocol-response.json => federation/identity-provider/samples/add-protocol-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-get-protocol-response.json => federation/identity-provider/samples/get-protocol-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-get-response.json => federation/identity-provider/samples/get-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-list-protocol-response.json => federation/identity-provider/samples/list-protocol-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-list-response.json => federation/identity-provider/samples/list-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-register-request.json => federation/identity-provider/samples/register-request.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-register-response.json => federation/identity-provider/samples/register-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-update-protocol-request.json => federation/identity-provider/samples/update-protocol-request.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-update-protocol-response.json => federation/identity-provider/samples/update-protocol-response.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-update-request.json => federation/identity-provider/samples/update-request.json} (100%) rename api-ref/source/v3-ext/{samples/OS-FEDERATION/idp-update-response.json => federation/identity-provider/samples/update-response.json} (100%) create mode 100644 api-ref/source/v3-ext/federation/index.inc diff --git a/api-ref/source/v3-ext/federation.inc b/api-ref/source/v3-ext/federation.inc index 5baa54f387..02504aa191 100644 --- a/api-ref/source/v3-ext/federation.inc +++ b/api-ref/source/v3-ext/federation.inc @@ -294,168 +294,6 @@ If a value is not specified by the client, the service will default this value to ``ss:mem:``. -.. TODO(samueldmq): This is the Identity Provider API, move it to its own file. - -Register an Identity Provider -============================= - -.. rest_method:: PUT /v3/OS-FEDERATION/identity_providers/{idp_id} - -Normal response codes: 201 -Error response codes: 409 - -Request Example ---------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-register-request.json - :language: javascript - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-register-response.json - :language: javascript - - -List identity providers -======================= - -.. rest_method:: GET /v3/OS-FEDERATION/identity_providers - -Normal response codes: 200 - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-list-response.json - :language: javascript - - -Get Identity provider -===================== - -.. rest_method:: GET /v3/OS-FEDERATION/identity_providers/{idp_id} - -Normal response codes: 200 - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-get-response.json - :language: javascript - - -Delete identity provider -======================== - -.. rest_method:: DELETE /v3/OS-FEDERATION/identity_providers/{idp_id} - -When an identity provider is deleted, any tokens generated by that identity -provider will be revoked. - -Normal response codes: 204 - - -Update identity provider -======================== - -.. rest_method:: PATCH /v3/OS-FEDERATION/identity_providers/{idp_id} - -When an identity provider is disabled, any tokens generated by that identity -provider will be revoked. - -Normal response codes: 200 -Error response codes: 409 - -Request Example ---------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-update-request.json - :language: javascript - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-update-response.json - :language: javascript - - -Add a protocol and attribute mapping to an identity provider -============================================================ - -.. rest_method:: PUT /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} - -Normal response codes: 201 - -Request Example ---------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-add-protocol-request.json - :language: javascript - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-add-protocol-response.json - :language: javascript - - -List all protocol and attribute mappings of an identity provider -================================================================ - -.. rest_method:: GET /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols - -Normal response codes: 200 - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-list-protocol-response.json - :language: javascript - - -Get a protocol and attribute mapping for an identity provider -============================================================= - -.. rest_method:: GET /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} - -Normal response codes: 200 - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-get-protocol-response.json - :language: javascript - - -Update the attribute mapping for an identity provider and protocol -================================================================== - -.. rest_method:: PATCH /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} - -Normal response codes: 200 - -Request Example ---------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-update-protocol-request.json - :language: javascript - -Response Example ----------------- - -.. literalinclude:: ./samples/OS-FEDERATION/idp-update-protocol-response.json - :language: javascript - - -Delete a protocol and attribute mapping from an identity provider -================================================================= - -.. rest_method:: DELETE /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} - -Normal response codes: 204 - - .. TODO(samueldmq): This is the Mapping API, move it to its own file. Create a mapping diff --git a/api-ref/source/v3-ext/federation/identity-provider/index.inc b/api-ref/source/v3-ext/federation/identity-provider/index.inc new file mode 100644 index 0000000000..f4210d2e4e --- /dev/null +++ b/api-ref/source/v3-ext/federation/identity-provider/index.inc @@ -0,0 +1,168 @@ +.. -*- rst -*- + +===================================== + OS-FEDERATION IDENTITY PROVIDER API +===================================== + +Provide the ability for users to manage Identity Providers (IdPs). Requires +v3.0+ of the Identity API. + + +Register an Identity Provider +============================= + +.. rest_method:: PUT /v3/OS-FEDERATION/identity_providers/{idp_id} + +Normal response codes: 201 +Error response codes: 409 + +Request Example +--------------- + +.. literalinclude:: federation/identity-provider/samples/register-request.json + :language: javascript + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/register-response.json + :language: javascript + + +List identity providers +======================= + +.. rest_method:: GET /v3/OS-FEDERATION/identity_providers + +Normal response codes: 200 + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/list-response.json + :language: javascript + + +Get Identity provider +===================== + +.. rest_method:: GET /v3/OS-FEDERATION/identity_providers/{idp_id} + +Normal response codes: 200 + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/get-response.json + :language: javascript + + +Delete identity provider +======================== + +.. rest_method:: DELETE /v3/OS-FEDERATION/identity_providers/{idp_id} + +When an identity provider is deleted, any tokens generated by that identity +provider will be revoked. + +Normal response codes: 204 + + +Update identity provider +======================== + +.. rest_method:: PATCH /v3/OS-FEDERATION/identity_providers/{idp_id} + +When an identity provider is disabled, any tokens generated by that identity +provider will be revoked. + +Normal response codes: 200 +Error response codes: 409 + +Request Example +--------------- + +.. literalinclude:: federation/identity-provider/samples/update-request.json + :language: javascript + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/update-response.json + :language: javascript + + +Add a protocol and attribute mapping to an identity provider +============================================================ + +.. rest_method:: PUT /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} + +Normal response codes: 201 + +Request Example +--------------- + +.. literalinclude:: federation/identity-provider/samples/add-protocol-request.json + :language: javascript + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/add-protocol-response.json + :language: javascript + + +List all protocol and attribute mappings of an identity provider +================================================================ + +.. rest_method:: GET /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols + +Normal response codes: 200 + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/list-protocol-response.json + :language: javascript + + +Get a protocol and attribute mapping for an identity provider +============================================================= + +.. rest_method:: GET /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} + +Normal response codes: 200 + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/get-protocol-response.json + :language: javascript + + +Update the attribute mapping for an identity provider and protocol +================================================================== + +.. rest_method:: PATCH /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} + +Normal response codes: 200 + +Request Example +--------------- + +.. literalinclude:: federation/identity-provider/samples/update-protocol-request.json + :language: javascript + +Response Example +---------------- + +.. literalinclude:: federation/identity-provider/samples/update-protocol-response.json + :language: javascript + + +Delete a protocol and attribute mapping from an identity provider +================================================================= + +.. rest_method:: DELETE /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id} + +Normal response codes: 204 \ No newline at end of file diff --git a/api-ref/source/v3-ext/federation/identity-provider/parameters.yaml b/api-ref/source/v3-ext/federation/identity-provider/parameters.yaml new file mode 100644 index 0000000000..f5364194f2 --- /dev/null +++ b/api-ref/source/v3-ext/federation/identity-provider/parameters.yaml @@ -0,0 +1,7 @@ +# variables in header + +# variables in path + +# variables in query + +# variables in body diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-add-protocol-request.json b/api-ref/source/v3-ext/federation/identity-provider/samples/add-protocol-request.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-add-protocol-request.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/add-protocol-request.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-add-protocol-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/add-protocol-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-add-protocol-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/add-protocol-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-get-protocol-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/get-protocol-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-get-protocol-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/get-protocol-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-get-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/get-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-get-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/get-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-list-protocol-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/list-protocol-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-list-protocol-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/list-protocol-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-list-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/list-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-list-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/list-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-register-request.json b/api-ref/source/v3-ext/federation/identity-provider/samples/register-request.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-register-request.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/register-request.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-register-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/register-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-register-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/register-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-protocol-request.json b/api-ref/source/v3-ext/federation/identity-provider/samples/update-protocol-request.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-protocol-request.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/update-protocol-request.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-protocol-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/update-protocol-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-protocol-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/update-protocol-response.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-request.json b/api-ref/source/v3-ext/federation/identity-provider/samples/update-request.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-request.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/update-request.json diff --git a/api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-response.json b/api-ref/source/v3-ext/federation/identity-provider/samples/update-response.json similarity index 100% rename from api-ref/source/v3-ext/samples/OS-FEDERATION/idp-update-response.json rename to api-ref/source/v3-ext/federation/identity-provider/samples/update-response.json diff --git a/api-ref/source/v3-ext/federation/index.inc b/api-ref/source/v3-ext/federation/index.inc new file mode 100644 index 0000000000..62bbca5790 --- /dev/null +++ b/api-ref/source/v3-ext/federation/index.inc @@ -0,0 +1,2 @@ + +.. include:: federation/identity-provider/index.inc diff --git a/api-ref/source/v3-ext/index.rst b/api-ref/source/v3-ext/index.rst index 5cfd4b3157..5afd07035a 100644 --- a/api-ref/source/v3-ext/index.rst +++ b/api-ref/source/v3-ext/index.rst @@ -12,6 +12,7 @@ This page describes these Identity API v3 extensions: * `OS-REVOKE API`_ * `OS-EP-FILTER API`_ * `OS-FEDERATION API`_ +* `OS-FEDERATION IDENTITY PROVIDER API`_ .. rest_expand_all:: @@ -21,3 +22,4 @@ This page describes these Identity API v3 extensions: .. include:: revoke.inc .. include:: ep-filter.inc .. include:: federation.inc +.. include:: federation/index.inc