<commit_before><?xml version="1.0" encoding="UTF-8"?>
<section xml:id="verifying-identity-install"
    xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
    <title>Verifying the Identity Service Installation</title>
    <para>Install curl, a command-line tool for running REST API
        requests along with openssl for meeting a dependency
        requirement:</para>
    <screen os="ubuntu"><prompt>$</prompt><userinput>apt-get install curl openssl</userinput></screen>
    <screen os="rhel;fedora;centos"><prompt>$</prompt><userinput>yum install curl openssl</userinput></screen>
    <para>Here is a curl command you can use to ensure that the Identity service is working:</para>
    <literallayout class="monospaced">curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials":{"username": "adminUser", "password": "<PASSWORD>"}}}' -H "Content-type: application/json" http://192.168.206.130:35357/v2.0/tokens | python -mjson.tool</literallayout>
    <para>In return, you should receive a token for the adminUser
        user. </para>
    <literallayout class="monospaced">{
    "access": {
        "serviceCatalog": {}, 
        "token": {
            "expires": "2012-04-12T00:40:12Z", 
            "id": "cec68088d08747639c682ee5228106d1"
        }, 
        "user": {
            "id": "6b0141904f09480d810a5949d79ea0f3", 
            "name": "adminUser", 
            "roles": [], 
            "roles_links": [], 
            "username": "adminUser"
        }
    }
}</literallayout>
    <para>You can also get a token that expires in 24 hours using the
        adminUser account:</para>
    <literallayout class="monospaced">curl -d '{"auth": {"tenantName": "openstackDemo", "passwordCredentials":{"username": "adminUser", "password": "<PASSWORD>"}}}' -H "Content-type: application/json" http://192.168.206.130:35357/v2.0/tokens | python -mjson.tool</literallayout>
    <para>In return, you get the token listing shown below.</para>
    <literallayout class="monospaced">
{
    "access": {
        "serviceCatalog": {}, 
        "token": {
            "expires": "2012-04-12T00:41:21Z", 
            "id": "a22<PASSWORD>", 
            "tenant": {
                "description": "Default Tenant", 
                "enabled": true, 
                "id": "50af8cc655c24ada96f73010c96b70a2", 
                "name": "openstackDemo"
            }
        }, 
        "user": {
            "id": "6b0141904f09480d810a5949d79ea0f3", 
            "name": "adminUser", 
            "roles": [], 
            "roles_links": [], 
            "username": "adminUser"
        }
    }
}
    </literallayout>
    
    <para>Here is another quick test to ensure that the Keystone CLI
        is working. First, set up a keystonerc file with the admin
        token and the necessary password: </para>
        
        <programlisting language="bash">
        export ADMIN_TOKEN=<PASSWORD>
        export OS_USERNAME=adminUser
        export OS_PASSWORD=<PASSWORD>
        export OS_TENANT_NAME=openstackDemo
        export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
        </programlisting>
        <para>Source the file.</para>
    <screen>
    <prompt>$</prompt> <userinput>. ./keystonerc</userinput></screen>
    <para>You should see a listing of users after typing in <userinput>keystone user-list</userinput>.</para>
    <screen><prompt>$</prompt> <userinput>keystone user-list</userinput>
<computeroutput>
+----------------------------------+---------+-------+-----------+
|                id                | enabled | email |    name   |
+----------------------------------+---------+-------+-----------+
| 318003c9a97342dbab6ff81675d68364 | True    | None  | swift     |
| <PASSWORD> | True    | None  | nova      |
| ac4dd12ebad84e55a1cd9<PASSWORD> | True    | None  | glance    |<commit_msg>Replaced public port with admin port (bug 1060680)<commit_after><?xml version="1.0" encoding="UTF-8"?>
<section xml:id="verifying-identity-install"
    xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
    <title>Verifying the Identity Service Installation</title>
    <para>Install curl, a command-line tool for running REST API
        requests along with openssl for meeting a dependency
        requirement:</para>
    <screen os="ubuntu"><prompt>$</prompt><userinput>apt-get install curl openssl</userinput></screen>
    <screen os="rhel;fedora;centos"><prompt>$</prompt><userinput>yum install curl openssl</userinput></screen>
    <para>Here is a curl command you can use to ensure that the Identity service is working:</para>
    <literallayout class="monospaced">curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials":{"username": "adminUser", "password": "<PASSWORD>"}}}' -H "Content-type: application/json" http://192.168.206.130:35357/v2.0/tokens | python -mjson.tool</literallayout>
    <para>In return, you should receive a token for the adminUser
        user. </para>
    <literallayout class="monospaced">{
    "access": {
        "serviceCatalog": {}, 
        "token": {
            "expires": "2012-04-12T00:40:12Z", 
            "id": "cec68088d08747639c682ee5228106d1"
        }, 
        "user": {
            "id": "6b0141904f09480<PASSWORD>a5<PASSWORD>", 
            "name": "adminUser", 
            "roles": [], 
            "roles_links": [], 
            "username": "adminUser"
        }
    }
}</literallayout>
    <para>You can also get a token that expires in 24 hours using the
        adminUser account:</para>
    <literallayout class="monospaced">curl -d '{"auth": {"tenantName": "openstackDemo", "passwordCredentials":{"username": "adminUser", "password": "<PASSWORD>"}}}' -H "Content-type: application/json" http://192.168.206.130:35357/v2.0/tokens | python -mjson.tool</literallayout>
    <para>In return, you get the token listing shown below.</para>
    <literallayout class="monospaced">
{
    "access": {
        "serviceCatalog": {}, 
        "token": {
            "expires": "2012-04-12T00:41:21Z", 
            "id": "<KEY>", 
            "tenant": {
                "description": "Default Tenant", 
                "enabled": true, 
                "id": "50af8cc655c24ada96f73010c96b70a2", 
                "name": "openstackDemo"
            }
        }, 
        "user": {
            "id": "6b0141904f09480d810a5949d79ea0f3", 
            "name": "adminUser", 
            "roles": [], 
            "roles_links": [], 
            "username": "adminUser"
        }
    }
}
    </literallayout>
    
    <para>Here is another quick test to ensure that the Keystone CLI
        is working. First, set up a keystonerc file with the admin
        credentials and admin endpoint: </para>
        
        <programlisting language="bash">
        export OS_USERNAME=adminUser
        export OS_PASSWORD=<PASSWORD>
        export OS_TENANT_NAME=openstackDemo
        export OS_AUTH_URL=http://127.0.0.1:35357/v2.0/
        </programlisting>
        <para>Source the file.</para>
    <screen>
    <prompt>$</prompt> <userinput>. ./keystonerc</userinput></screen>
    <para>You should see a listing of users after typing in <userinput>keystone user-list</userinput>.</para>
    <screen><prompt>$</prompt> <userinput>keystone user-list</userinput>
<computeroutput>
+----------------------------------+---------+-------+-----------+
|                id                | enabled | email |    name   |
+----------------------------------+---------+-------+-----------+
| 318003c9a97342dbab6ff81675d68364 | True    | None  | swift     |
| 3a316b32f44941c0b9ebc577feaa5b5c | True    | None  | nova      |
| ac4dd12ebad84e55a1cd964b356ddf65 | True    | None  | glance    |
{'fraction_non_alphanumeric': 0.17492972144134936, 'fraction_numerical': 0.059161768464094044, 'mean_word_length': 2.3780750971083298, 'pattern_counts': {'":': 74, '<': 128, '<?xml version=': 2, '>': 128, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1887979', 'n_tokens_mistral': 2756, 'n_tokens_neox': 2409, 'n_words': 512}