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

NPE during export-svc-cfg

    XMLWordPrintable

    Details

    • Support Ticket IDs:

      Description

      When using empty password default values in service definitions, like:

      <AttributeSchema name="org-forgerock-auth-oauth-smtp-password"
                                        type="single" syntax="password" i18nKey="a140">
                              <DefaultValues>
                                      <Value></Value>
                              </DefaultValues>
                       </AttributeSchema>
      

      The ssoadm export-svc-cfg command will fail with the following stacktrace:

      com.sun.identity.cli.CLIException: java.lang.NullPointerException 
      at com.sun.identity.cli.schema.ExportServiceConfiguration.handleRequest(ExportServiceConfiguration.java:122) 
      at com.sun.identity.cli.SubCommand.execute(SubCommand.java:291) 
      at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:212) 
      at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:134) 
      at com.sun.identity.cli.CommandManager.serviceRequestQueue(CommandManager.java:573) 
      at com.sun.identity.cli.CommandManager.<init>(CommandManager.java:171) 
      at com.sun.identity.cli.CommandManager.main(CommandManager.java:148) 
      Caused by: java.lang.NullPointerException 
      at com.sun.identity.sm.ServiceManager.checkAndEncryptPasswordSyntax(ServiceManager.java:1135) 
      at com.sun.identity.sm.ServiceSchemaManagerImpl.toXML(ServiceSchemaManagerImpl.java:671) 
      at com.sun.identity.sm.ServiceSchemaManager.toXML(ServiceSchemaManager.java:909) 
      at com.sun.identity.sm.ServiceManager.toXML(ServiceManager.java:1345) 
      at com.sun.identity.cli.schema.ExportServiceConfiguration.handleRequest(ExportServiceConfiguration.java:86) 
      ... 6 more 
      java.lang.NullPointerException
      

      We should add extra null checks in ServiceManager, since the DecodeAction can easily return null as the result of the decryption.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peter.major Peter Major
                Reporter:
                peter.major Peter Major
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: