[OPENAM-14049] Amster export failure Created: 29/Nov/18  Updated: 11/Oct/19  Resolved: 07/Dec/18

Status: Resolved
Project: OpenAM
Component/s: Amster
Affects Version/s: 6.5.0
Fix Version/s: 6.5.0.1, 6.5.1, 7.0.0

Type: Bug Priority: Major
Reporter: Jonathan Thomas Assignee: Peter Major [X] (Inactive)
Resolution: Fixed Votes: 2
Labels: AME, Must-Fix, Newton
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to OPENAM-14075 Config-Upgrader-6.5.0.zip is missing ... Open
relates to OPENAM-14065 Amster Release Notes don't mention re... Resolved
Target Version/s:
Sprint: 2018.16 - Tin
Needs backport:
Yes
Support Ticket IDs:
Verified Version/s:
Needs QA verification:
Yes
Functional tests:
No
Are the reproduction steps defined?:
Yes and I used the same an in the description

 Description   

Bug description

Amster export fails with 

Illegal character in path at index 11: json/users/{user}/devices/2fa/webauthn?_queryFilter=true

How to reproduce the issue

  1. Install AM and amster 6.5.0 
  2. connect -i  as admin
  3. Perform a export:
    amster openam.example.com:18080> export-config --path ./myExportedConfigFiles20181128 --failOnError true
Expected behaviour
Amster exports AM configuration
Current behaviour

We get the following error - however  some files are exported - approx 222, 51 directories  on a fresh install.

ERROR java.lang.IllegalArgumentException:
Illegal character in path at index 11: json/users/{user}/devices/2fa/webauthn?_queryFilter=true
at org.forgerock.amster.org.forgerock.openam.sdk.http.HttpSessionImpl.createRequest (HttpSessionImpl.java:244)
at org.forgerock.amster.org.forgerock.openam.sdk.http.HttpSessionImpl.createRequest (HttpSessionImpl.java:251)
at org.forgerock.amster.org.forgerock.openam.sdk.http.HttpSessionImpl.request (HttpSessionImpl.java:202)
at org.forgerock.amster.org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.queryCollectionWithFilter (CrestResourceProviderAsync.java:412)
at org.forgerock.amster.org.forgerock.openam.sdk.crest.HttpCrestResourceProvider.queryCollectionWithFilter (HttpCrestResourceProvider.java:357)
at org.forgerock.amster.org.forgerock.openam.sdk.operations.CrestOperations.queryWithFilter (CrestOperations.java:490)
at org.forgerock.amster.org.forgerock.openam.sdk.operations.CrestOperations.queryWithFilter (CrestOperations.java:475)
at org.forgerock.openam.amster.loadster.exporter.EntityWriter.writeCollection (EntityWriter.groovy:85)
at org.forgerock.openam.amster.loadster.exporter.GenericExporter.exportEntity (GenericExporter.groovy:29)

Work around

On local testing if I set 
--failOnError false

 or leave the  failOnError flag out of the command the export will just  log and skip webauthn entity export and continue with other export entities.

It should be possible to use the exported files  import as normal.



 Comments   
Comment by Jonathan Thomas [ 29/Nov/18 ]

Following suggests that Amster tests pass.

https://ci.forgerock.org/job/OpenAM-master/job/OpenAM-Pipeline/job/6.5.0/3/AmsterTestsReport/

Will need to verify that this is not just an output error.

Comment by Peter Major [X] (Inactive) [ 07/Dec/18 ]

Jonathan Thomas The tests were not meant to pass, I've updated the code so that failing export/import commands will break the tests.

Comment by Filip Kubáň [X] (Inactive) [ 10/Jan/19 ]

Verified on ForgeRock Access Management 6.5.0.1-RC1 Build d901475564 (2019-January-10 06:24)

Config was exported as expected, exported data can also be imported without any issue.

Comment by Ľubomír Mlích [ 25/Mar/19 ]

Reproduced in ForgeRock Access Management 6.5.0 Build f8ac1261d9 (2018-November-28 15:19) 

Verified as fixed in ForgeRock Access Management 6.5.1-RC2 Build 6e42f86d08 (2019-March-20 19:43) 

Comment by Peter Major [X] (Inactive) [ 14/May/19 ]

Webauthn devices are user specific, they are not AM configuration.

Generated at Sun Sep 27 06:57:48 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.