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

Amster cannot import configuration with containing sub realms with --clean if the instance already contains sub realms

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.0.0
    • Fix Version/s: 6.5.2, 7.0.0
    • Component/s: Amster
    • Labels:
    • Target Version/s:
    • Needs backport:
      Yes
    • Support Ticket IDs:
    • Functional tests:
      Yes
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      If you use Amster to export the configuration of an OpenAM instance which contains sub realms and then try to import it into the same instance (or another instance containing realms) with --clean parameter, the import would fail:

      Cleaning global settings
      Deleting JSON: Global JSON Handler
      Deleting Scripting: 9de3eb62-f131-4fac-a294-7bd170fd4acb
      Deleting Scripting: 7e3d7067-d50f-4674-8c76-a3e13a810c33
      Deleting Scripting: c827d2b4-3608-4693-868e-bbcf86bd87c7
      Deleting Scripting: 703dab1a-1921-4981-98dd-b8e5349d8548
      Deleting Scripting: 157298c0-7d31-4059-a95b-eeb08473b7e5
      Deleting Scripting: 36863ffb-40ec-48b9-94b1-9a99f71cc3b5
      Deleting Realms: L3N1Yg
      [main] ERROR org.forgerock.openam.sdk.http.DefaultErrorHandler - Unhandled client error: [Status: 409 Conflict]
      ERROR org.forgerock.openam.sdk.http.ClientErrorException:
      409 Conflict: Sub Organization cannot be deleted. Sub entries exist.: Sub Organization cannot be deleted. Sub entries exist.
              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.delete (RequestBuilder.java:246)
              at org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.deleteInstance (CrestResourceProviderAsync.java:220)
              at org.forgerock.openam.sdk.crest.HttpCrestResourceProvider.deleteInstance (HttpCrestResourceProvider.java:214)
              at org.forgerock.openam.sdk.operations.globalconfig.realms.RealmsOperationsImpl.delete (RealmsOperationsImpl.java:91)
              at org.forgerock.openam.sdk.operations.globalconfig.realms.RealmsOperations$delete$0.call (Unknown Source)
              at org.forgerock.openam.sdk.operations.resourcetypes.ResourceTypesOperations$delete$0.call (Unknown Source)
              at org.forgerock.openam.amster.loadster.cleaner.Cleaner$_cleanCollection_closure1.doCall (Cleaner.groovy:70)
              at org.forgerock.openam.amster.loadster.cleaner.Cleaner.cleanCollection (Cleaner.groovy:64)
              at org.forgerock.openam.amster.loadster.cleaner.Cleaner.clean (Cleaner.groovy:35)
              at org.forgerock.openam.amster.loadster.cleaner.GlobalCleaner.clean (GlobalCleaner.groovy:25)
              at org.forgerock.openam.amster.loadster.cleaner.GlobalCleaner.clean (GlobalCleaner.groovy)
              at org.forgerock.openam.amster.loadster.importer.Importer.importEntities (Importer.groovy:95)
              at org.forgerock.openam.amster.commands.ImportCommand.execute (ImportCommand.groovy:53)
              at org.forgerock.openam.amster.Main$_addCommandLineWrapping_closure1.doCall (Main.groovy:77)
              at java_lang_Runnable$run.call (Unknown Source)
              at org.forgerock.openam.amster.Main.main (Main.groovy:58)
      

      To reproduce:

      1. Deploy an OpenAM instance with transport key
      2. Create a few sub and sub sub realms
      3. Use Amster to export the configuration
      4. Use Amster to import the exported configuration and specify --clean parameter
      5. Observe the message

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: