JMJ CLOUD
  • Home
  • Projects
  • Blog
  • About Us
  • Contact Us

Our Blog

ORDS - Changing the default Oauth2 token expiry lifetime

7/17/2016

0 Comments

 
Picture

Background

Oracle REST Data Services offers two approaches for third party Oauth2 authentication:

Two Legged (Oauth2 Client Credentials Flow)
Primarily used when a trusted system (that is capable of securely storing the client id and client secret) needs access to your ORDS REST services.

Three Legged (Oauth2 Authorization Code Flow)
As the name implies, this method involves three parties. The client (the party calling the service), the provider (the party providing the REST service) and the party which owns the data. This flow is primarily used for business to consumer flows.
Both of the above methods utilize tokens to authorize clients to access ORDS REST services for a pre-defined period of time.

​Extending the Default Token Lifetime

Picture
By default, the lifetime of a token issued by ORDS is 3600 seconds (or 1 hour) before the client has to re-authenticate. Normally this is fine because you don't want to provide your clients access for too long a period of time (especially in consumer based scenarios).

I am yet to find this in any documentation, but it is possible to change this default by adding a parameter 'security.oauth.tokenLifetime' to the defaults.xml file. When you initially install ORDS (at least as of R3.0.5) this parameter does not exist in defaults.xml so I assume the 3600 is hard coded somewhere in the ORDS code. You can add the new line anywhere in the defaults.xml file. Here is a sample entry to change the default to two hours:

    
After making the change you will need to either re-start ORDS (if running in standalone mode) or reload ORDS (if running from GlassFish or Web Logic).
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    RSS Feed

    Popular Posts

    - APEX Dog Food
    - Cloud ERP & APEX Mashup
    - Modernizing EBS with APEX
    - Easy APEX_WEB_SERVICE
    - Running APEX in RDS
    - ORDS What & Why?

    Categories

    All
    APEX
    AWS
    Fusion Cloud ERP
    INTEGRATION
    MS GRAPH
    OCI
    ORDS
    PaaS
    RAD
    REST
    SOAP

    Archives

    October 2021
    February 2021
    January 2021
    October 2020
    September 2020
    June 2020
    May 2020
    April 2020
    February 2020
    January 2020
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    September 2017
    August 2017
    July 2017
    June 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016

Company

About
Contact
Blog
  • Home
  • Projects
  • Blog
  • About Us
  • Contact Us