Updated REST and SOAP API's to support External Authentication.

- Added a :require_user option to User.authenticate
- Added :timeout option to MiqTask.wait_for_taskid
- Updated REST API to pass HTTP Env and option to User.authenticate
- Updated Appliance Console to extend the Apache External configuration
to be REST and SOAP API aware.
- Properly unconfiguring HTTPD application from appliance console.
- Added REST API and SOAP :authentication_timeout config, both
default to 30 seconds
Let’s take those as a separate PR then.

miq_task will need to be enhanced as none of those methods are exposed in instance, only in class.  we can update other calls to MiqTask to leverage the new signature.

Thanks,

Alberto Bellotti
abellott@redhat.com





On Aug 20, 2014, at 10:36 AM, Joe Rafaniello <notifications@github.com> wrote:

> In vmdb/app/models/user.rb:
> 
> > @@ -237,6 +239,14 @@ def self.authenticate(username, password, request = nil)
> >        raise MiqException::MiqEVMLoginError, err.message
> >      end
> >  
> > +    if options[:require_user] && !user_or_taskid.kind_of?(self)
> > +      task = MiqTask.wait_for_taskid(user_or_taskid, options)
> > +      if task.nil? || MiqTask.status_error?(task.status) || MiqTask.status_timeout?(task.status)
> > +        raise MiqException::MiqEVMLoginError, fail_message
> 
> That's an awesome idea @chessbyte 
> 
> Similar suggestions for the hacky looking: 
> update_status(task_id, STATE_FINISHED, STATUS_TIMEOUT, "Timed out stalled task.")
> 
> I thought something like this reads better:
> task.timeout("Timed out stalled task.")
> 
> —
> Reply to this email directly or view it on GitHub.
>