<div dir="ltr"><div>In accordance with the spec[1], I started a patch[2] to port security related items from mistral to mistral-lib.  This may not be the right way to approach this task and I'm hoping the patch provides a means to illustrate the problem and starts a discussion on the right solution.</div><div><br></div><div>A custom action that creates a client that requires keystone auth will need to get an endpoint for a given project to create a client object, so I ported over the utility class[3] that deals with keystone.  That utility class requires the mistral.context.</div><div><br></div><div>I started looking at the context requirements from two separate points of view:</div><div> - create a security context in mistral lib that could be an attribute in the mistral context</div><div> - port entire mistral context over</div><div><br></div><div>When I looked at the attributes[4] currently in the mistral.context, most if not all of them seem to be security related anyway.  I chose to port the entire context over, but that also required dependencies on 4 threading utility methods[5] and mistral.exceptions[6], so those were also ported over.</div><div><br></div><div>I would appreciate any feedback or discussion on the current proposed design.<br></div><div><br></div><div>Thanks,</div><div><br></div><div>Ryan</div><div><br></div><div><br></div><div>[1] <a href="https://specs.openstack.org/openstack/mistral-specs/specs/newton/approved/mistral-custom-actions-api.html">https://specs.openstack.org/openstack/mistral-specs/specs/newton/approved/mistral-custom-actions-api.html</a></div><div><br class="">[2] <a href="https://review.openstack.org/#/c/352435/">https://review.openstack.org/#/c/352435/</a><br></div><div><br></div><div>[3] <a href="https://github.com/openstack/mistral/blob/master/mistral/utils/openstack/keystone.py">https://github.com/openstack/mistral/blob/master/mistral/utils/openstack/keystone.py</a></div><div><br></div><div>[4] <a href="https://github.com/openstack/mistral/blob/master/mistral/context.py#L76-L87">https://github.com/openstack/mistral/blob/master/mistral/context.py#L76-L87</a></div><div><br></div><div>[5] <a href="https://github.com/openstack/mistral/blob/master/mistral/utils/__init__.py#L49-L94">https://github.com/openstack/mistral/blob/master/mistral/utils/__init__.py#L49-L94</a></div><div><br></div><div>[6] <a href="https://github.com/openstack/mistral/blob/master/mistral/exceptions.py">https://github.com/openstack/mistral/blob/master/mistral/exceptions.py</a></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Ryan Brady<div>Cloud Engineering</div><div><a href="mailto:rbrady@redhat.com" target="_blank">rbrady@redhat.com</a> </div><div>919.890.8925</div></div></div>
</div>