[OPENAM-13700] Latest Script Version is not seen when Upgraded Created: 05/Oct/18  Updated: 11/Oct/18

Status: Open
Project: OpenAM
Component/s: scripting, upgrade
Affects Version/s: 6.0.0.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: WanNing Tan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: EDISON
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Rank: 1|hzwv3b:
Support Ticket IDs:

 Description   

Bug description

 Latest script version is not seen if user upgraded to a newer AM version. 

How to reproduce the issue

  1. Installed OpenAM 13 onwards / AM instance
  2. Edit default OIDC Claims Script ( [Realm] > Scripts > OIDC Claims Script )
    /*
    * Copyright 2014-2017 ForgeRock AS. All Rights Reserved
    *
    * Use of this code requires a commercial software license with ForgeRock AS.
    * or with one of its affiliates. All use shall be exclusively subject
    * to such license between the licensee and ForgeRock AS.
    */
    import com.iplanet.sso.SSOException
    import com.iplanet.sso.SSOException <-- adding this to modify the default Script
    import com.sun.identity.idm.IdRepoException
    import org.forgerock.oauth2.core.exceptions.InvalidRequestException
    import org.forgerock.oauth2.core.UserInfoClaims
    import org.forgerock.openidconnect.Claim
    
  1. Upgrade to a newer AM version instance
  2. Create a new Script ( [Realm]> Scripts > New Script )
    Name: Test
    Script Type : OIDC Claims Script
Expected behaviour
Latest OIDC script version should be displayed

From Test Script:

/*
* Copyright 2014-2018 ForgeRock AS. All Rights Reserved
*
* Use of this code requires a commercial software license with ForgeRock AS.
* or with one of its affiliates. All use shall be exclusively subject
* to such license between the licensee and ForgeRock AS.
*/
import com.iplanet.sso.SSOException
import com.sun.identity.idm.IdRepoException
import org.forgerock.oauth2.core.exceptions.InvalidRequestException
import org.forgerock.oauth2.core.UserInfoClaims
import org.forgerock.openidconnect.Claim
..........
return new UserInfoClaims((Map)computedClaims, (Map)compositeScopes)
 
Current behaviour
Modified default OIDC Script is been displayed. 

From Test Script :

/*
* Copyright 2014-2017 ForgeRock AS. All Rights Reserved
*
* Use of this code requires a commercial software license with ForgeRock AS.
* or with one of its affiliates. All use shall be exclusively subject
* to such license between the licensee and ForgeRock AS.
*/
import com.iplanet.sso.SSOException
import com.iplanet.sso.SSOException
import com.sun.identity.idm.IdRepoException
import org.forgerock.oauth2.core.exceptions.InvalidRequestException
import org.forgerock.oauth2.core.UserInfoClaims
import org.forgerock.openidconnect.Claim

 



 Comments   
Comment by Jonathan Thomas [ 10/Oct/18 ]

I belive this is expected behaviour?

We do not overwrite custom scripts.

Comment by WanNing Tan [ 11/Oct/18 ]

I understand that this is the expected behaviour. There are few possibilities that the user would encountered:

  1.  Where would the user be able to get the real default ODIC script ? The current way would be to have a new freshly installed AM instance in order to get the default OIDC script.  
  2. If the user were to create a new script and select the type as OIDC script, it would not display the default script but the modified OIDC script.

I believe the question would be how would user get the default OIDc script should the user modified them.

Generated at Thu Feb 25 16:16:49 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.