Bug 1391643 - SSO token expiration should be returned as long
Summary: SSO token expiration should be returned as long
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: AAA
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.0.6
: 4.0.6.1
Assignee: Ravi Nori
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-03 16:30 UTC by Ravi Nori
Modified: 2017-01-18 07:26 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:26:11 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 66051 0 master MERGED aaa: The SSO token expiration date should be returned as Long 2020-01-28 15:54:02 UTC
oVirt gerrit 66732 0 master MERGED aaa: SSO token expiration should be returned as long 2020-01-28 15:54:02 UTC
oVirt gerrit 67037 0 ovirt-engine-4.0.6 MERGED aaa: The SSO token expiration date should be returned as Long 2020-01-28 15:54:02 UTC
oVirt gerrit 67038 0 ovirt-engine-4.0 MERGED aaa: The SSO token expiration date should be returned as Long 2020-01-28 15:54:02 UTC

Description Ravi Nori 2016-11-03 16:30:00 UTC
Description of problem: The SSO token expiration date is returned as a int value this causes issues with the date of token expiration and the value of the date is in the past.


Version-Release number of selected component (if applicable): 4.0

obtain token using curl

curl -v -k -H "Accept: application/json" 'https://admin%40internal:<password>@<engine>:<port/ovirt-engine/sso/oauth/token?grant_type=urn:ovirt:params:oauth:grant-type:http&scope=ovirt-app-api'

The exp value is int and is in the past

Actual results: The exp value returned is in the past

Expected results: the exp value should be in the future

Additional info: This exp value is the authentication record expiration date as returned by the ldap server and should not be confused with the session expiration data which is determined by engine.

Comment 1 Gonza 2016-12-07 14:55:04 UTC
Verified with:
ovirt-engine-4.1.0-0.2.master.20161205151239.git8f91a7d.el7.centos.noarch

# curl -v -k -H "Accept: application/json" 'https://admin%40internal:<password>@<engine>:<port/ovirt-engine/sso/oauth/token?grant_type=urn:ovirt:params:oauth:grant-type:http&scope=ovirt-app-api'
...
{"access_token":"lt-dY_MODlhXuQw1OGd4jjgY6DQiZJCc3EvZpv89m1UprOaalKdq_wBhUVfKmSbADltDSycoVQZ2cnpvLqSHjw","scope":"ovirt-app-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate","exp":"1481726536000","token_type":"bearer"}

new Date(1481726536000L).toString();
Wednesday, December 14, 2016 2:42:16 PM GMT

# date
Wed Dec  7 16:54:31 IST 2016


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