Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-16455

ScriptedDecisionNode does not have schema upgrade for OPENIDM-14786 and also previous script fails after upgrade

    XMLWordPrintable

    Details

    • Rank:
      1|i01ggf:
    • No
    • No
    • No
    • Yes and I used the same an in the description

      Description

      Bug description

      The ScriptedDecisionNode now breaks when having a node like

      Start-> ScriptedDecisionNode -> Success

      where the script code is just

      username="demo";
      sharedState.put("username", "demo");
      outcome="true";
      

      when upgraded from 6.5 -> 7 and getting

      Caused by: java.lang.NullPointerException: null
      	at org.forgerock.util.Reject.checkNotNull(Reject.java:82)
      	at org.forgerock.util.Reject.checkNotNull(Reject.java:63)
      	at org.forgerock.opendj.ldap.Ava.<init>(Ava.java:482)
      	at org.forgerock.opendj.ldap.Ava.<init>(Ava.java:461)
      	at org.forgerock.opendj.ldap.Rdn.<init>(Rdn.java:255)
      	at com.sun.identity.idm.AMIdentity.<init>(AMIdentity.java:254)
      	at com.sun.identity.idm.AMIdentity.<init>(AMIdentity.java:209)
      	at org.forgerock.openam.identity.idm.IdentityUtils.getUniversalId(IdentityUtils.java:146)
      	at org.forgerock.openam.core.rest.authn.trees.SuccessProcessTreeResult.getUniversalIdentifier(SuccessProcessTreeResult.java:225)
      	at org.forgerock.openam.core.rest.authn.trees.SuccessProcessTreeResult.process(SuccessProcessTreeResult.java:120)
      	at org.forgerock.openam.core.rest.authn.trees.AuthTrees.evaluateTreeAndProcessResult(AuthTrees.java:293)
      	at org.forgerock.openam.core.rest.authn.trees.AuthTrees.invokeTree(AuthTrees.java:263)
      	at org.forgerock.openam.core.rest.authn.RestAuthenticationHandler.authenticate(RestAuthenticationHandler.java:228)
      	at org.forgerock.openam.core.rest.authn.http.AuthenticationServiceV1.authenticate(AuthenticationServiceV1.java:157)
      

      How to reproduce the issue

      1. Create a node like this
      2. Test that this work on 6.5.2 (or 6.5.x)
      3. Upgrade to 7-SNAPSHOT
      4. Retest and see failure with above exception
      5. Check the script node and it does not have any new UI changes (when upgraded)
      Expected behaviour
      Should work like before upgrade
      

      It is detected there is no upgrade rule and the UI does not have the new Script input/output choice and also this breaking behaviour.

      Current behaviour
      Failure to work and throws Exception. But this used to work before the upgrade in 6.5.x
      

      Work around

      -

      Code analysis

      Probably the input/output constraints and also the missing upgrade hence sharedState even when set is empty now when entering SuccessProcessTreeResult

        Attachments

          Issue Links

            Activity

              People

              phillcunnington Phill Cunnington
              chee-weng.chea C-Weng C
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: