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

Upgrading OpenAM results in failure due to restSMS.xml

    Details

    • Sprint:
      AM Sustaining Sprint 42, AM Sustaining Sprint 44
    • Story Points:
      2
    • Needs backport:
      Yes
    • Support Ticket IDs:
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes but I used my own steps. (If so, please add them in a new comment)

      Description

      Bug description

      When upgrading OpenAM from 12.0.2 to OpenAM 13.5 OpenAM fails with the following error:

      ERROR: UpgradeUtils:createService : Data validation failed for the attribute, oidc-signature-algorithm

      How to reproduce the issue

      1. step 1 Create OpenAM 12.0.2 environment.
      2. step 2 Upgrade to OpenAM 13.5
      3. step 3 Observe error
      Expected behaviour

      OpenAM should upgrade without error

      Current behaviour

      OpenAM fails with error above. This appears to be caused by the following code in the restSMS.xml file:

      <AttributeSchema name="oidc-signature-algorithm"
                                      type="single_choice" syntax="string" i18nKey="oidc_signature_algorithm">
                          <ChoiceValues>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_hmac_sha_256">HS256</ChoiceValue>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_hmac_sha_384">HS384</ChoiceValue>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_hmac_sha_512">HS512</ChoiceValue>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_rsa_sha_256">RS256</ChoiceValue>
                          </ChoiceValues>
                          <DefaultValues>
                              <Value>RSA</Value>
                          </DefaultValues>
                      </AttributeSchema>
      

      It appears that RSA is not one of the accepted ChoiceValues and because of this the upgrade is failing.

      Work around

      Work around is to place an accepted value in the Default value for oidc-signature-algorithm.

      Code analysis

      <AttributeSchema name="oidc-signature-algorithm"
                                      type="single_choice" syntax="string" i18nKey="oidc_signature_algorithm">
                          <ChoiceValues>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_hmac_sha_256">HS256</ChoiceValue>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_hmac_sha_384">HS384</ChoiceValue>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_hmac_sha_512">HS512</ChoiceValue>
                              <ChoiceValue i18nKey="oidc_signature_algorithm_rsa_sha_256">RS256</ChoiceValue>
                          </ChoiceValues>
                          <DefaultValues>
                              <Value>RSA</Value> <---- issue is caused here
                          </DefaultValues>
                      </AttributeSchema>
      

        Attachments

          Activity

            People

            • Assignee:
              adam.heath Adam Heath
              Reporter:
              abel.hoxeng Abel Hoxeng
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: