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

HTTP 500 when trying to export configuration with amster

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.5.0
    • Fix Version/s: 14.5.0
    • Component/s: sms
    • Labels:
    • Target Version/s:
    • Rank:
      1|hztknz:
    • Sprint:
      Sprint 126 "Gauguin" Turing

      Description

      Steps to reproduce:

      The export step currently fails with the following error message:

      > x --path /tmp/all --failOnError
      [main] ERROR org.forgerock.openam.sdk.http.DefaultErrorHandler - Unhandled server error: [Status: 500 Internal Server Error]
      ERROR org.forgerock.openam.sdk.http.ServerErrorException:
      500 Internal Server Error
              at org.forgerock.openam.sdk.http.DefaultErrorHandler.onServerError (DefaultErrorHandler.java:62)
              at org.forgerock.openam.sdk.http.HttpSessionImpl.handleUnsuccessfulResponse (HttpSessionImpl.java:273)
              at org.forgerock.openam.sdk.http.HttpSessionImpl.send (HttpSessionImpl.java:167)
              at org.forgerock.openam.sdk.http.RequestBuilder.get (RequestBuilder.java:177)
              at org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.read (CrestResourceProviderAsync.java:330)
              at org.forgerock.openam.sdk.crest.HttpCrestResourceProvider.read (HttpCrestResourceProvider.java:108)
              at org.forgerock.openam.sdk.operations.CrestOperations.read (CrestOperations.java:85)
              at org.forgerock.openam.amster.loadster.exporter.EntityWriter.writeSingleton (EntityWriter.groovy:53)
              at org.forgerock.openam.amster.loadster.exporter.GenericExporter.exportEntity (GenericExporter.groovy:27)
              at org.forgerock.openam.amster.loadster.exporter.EntityExporter.exportEntity (EntityExporter.groovy:108)
              at org.forgerock.openam.amster.loadster.exporter.EntityExporter.exportGlobalEntities (EntityExporter.groovy:84)
              at org.forgerock.openam.amster.loadster.exporter.EntityExporter.exportEntities (EntityExporter.groovy:76)
              at org.forgerock.openam.amster.commands.ExportCommand.execute (ExportCommand.groovy:62)
              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)
      

      The issue seems to be related to the new WeChat authentication module:

      SmsJsonConverter:06/05/2017 09:46:28:076 DE BST: Thread[default task-40,5,main]: TransactionId[ad86a9ca-72ca-4057-a8ac-22339228d302-6513]
      ERROR: schema validation threw an exception while validating the attributes: realm=null attributes: {usesBasicAuth=[false], clientId=[], accountProviderClass=[org.forgerock.openam.authentication.modules.common.mapping.DefaultAccountProvider], createAccount=[true], scopeDelimiter=[], tokenEndpoint=[https://api.wechat.com/sns/oauth2/access_token], subjectProperty=[openid], attributeMappingClasses=[org.forgerock.openam.authentication.modules.common.mapping.JsonAttributeMapper|uid|wechat-], accountMapperClass=[org.forgerock.openam.authentication.modules.common.mapping.JsonAttributeMapper|*|wechat-], provider=[WeChat], accountMapperConfiguration=[openid=uid], scope=[], ssoProxyUrl=[http://idp.example.com:8080/openam/oauth2c/OAuthProxy.jsp], mapToAnonymousUser=[false], registrationServiceUrl=[], authorizeEndpoint=[https://open.weixin.qq.com/connect/qrconnect], clientSecret=[], anonymousUserName=[anonymous], forgerock-am-auth-socialauthwechat-auth-level=[0], attributeMapperConfiguration=[nickname=givenName, openid=uid, nickname=sn, nickname=cn], saveAttributesInSession=[true], userInfoEndpoint=[https://api.wechat.com/sns/userinfo], RequiredValueValidator=[com.sun.identity.sm.RequiredValueValidator]}
      Message:Values for clientId is required.
      
      	at com.sun.identity.sm.ServiceSchemaImpl.throwInvalidAttributeValuesException(ServiceSchemaImpl.java:763)
      	at com.sun.identity.sm.ServiceSchemaImpl.validatePlugin(ServiceSchemaImpl.java:744)
      	at com.sun.identity.sm.ServiceSchemaImpl.serverEndAttrValidation(ServiceSchemaImpl.java:714)
      	at com.sun.identity.sm.ServiceSchemaImpl.validatePlugin(ServiceSchemaImpl.java:692)
      	at com.sun.identity.sm.ServiceSchemaImpl.validateAttrValues(ServiceSchemaImpl.java:633)
      	at com.sun.identity.sm.ServiceSchemaImpl.validateAttributes(ServiceSchemaImpl.java:363)
      	at com.sun.identity.sm.ServiceSchemaImpl.validateAttributes(ServiceSchemaImpl.java:332)
      	at com.sun.identity.sm.ServiceSchema.validateAttributes(ServiceSchema.java:760)
      	at org.forgerock.openam.core.rest.sms.SmsJsonConverter.toJson(SmsJsonConverter.java:195)
      	at org.forgerock.openam.core.rest.sms.SmsJsonConverter.toJson(SmsJsonConverter.java:171)
      	at org.forgerock.openam.core.rest.sms.SmsJsonConverter.toJson(SmsJsonConverter.java:145)
      	at org.forgerock.openam.core.rest.sms.SmsGlobalSingletonProvider.addOrganisationAttributes(SmsGlobalSingletonProvider.java:143)
      	at org.forgerock.openam.core.rest.sms.SmsResourceProvider.getJsonValue(SmsResourceProvider.java:457)
      	at org.forgerock.openam.core.rest.sms.SmsResourceProvider.getJsonValue(SmsResourceProvider.java:445)
      	at org.forgerock.openam.core.rest.sms.SmsSingletonProvider.handleRead(SmsSingletonProvider.java:177)
      

        Attachments

          Activity

            People

            • Assignee:
              ram.anaswara Ramnishath Anaswara [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: