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.
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