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

AM console - encryption key size is not displayed for ServiceProvider

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 13.0.0, 13.5.0, 13.5.1, 13.5.2, 14.0.0, 14.1.0, 14.1.1, 14.5.0, 14.5.1, 5.5.1, 6.0.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4, 6.0.0.5, 6.5.0, 6.0.0.6, 6.5.0.1, 7.0.0
    • Fix Version/s: None
    • Component/s: console, SAML
    • Labels:
    • Environment:
      Oracle JDK 1.8.0_201-b09
      Apache Tomcat/9.0.8
      AM 6.5.0.1
    • Support Ticket IDs:

      Description

      Bug description

      _SAML encryption Key Size is not displayed for Service Provider in AM console _

      How to reproduce the issue

      1. Configure AM
      2. Import SP meta data with specified KeySize for encryption KeyDescriptor (see OPENAM-8862)
      3. view SP meta data (Assertion Content)
      4. ...
      Expected behaviour
      Key Size should be displayed as set in the SP meta data
      
      Current behaviour
      No Key Size is displayed, see attached screenshot from AM 6.5.0.1
      

      Code analysis

      com.sun.identity.console.federation.model.SAMLv2ModelImpl.java
      ...
      
          private void getKeyandAlgorithm(
                  SSODescriptorType ssodescriptor,
                  Map map
                  )  {
                      List<KeyDescriptorElement> keyList = ssodescriptor.getKeyDescriptor();
              for (KeyDescriptorElement aKeyList : keyList) {
                  KeyTypes type = aKeyList.getValue().getUse();
                  if (type == null || type.equals(KeyTypes.ENCRYPTION)) {
                      List<EncryptionMethodType> encryptMethod = aKeyList.getValue().getEncryptionMethod();
                      if (!encryptMethod.isEmpty()) {
                          EncryptionMethodType encrptElement = encryptMethod.get(0);
                          String alg = encrptElement.getAlgorithm();
                          String size = null;
                          List<Object> keySizeList = encrptElement.getContent();
                          if (!keySizeList.isEmpty()) {
                              for (Object encryptionType : keySizeList) {
                                  encryptionType = JAXBIntrospector.getValue(encryptionType);
                                  if (encryptionType instanceof BigInteger) {
                                      BigInteger keysize = (BigInteger) encryptionType;
                                      size = Integer.toString(keysize.intValue());
                                  }
                              }
                          }
      
                          map.put(TF_KEY_NAME,
                                  returnEmptySetIfValueIsNull(size));
                          map.put(TF_ALGORITHM,
                                  returnEmptySetIfValueIsNull(alg));
      
                      }
                  }
              }
          }
      

      the issue is with

                          if (!keySizeList.isEmpty()) {
                              for (Object encryptionType : keySizeList) {
                                  encryptionType = JAXBIntrospector.getValue(encryptionType);
                                  if (encryptionType instanceof BigInteger) {
                                      BigInteger keysize = (BigInteger) encryptionType;
                                      size = Integer.toString(keysize.intValue());
                                  }
                              }
                          }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bthalmayr Bernhard Thalmayr
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: