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

Amster tries to load custom service subconfiguration before loading realm level configurations

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.0, 5.5.2
    • Component/s: Amster
    • Labels:
      None
    • Needs backport:
      Yes
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      The CustomServiceTest functional test can fail locally because amster attempts to import subconfigurations before trying to load CustomService.json on the realm level. These subconfiguration imports then fail:

      org.forgerock.openam.sdk.http.ClientErrorException: 400 Bad Request: The resource instance /json/realms/root/realms/Realm-nk95JMZ7oPxXNBR/realm-config/services/CustomService/realmSubConfig/testRealmSubConfig cannot be created
      
      	at org.forgerock.openam.sdk.http.DefaultErrorHandler.onClientError(DefaultErrorHandler.java:54)
      	at org.forgerock.openam.sdk.http.HttpSessionImpl.handleUnsuccessfulResponse(HttpSessionImpl.java:271)
      	at org.forgerock.openam.sdk.http.HttpSessionImpl.send(HttpSessionImpl.java:169)
      	at org.forgerock.openam.sdk.http.RequestBuilder.put(RequestBuilder.java:225)
      	at org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.createInstance(CrestResourceProviderAsync.java:145)
      	at org.forgerock.openam.sdk.crest.HttpCrestResourceProvider.createInstance(HttpCrestResourceProvider.java:90)
      	at org.forgerock.openam.sdk.operations.CrestOperations.create(CrestOperations.java:103)
      	at org.forgerock.openam.sdk.operations.CrestOperations.create(CrestOperations.java:86)
      	at org.forgerock.openam.amster.loadster.importer.GenericImporter.importEntity(GenericImporter.groovy:49)
      	at org.forgerock.openam.amster.loadster.importer.GenericImporter.importFile(GenericImporter.groovy:33)
      	at org.forgerock.openam.amster.loadster.importer.Importer.importFile(Importer.groovy:178)
      	at org.forgerock.openam.amster.loadster.importer.Importer.access$0(Importer.groovy)
      

      How to reproduce the issue

      Run the CustomServiceTest

      Expected behaviour

      The test should pass

      Current behaviour

      The test fails.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peter.major Peter Major [X] (Inactive)
                Reporter:
                peter.major Peter Major [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: