Bug 1012527 - set the JSESSIONID cookie and header when the authentication is successful even when the subsequent query results in error
Summary: set the JSESSIONID cookie and header when the authentication is successful ev...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.3.0
Assignee: Michael Pasternak
QA Contact: Elena
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-26 15:14 UTC by David Jaša
Modified: 2016-02-10 19:18 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-29 11:01:51 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2013-09-26 15:14:04 UTC
Description of problem:
Authentication errors should be evaluated prior to any other kinds of errors and the resulting behaviour WRT authentication information should not be influenced by subsequent error at all. In practice, that means that when user authenticates successfully with "prefer: persistent-auth" set, he should be given JSESSIONID cookie && header no matter how the rest of the query ends up.

The desired behaviour improves UX of REST API apps (it saves roundtrips and for bad

Version-Release number of selected component (if applicable):
is16 / rhevm-restapi-3.3.0-0.22.master.el6ev.noarch

How reproducible:
always

Steps to Reproduce:
1. perform a query like this with valid credentials:
curl <...> -u user.org https://rhevm.example.org/api/nonsense
2.
3.

Actual results:
JSESSIONID cookie and headers are not sent

Expected results:
JSESSIONID cookie and header are sent

Additional info:
the example doesn't make much functional sense but it's a good reproducer. I'd expect the real use case for combination of timeout (--> need to relogin) and change of something between app refreshes

Comment 1 Michael Pasternak 2013-09-29 11:01:51 UTC
i disagree (In reply to David Jaša from comment #0)
> Description of problem:
> Authentication errors should be evaluated prior to any other kinds of errors
> and the resulting behaviour WRT authentication information should not be
> influenced by subsequent error at all. In practice, that means that when
> user authenticates successfully with "prefer: persistent-auth" set, he
> should be given JSESSIONID cookie && header no matter how the rest of the
> query ends up.

this is not correct, since our api uses ROA architecture, every resource
is considered a entry point to api (unlike in SOA where you have single entry
point where authenticate takes place), so you should see this as accessing
incorrect address (url) in the NET.


Note You need to log in before you can comment on or make changes to this bug.