From b76348a384c287d3abe5a7aa6b9ab827d7a40903 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Wed, 22 Jun 2011 16:17:28 -0500 Subject: Issue 31: Switching default ports to 5000/5001 (public/admin) --- README.md | 18 +++++++++--------- bin/keystone | 2 +- bin/sampledata.sh | 2 +- doc/guide/src/docbkx/identity.wadl | 2 +- etc/keystone.conf | 4 ++-- examples/echo/echo/echo.ini | 4 ++-- examples/echo/echo/echo_basic.ini | 4 ++-- examples/echo/echo/echo_remote.ini | 2 +- examples/echo/echo_client.py | 3 +-- examples/paste/auth_token.ini | 2 +- examples/paste/nova-api-paste.ini | 2 +- keystone/common/config.py | 4 ++-- keystone/test/IdentitySOAPUI.xml | 8 ++++---- keystone/test/unit/test_common.py | 4 ++-- 14 files changed, 30 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 16257e2f..f5a52fdc 100644 --- a/README.md +++ b/README.md @@ -196,15 +196,15 @@ in troubleshooting:
     # Get an unscoped token
     
-    $ curl -d '{"passwordCredentials": {"username": "joeuser", "password": "secrete"}}' -H "Content-type: application/json" http://localhost:8080/v2.0/tokens
+    $ curl -d '{"passwordCredentials": {"username": "joeuser", "password": "secrete"}}' -H "Content-type: application/json" http://localhost:5000/v2.0/tokens
 
     # Get a token for a tenant
 
-    $ curl -d '{"passwordCredentials": {"username": "joeuser", "password": "secrete", "tenantId": "1234"}}' -H "Content-type: application/json" http://localhost:8080/v2.0/tokens
+    $ curl -d '{"passwordCredentials": {"username": "joeuser", "password": "secrete", "tenantId": "1234"}}' -H "Content-type: application/json" http://localhost:5000/v2.0/tokens
 
     # Get an admin token
 
-    $ curl -d '{"passwordCredentials": {"username": "admin", "password": "secrete"}}' -H "Content-type: application/json" http://localhost:8081/v2.0/tokens
+    $ curl -d '{"passwordCredentials": {"username": "admin", "password": "secrete"}}' -H "Content-type: application/json" http://localhost:5001/v2.0/tokens
 
