From f5649079bb2e854cc615529d2ebba22ab13d8b6b Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Mon, 27 Feb 2017 10:21:28 +0100 Subject: [PATCH] Exchange cURL examples for openstackclient python-openstackclient is friendlier than cURL and is able to handle listing resources available to federated users as well as scoping unscoped tokens, so let's use openstackclient in the examples for performing federated authentication. Change-Id: Ie4578d4a371b50ad8c2b2a6836caba580c120cd4 --- .../federation/configure_federation.rst | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/doc/source/federation/configure_federation.rst b/doc/source/federation/configure_federation.rst index 9e18b8f92d..4433854c26 100644 --- a/doc/source/federation/configure_federation.rst +++ b/doc/source/federation/configure_federation.rst @@ -367,19 +367,25 @@ projects and domains that are accessible. Read more about `listing resources `__. -~~~~~~~~~~~~ -Example cURL -~~~~~~~~~~~~ +~~~~~~~ +Example +~~~~~~~ .. code-block:: bash - $ curl -X GET -H "X-Auth-Token: " http://localhost:5000/v3/OS-FEDERATION/projects + $ export OS_IDENTITY_API_VERSION=3 + $ export OS_TOKEN= + $ export OS_URL=http://localhost:5000/v3 + $ openstack federation project list or .. code-block:: bash - $ curl -X GET -H "X-Auth-Token: " http://localhost:5000/v3/OS-FEDERATION/domains + $ export OS_IDENTITY_API_VERSION=3 + $ export OS_TOKEN= + $ export OS_URL=http://localhost:5000/v3 + $ openstack federation domain list Get a scoped token ~~~~~~~~~~~~~~~~~~ @@ -391,13 +397,19 @@ sufficient to uniquely identify a project or domain. Read more about `getting a scoped token `__. -~~~~~~~~~~~~ -Example cURL -~~~~~~~~~~~~ +~~~~~~~ +Example +~~~~~~~ .. code-block:: bash - $ curl -X POST -H "Content-Type: application/json" -d '{"auth":{"identity":{"methods":["mapped"],"mapped":{"id":""}},"scope":{"project":{"domain": {"name": "federated_domain"},"name":"federated_project"}}}}' -D - http://localhost:5000/v3/auth/tokens + $ export OS_AUTH_TYPE=token + $ export OS_IDENTITY_API_VERSION=3 + $ export OS_TOKEN= + $ export OS_AUTH_URL=http://localhost:5000/v3 + $ export OS_PROJECT_DOMAIN_NAME=federated_domain + $ export OS_PROJECT_NAME=federated_project + $ openstack token issue -------------------------------------- Keystone as an Identity Provider (IdP)