Details
- 
        Type:
Monitor
 - 
        Status: Closed
 - 
            Priority:
 Major
                
             - 
            Resolution: Done
 - 
            Affects Version/s: None
 - 
            Fix Version/s: 2021
 - 
            Component/s: FIWARE-TECH-HELP
 
- 
                        HD-Chapter:Security
 - 
                        HD-Enabler:KeyRock
 
Description
Created question in FIWARE Q/A platform on 04-12-2015 at 10:12
Please, ANSWER this question AT https://stackoverflow.com/questions/34085531/fiware-keyrock-how-to-authenticate-from-python-keystoneclient
Question:
Fiware Keyrock how to authenticate from python-keystoneclient
Description:
I am using fiware-idm. I find python-keystone client to to interact with keystone API with easy way . 
But I have problem with authentication.  creating regular user with default "idm" user it's not problem . but i can not find way how to autenticate this user. 
here is my test samples : 
create user : 
def create_user():
   user = keystone.users.create(name="user4",
                             default_project="idm",
                             domain="default",
                             password="qwerty",
                             email="user4@email.com",
                             description="this is user description",
                             enabled=True,
                             username="user4")
   return user
authentication:
auth = v3.Password(auth_url="http://192.168.33.10:5001/v3",
               username="user4",
               password="qwerty",
               domain_name="idm"
               )
sess = session.Session(auth=auth)
keystone = client.Client(session=sess)
print keystone.users.list()
It writes that :
keystoneclient.exceptions.Unauthorized: The request you have made requires authentication. (HTTP 401)
2017-05-22 15:09|CREATED monitor | # answers= 1, accepted answer= False