#### Load Testing @@ -216,7 +216,7 @@ in troubleshooting: # Call Apache Bench - $ ab -c 30 -n 1000 -T "application/json" -p post_data http://127.0.0.1:8081/v2.0/tokens + $ ab -c 30 -n 1000 -T "application/json" -p post_data http://127.0.0.1:5001/v2.0/tokens ## NOVA Integration @@ -258,8 +258,8 @@ Assuming you added the test data using bin/sampledata.sh, you can then use joeus $ cd ~/keystone/bin && ./keystone Starting the Legacy Authentication component - Service API listening on 0.0.0.0:8080 - Admin API listening on 0.0.0.0:8081 + Service API listening on 0.0.0.0:5000 + Admin API listening on 0.0.0.0:5001 4. In another window, edit the `~/keystone/bin/sampledata.sh` file, find the `public.cloudfiles.com` text and replace it with the URL to your Swift @@ -289,7 +289,7 @@ Assuming you added the test data using bin/sampledata.sh, you can then use joeus use = egg:keystone#tokenauth auth_protocol = http auth_host = 127.0.0.1 - auth_port = 8081 + auth_port = 5001 admin_token = 999888777666 delay_auth_decision = 0 service_protocol = http @@ -313,8 +313,8 @@ Assuming you added the test data using bin/sampledata.sh, you can then use joeus container or upload something as your first action to have the account created; there's a Swift bug to be fixed soon): - $ st -A http://127.0.0.1:8080/v1.0 -U joeuser -K secrete post container - $ st -A http://127.0.0.1:8080/v1.0 -U joeuser -K secrete stat -v + $ st -A http://127.0.0.1:5000/v1.0 -U joeuser -K secrete post container + $ st -A http://127.0.0.1:5000/v1.0 -U joeuser -K secrete stat -v StorageURL: http://127.0.0.1:8888/v1/AUTH_1234 Auth Token: 74ce1b05-e839-43b7-bd76-85ef178726c3 Account: AUTH_1234 diff --git a/bin/keystone b/bin/keystone index 30c5653c..3349f634 100755 --- a/bin/keystone +++ b/bin/keystone @@ -48,7 +48,7 @@ if __name__ == '__main__': # Handle a special argument to support starting two endpoints common_group.add_option( '-a', '--admin-port', dest="admin_port", metavar="PORT", - help="specifies port for Admin API to listen on (default is 8081)") + help="specifies port for Admin API to listen on (default is 5001)") # Parse arguments and load config (options, args) = config.parse_options(parser) diff --git a/bin/sampledata.sh b/bin/sampledata.sh index 3c22dc2f..0b2fe8bd 100755 --- a/bin/sampledata.sh +++ b/bin/sampledata.sh @@ -43,7 +43,7 @@ `dirname $0`/keystone-manage $* endpointTemplates add RegionOne nova http://nova.publicinternets.com/v1.1/ http://127.0.0.1:8774/v1.1 http://localhost:8774/v1.1 1 `dirname $0`/keystone-manage $* endpointTemplates add RegionOne glance http://glance.publicinternets.com/v1.1/%tenant_id% http://nova.admin-nets.local/v1.1/%tenant_id% http://127.0.0.1:9292/v1.1/%tenant_id% 1 `dirname $0`/keystone-manage $* endpointTemplates add RegionOne cdn http://cdn.publicinternets.com/v1.1/%tenant_id% http://cdn.admin-nets.local/v1.1/%tenant_id% http://127.0.0.1:7777/v1.1/%tenant_id% 1 -`dirname $0`/keystone-manage $* endpointTemplates add RegionOne keystone http://keystone.publicinternets.com/v2.0 http://127.0.0.1:8081/v2.0 http://127.0.0.1:8080/v2.0 1 +`dirname $0`/keystone-manage $* endpointTemplates add RegionOne keystone http://keystone.publicinternets.com/v2.0 http://127.0.0.1:5001/v2.0 http://127.0.0.1:5000/v2.0 1 diff --git a/doc/guide/src/docbkx/identity.wadl b/doc/guide/src/docbkx/identity.wadl index b153904d..2d1755ee 100644 --- a/doc/guide/src/docbkx/identity.wadl +++ b/doc/guide/src/docbkx/identity.wadl @@ -17,7 +17,7 @@ - + diff --git a/etc/keystone.conf b/etc/keystone.conf index 8efa5d7e..c2f30556 100755 --- a/etc/keystone.conf +++ b/etc/keystone.conf @@ -32,7 +32,7 @@ service-header-mappings = {'nova' : 'X-Server-Management-Url' , 'swift' : 'X-Sto server_bind_host = 0.0.0.0 # Port the bind the API server to -server_bind_port = 8080 +server_bind_port = 5000 [app:admin] paste.app_factory = keystone.server:admin_app_factory @@ -40,7 +40,7 @@ paste.app_factory = keystone.server:admin_app_factory bind_host = 0.0.0.0 # Port the bind the Admin API server to -bind_port = 8081 +bind_port = 5001 [app:server] paste.app_factory = keystone.server:app_factory diff --git a/examples/echo/echo/echo.ini b/examples/echo/echo/echo.ini index a7b95e9e..cc21b947 100644 --- a/examples/echo/echo/echo.ini +++ b/examples/echo/echo/echo.ini @@ -6,7 +6,7 @@ delay_auth_decision = 0 ;where to find the OpenStack service (if not in local WSGI chain) service_protocol = http service_host = 127.0.0.1 -service_port = 8081 +service_port = 5001 ;used to verify this component with the OpenStack service (or PAPIAuth) service_pass = dTpw @@ -23,7 +23,7 @@ pipeline = paste.filter_factory = keystone.auth_protocols.auth_token:filter_factory ;where to find the token auth service auth_host = 127.0.0.1 -auth_port = 8081 +auth_port = 5001 auth_protocol = http ;how to authenticate to the auth service for priviledged operations ;like validate token diff --git a/examples/echo/echo/echo_basic.ini b/examples/echo/echo/echo_basic.ini index 65c85357..e1c7a42a 100644 --- a/examples/echo/echo/echo_basic.ini +++ b/examples/echo/echo/echo_basic.ini @@ -6,7 +6,7 @@ delay_auth_decision = 0 ;where to find the OpenStack service (if not in local WSGI chain) service_protocol = http service_host = 127.0.0.1 -service_port = 8081 +service_port = 5001 ;used to verify this component with the OpenStack service (or PAPIAuth) service_pass = dTpw @@ -23,7 +23,7 @@ pipeline = paste.filter_factory = keystone.auth_protocols.auth_token:filter_factory ;where to find the token auth service auth_host = 127.0.0.1 -auth_port = 8081 +auth_port = 5001 auth_protocol = http ;how to authenticate to the auth service for priviledged operations ;like validate token diff --git a/examples/echo/echo/echo_remote.ini b/examples/echo/echo/echo_remote.ini index d225f756..a429485d 100644 --- a/examples/echo/echo/echo_remote.ini +++ b/examples/echo/echo/echo_remote.ini @@ -14,6 +14,6 @@ paste.filter_factory = keystone.middleware.remoteauth:filter_factory ; (otherwise we redirect call) remote_auth_pass = dTpw ;where to redirect untrusted calls to -auth_location = http://127.0.0.1:8081/ +auth_location = http://127.0.0.1:5001/ diff --git a/examples/echo/echo_client.py b/examples/echo/echo_client.py index ce4e8da0..256c55ec 100755 --- a/examples/echo/echo_client.py +++ b/examples/echo/echo_client.py @@ -20,7 +20,6 @@ Implement a client for Echo service using Identity service import httplib import json -import sys def get_auth_token(username, password, tenant): @@ -28,7 +27,7 @@ def get_auth_token(username, password, tenant): params = {"passwordCredentials": {"username": username, "password": password, "tenantId": tenant}} - conn = httplib.HTTPConnection("localhost:8080") + conn = httplib.HTTPConnection("localhost:5000") conn.request("POST", "/v2.0/tokens", json.dumps(params), headers=headers) response = conn.getresponse() data = response.read() diff --git a/examples/paste/auth_token.ini b/examples/paste/auth_token.ini index 25f2cbbf..b2899e36 100644 --- a/examples/paste/auth_token.ini +++ b/examples/paste/auth_token.ini @@ -5,7 +5,7 @@ paste.app_factory = auth_token:app_factory auth_protocol = http auth_host = 127.0.0.1 -auth_port = 8081 +auth_port = 5001 admin_token = 999888777666 delay_auth_decision = 0 diff --git a/examples/paste/nova-api-paste.ini b/examples/paste/nova-api-paste.ini index b4a94557..9836b29e 100644 --- a/examples/paste/nova-api-paste.ini +++ b/examples/paste/nova-api-paste.ini @@ -88,7 +88,7 @@ service_protocol = http service_host = 127.0.0.1 service_port = 808 auth_host = 127.0.0.1 -auth_port = 8081 +auth_port = 5001 auth_protocol = http admin_token = 999888777666 diff --git a/keystone/common/config.py b/keystone/common/config.py index 71925239..592e6cdd 100755 --- a/keystone/common/config.py +++ b/keystone/common/config.py @@ -76,9 +76,9 @@ def add_common_options(parser): "argument specified to be a config file, and if "\ "that is also missing, we search standard "\ "directories for a config file.") - group.add_option('-p', '--port', '--bind-port', default=8080, + group.add_option('-p', '--port', '--bind-port', default=5000, dest="bind_port", - help="specifies port to listen on (default is 8080)") + help="specifies port to listen on (default is 5000)") group.add_option('--host', '--bind-host', default="0.0.0.0", dest="bind_host", help="specifies host address to listen on "\ diff --git a/keystone/test/IdentitySOAPUI.xml b/keystone/test/IdentitySOAPUI.xml index 3cf2984e..de072afb 100644 --- a/keystone/test/IdentitySOAPUI.xml +++ b/keystone/test/IdentitySOAPUI.xml @@ -34,7 +34,7 @@ - + @@ -1094,17 +1094,17 @@ -]]>http://www.w3.org/2001/XMLSchemahttp://localhost:8080aliasTEMPLATExs:stringapplication/xml200 203v1:extensionapplication/json200 203application/xml400v1:badRequestapplication/xml404v1:itemNotFoundapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 404 500 503<xml-fragment/>http://localhost:8080application/xml200 203v1:extensionsapplication/json200 203application/xml400v1:badRequestapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 500 503<xml-fragment/>http://localhost:8080X-Auth-TokenHEADERxs:stringtokenIdTEMPLATExs:stringbelongsToQUERYxs:stringapplication/xml200 203v1:authapplication/json200 203application/xml401v1:unauthorizedapplication/xml403v1:forbiddenapplication/xml403v1:userDisabledapplication/xml400v1:badRequestapplication/xml404v1:itemNotFoundapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 401 403 404 500 503<xml-fragment/>http://localhost:8080 +]]>http://www.w3.org/2001/XMLSchemahttp://localhost:5000aliasTEMPLATExs:stringapplication/xml200 203v1:extensionapplication/json200 203application/xml400v1:badRequestapplication/xml404v1:itemNotFoundapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 404 500 503<xml-fragment/>http://localhost:8080application/xml200 203v1:extensionsapplication/json200 203application/xml400v1:badRequestapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 500 503<xml-fragment/>http://localhost:8080X-Auth-TokenHEADERxs:stringtokenIdTEMPLATExs:stringbelongsToQUERYxs:stringapplication/xml200 203v1:authapplication/json200 203application/xml401v1:unauthorizedapplication/xml403v1:forbiddenapplication/xml403v1:userDisabledapplication/xml400v1:badRequestapplication/xml404v1:itemNotFoundapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 401 403 404 500 503<xml-fragment/>http://localhost:8080 -application/xml401v1:unauthorizedapplication/xml403v1:forbiddenapplication/xml400v1:badRequestapplication/xml404v1:itemNotFoundapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 401 403 404 500 503<xml-fragment/>http://localhost:8080 +application/xml401v1:unauthorizedapplication/xml403v1:forbiddenapplication/xml400v1:badRequestapplication/xml404v1:itemNotFoundapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json400 401 403 404 500 503<xml-fragment/>http://localhost:5000 application/xmlv1:passwordCredentialsapplication/jsonapplication/xml200 203v1:authapplication/json200 203application/xml401v1:unauthorizedapplication/xml403v1:userDisabledapplication/xml400v1:badRequestapplication/xml500v1:identityFaultapplication/xml503v1:serviceUnavailableapplication/json401 -403 400 500 503<xml-fragment/>http://localhost:8080<passwordCredentials +403 400 500 503<xml-fragment/>http://localhost:5000<passwordCredentials password="secrete" username="joeuser" xmlns="http://docs.openstack.org/identity/api/v2.0"/>X-Auth-TokenHEADERxs:stringtenantIdTEMPLATExs:stringapplication/xml200 203v1:tenantapplication/json200 diff --git a/keystone/test/unit/test_common.py b/keystone/test/unit/test_common.py index 06409937..706d59f7 100755 --- a/keystone/test/unit/test_common.py +++ b/keystone/test/unit/test_common.py @@ -26,8 +26,8 @@ import unittest -URL = 'http://localhost:8081/v2.0/' -URLv1 = 'http://localhost:8080/v1.0/' +URL = 'http://localhost:5001/v2.0/' +URLv1 = 'http://localhost:5000/v1.0/' def get_token(user, pswd, tenant_id, kind=''): header = httplib2.Http(".cache") -- cgit