need a session constructor that takes both auth params and token

Bug #1510825 reported by Monty Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystoneauth
Expired
Medium
Unassigned

Bug Description

We need a constructor that allows for passing in an active token and normal auth parameters so that the token can be refreshed but the initial auth is not needed.

Most cases you will rely on a pre-constructed session that has performed an
auth, but there are cases where you will have an active token but not a session.

This will help with overall usability.

Revision history for this message
Steve Martinelli (stevemar) wrote :

a bit more details in the bug would help

Changed in keystoneauth:
importance: Undecided → Medium
description: updated
Changed in keystoneauth:
status: New → Triaged
Revision history for this message
Colleen Murphy (krinkle) wrote :

I would love to help with this but I would still like a bit more information.

You can already pass in both a token and password auth plugin, but I don't think that gets you what you want:

http://paste.openstack.org/show/495050/

If you just pass in a token, it will get a new one if it's about to expire:

http://git.openstack.org/cgit/openstack/keystoneauth/tree/keystoneauth1/identity/base.py?id=9d51a2ae6052dee46198ed3799365a6480cb42c4#n134

without needing a password auth plugin. Why is that not sufficient?

Revision history for this message
Jamie Lennox (jamielennox) wrote :

I think the bug is I have a token id that i got previously with these credentials and reuse it until it expires.

The problem with that is there is more information in a token than an id, you need to supply a full auth_ref[1] for things like the service catalog.

There is the ability in KSA to cache an auth_ref[2], this would allow you to reconstruct a complete auth object that can be reused until it expires and the refreshed. Where you save this is not dictated by KSA though i'd be happy to do like a keyring util function to standardize it - though this might be better in os-client-config.

To make use of this in openstackclient I'm just waiting for the transition to KSA to be complete.

I'm going to mark this incomplete without further information.

[1] https://github.com/openstack/keystoneauth/blob/118c9629e57f353aa49ba29c4b27e0e240788463/keystoneauth1/access/access.py#L64
[2] https://github.com/openstack/keystoneauth/blob/118c9629e57f353aa49ba29c4b27e0e240788463/keystoneauth1/plugin.py#L207-L252

Changed in keystoneauth:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for keystoneauth because there has been no activity for 60 days.]

Changed in keystoneauth:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.