swift command got 401 Unauthorized error with keystone
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
New
|
Undecided
|
jagan kumar kotipatruni |
Bug Description
I'm trying to use keystone with MySql to work with proxy server authorization.
I have setup keystone with MySql. I can run command like "keystone user-list" and "keystone tenant-list". I can run curl command and it return correct information.
But, I got 401 error when I ran swift command. I ran:
# swift -v -A http://
where exampleTenant is the tenan name, exampleUser is the user name, and example is the password.
and got:
# Auth GET failed: http://
I saw the following message in /var/log/syslog:
May 17 15:04:52 staging-
May 17 15:04:53 staging-
Looks like it could not find auth_token. But, I can see auth_token.py in my keystone installation.
I have googled for similar situation, but got no where.
Could you help me with this?
Robert
My e-mail address: <email address hidden>.
Our system information:
Our company is Snapfish under HP. We want to use keystone with MySql to manage our user for openstack.
RIght now, keystone and swift-proxy are on the same box. And, I'm testing on the same box.
OS system: Ubuntu 12.04
Architecture: Linux staging-
Package Info:
swift : Version: 1.4.8-0ubuntu2
swift-proxy: Version: 1.4.8-0ubuntu2
python-swift: Version: 1.4.8-0ubuntu2
keystone: Version: 2012.1+
python-keystone: Version: 2012.1+
Content of /etc/swift/
[DEFAULT]
bind_port = 9199
workers = 20
user = swift
log_facility = LOG_LOCAL1
log_level = INFO
log_name = staging-
log_requests = true
[pipeline:main]
pipeline = informant healthcheck catch_errors cache authtoken swiftauth proxy-server
[filter:
use = egg:swift#
[app:proxy-server]
use = egg:swift#proxy
allow_account_
account_autocreate = true
[filter:
use = egg:swift#
[filter:cache]
use = egg:swift#memcache
[filter:swiftauth]
paste.filter_
operator_roles = admin, SwiftOperator
is_admin = false
[filter:authtoken]
paste.filter_
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_protocol = http
auth_host = 127.0.0.1
auth_port = 35357
#admin_tenant_name = service
#admin_user = keystone
#admin_password = storage
delay_auth_decision = 0
memcache_servers = 10.57.11.
[filter:informant]
use = egg:informant#
statsd_host = 10.57.11.26
metric_name_prepend = storage.
-------
Content of /etc/keystone/
[DEFAULT]
#bind_host = 10.57.11.26
public_port = 5000
admin_port = 35357
admin_token = ADMIN
compute_port = 8774
verbose = True
debug = True
log_config = /etc/keystone/
# ================= Syslog Options =======
# Send logs to syslog (/dev/log) instead of to file specified
# by `log-file`
use_syslog = False
# Facility to use. If unset defaults to LOG_USER.
# syslog_log_facility = LOG_LOCAL0
[sql]
#connection = sqlite:
connection = mysql:/
idle_timeout = 200
[ldap]
#url = ldap://localhost
#tree_dn = dc=example,dc=com
#user_tree_dn = ou=Users,
#role_tree_dn = ou=Roles,
#tenant_tree_dn = ou=Groups,
#user = dc=Manager,
#password = freeipa4all
#suffix = cn=example,cn=com
[identity]
driver = keystone.
-------
curl command work. When I ran:
# curl -d '{"auth"
I got:
% Total % Received % Xferd Average Speed Time Time Time Current
100 339 0 256 100 83 1259 408 --:--:-- --:--:-- --:--:-- 1273
{
"access": {
"token": {
"id": "c9fcbf0f36144e
},
"user": {
"id": "a64dcf7b1b324b
"name": "exampleUser",
}
}
}
-------
But, when I ran swift:
# swift -v -A http://
I got:
Auth GET failed: http://
and I saw the message in /var/log/syslog with:
May 17 16:14:36 staging-
Changed in keystone: | |
assignee: | nobody → jagan kumar kotipatruni (jagankumar-k) |
description: | updated |
summary: |
- swift command got 401 Unauthorised error with keystone + swift command got 401 Unauthorized error with keystone |