Ask Your Question
0

auth_login

asked 2012-03-02 20:40:48 -0500

neil-orbitalsoftware gravatar image

Hi all, can anyone point me to the py files that are handling the login? I'd like to observe and maybe build a euca2ools/nova-manage sync bridge between the two worlds so we can have CLI back.

Right now I have managed to create matching project = tennants ... and users that list respective instances running in those.

However I need to dig into horizon now to understand both the auth and api calls through to Keystone.

I am testing this with a devstack... it seems the app root is here: /opt/stack/horizon/openstack-dashboard/

Where would the py file be that process the login?

<input id="id_username" type="text" name="username" maxlength="20"/> <input id="id_password" type="password" name="password" maxlength="20"/>

I am getting up to speed on Django so this is probably my limiting factor to find where these are being kept. Please let me know if you can point me where I need to start tracing the app flow.

Neil

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2012-03-02 20:50:13 -0500

You should probably not be considering automating actions against the dashboard, as it is likely to change, and there already exists an API for doing all the things the dashboard does. Rather than signing into the dashboard, you should consider authenticating directly with keystone and using the rest of the ec2/openstack APIs. If you are not in an environment that exposes those apis, you should ask for them from your administrator rather than scripting the dashboard. Scripting the dashboard is always the wrong answer, especially to produce a CLI.

edit flag offensive delete link more
0

answered 2012-03-02 20:59:56 -0500

neil-orbitalsoftware gravatar image

Hi Paul, thank you for your response , we are not scripting the dashboard we are learning how it works :) .

The intent is to observe the methods of horizon and its interactions with Keystone to gain a better understanding of these new components.

If anyone can answer my original question about WHERE the py files are that are marshalling the actitivites I seek to observe with respect to auth with keystone and subsequent / token / api calls .

Please let me know.

Neil

edit flag offensive delete link more
0

answered 2012-03-02 21:17:39 -0500

neil-orbitalsoftware gravatar image

OK - I think I found where it all kicks off...

token = api.token_create(request, data.get('tenant'), data['username'], data['password'])

/opt/stack/horizon/django-openstack/django_openstack/auth# vi views.py

Thanks!

Neil

edit flag offensive delete link more
0

answered 2012-03-02 21:18:05 -0500

neil-orbitalsoftware gravatar image

closed

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-03-02 20:40:48 -0500

Seen: 46 times

Last updated: Mar 02 '12