Make Plugins more customizable

Registered by Jamie Lennox

The keystoneclient plugin system is working really well, however i have come across some plugins that cannot be implemented with the specified plugin interface.

Primarily in auth_token middleware i want to write a plugin that controls the use of 'X-Subject-Token' and the message id on behalf of the service. There is no way for me to set any headers from the plugin other than X-Auth-Token.

Additionally I want to be able to authenticate always with a client certificate. If the client certificate is present there really is no need for the X-Auth-Token header, however the plugin must be able to access the connection parameters of the message. At the moment neither of these things is possible as a message without an X-Auth-Token is considered unauthenticated and the plugin cannot specify connection parameters.

Keeping with the existing plugin layout i propose to add 2 new functions to a plugin:
 - get_headers will replace get_token and will return a dictionary of things to add to the headers of a message. This will have to be done in a way that is still compatible with plugins that only implement get_token, however it will override get_token as the 'X-Auth-Token' header is just one element of the dictionary.

 - get_connection_params: will return a dictionary of connection parameters to be sent to requests.

No-Spec approval: http://eavesdrop.openstack.org/meetings/keystone/2015/keystone.2015-03-24-18.03.log.html

Blueprint information

Status:
Started
Approver:
None
Priority:
Undefined
Drafter:
Jamie Lennox
Direction:
Approved
Assignee:
Jamie Lennox
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Needs Code Review
Milestone target:
None
Started by
Jamie Lennox

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/generic-plugins,n,z

Addressed by: https://review.openstack.org/140894
    Add get_headers interface to authentication plugins

Addressed by: https://review.openstack.org/141267
    Add get_communication_params interface to plugins

Addressed by: https://review.openstack.org/185513
    Fix auth required message translation

Gerrit topic: https://review.openstack.org/#q,topic:merge,n,z

Addressed by: https://review.openstack.org/196023
    Merge remote-tracking branch 'gerrit/master' into merge

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.