glassfish
  1. glassfish
  2. GLASSFISH-19534

_get-resource-adapter-config-properties returns empty confidentialConfigProps for existing config.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b70
    • Fix Version/s: 4.0_b72_EE7MS4
    • Component/s: jca
    • Labels:
      None

      Description

      There is an issue with _get-resource-adapter-config-properties.

      If the RAconfig hasn't been created, then it will return the confidential properties correctly. Console display that correctly also, and create the RAconfig. No issue.
      Now, if the user wants to edit this RAconfig, console calls _get-resource-adapter-config-properties again, this time, all the properties is returned in the configProps key. But there is no confidentialProperties key returned.

      Thus console can only show all the properties in plain text, not masked.

        Activity

        Hide
        Anissa Lam added a comment -

        Also, during editing, even though the user has removed the 'original' property, that the property is not in domain.xml, the returned result "configProps" will still include the deleted property, and give the original value.

        This should not be the case. Since user has deleted that, during editing, it shouldn't come back.

        Show
        Anissa Lam added a comment - Also, during editing, even though the user has removed the 'original' property, that the property is not in domain.xml, the returned result "configProps" will still include the deleted property, and give the original value. This should not be the case. Since user has deleted that, during editing, it shouldn't come back.
        Hide
        Jagadish added a comment -

        FIX INFORMATION :
        This fix will make sure that "confidential" properties will be returned even after creating a resource-adapter config.

        svn log -v -r 58608
        ------------------------------------------------------------------------
        r58608 | jr158900 | 2013-01-16 21:20:44 +0530 (Wed, 16 Jan 2013) | 6 lines
        Changed paths:
        M /trunk/main/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorDDTransformUtils.java

        w.r.t the method returning the same values as when it was created even in the edit page :

        • The API is meant to introspect the resource-adapter artifacts (ra.xml and the bean classes) and get the values.
        • This is not meant to read the resource's configuration from domain.xml

        Moreover, it's possible to create multiple connector-connection-pools out of same "managed-connection-factory" ie., the API _get-mcf-config-properties. Same would be the case for admin-object-resource.

        So, GUI can call the same API in the edit page just to get the list of confidential properties, use only the names (not the values) and mask the properties (that match the names of confidential properties) that are configured in the resource.

        eg: configured resource may return
        a=1, b=2, c=3

        confidential properties may return
        a=0, b=1, d=4

        So, use only the property names "a" and "b" from confidential properties list and ignore those values. Mask "a" and "b", ignore "d" since it's not present in the configured resource.

        End result :
        a=1, b=2 (masked)
        c=3 (unmasked)

        Show
        Jagadish added a comment - FIX INFORMATION : This fix will make sure that "confidential" properties will be returned even after creating a resource-adapter config. svn log -v -r 58608 ------------------------------------------------------------------------ r58608 | jr158900 | 2013-01-16 21:20:44 +0530 (Wed, 16 Jan 2013) | 6 lines Changed paths: M /trunk/main/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorDDTransformUtils.java w.r.t the method returning the same values as when it was created even in the edit page : The API is meant to introspect the resource-adapter artifacts (ra.xml and the bean classes) and get the values. This is not meant to read the resource's configuration from domain.xml Moreover, it's possible to create multiple connector-connection-pools out of same "managed-connection-factory" ie., the API _get-mcf-config-properties. Same would be the case for admin-object-resource. So, GUI can call the same API in the edit page just to get the list of confidential properties, use only the names (not the values) and mask the properties (that match the names of confidential properties) that are configured in the resource. eg: configured resource may return a=1, b=2, c=3 confidential properties may return a=0, b=1, d=4 So, use only the property names "a" and "b" from confidential properties list and ignore those values. Mask "a" and "b", ignore "d" since it's not present in the configured resource. End result : a=1, b=2 (masked) c=3 (unmasked)
        Hide
        Anissa Lam added a comment -

        Yes,the console is only relying on the confidential Props returned for masking the existing properties in the edit screen. So, this is already working correctly for the connection pool that calls the _get-mcf-config-properties API.
        I believe the edit Resource Adapter Config screen should work now without any GUI code changes once this issue is fixed. But i will double check that.
        thanks for fixing this.

        Show
        Anissa Lam added a comment - Yes,the console is only relying on the confidential Props returned for masking the existing properties in the edit screen. So, this is already working correctly for the connection pool that calls the _get-mcf-config-properties API. I believe the edit Resource Adapter Config screen should work now without any GUI code changes once this issue is fixed. But i will double check that. thanks for fixing this.
        Hide
        Jagadish added a comment -

        Thanks Anissa.
        I shall close this issue.

        Show
        Jagadish added a comment - Thanks Anissa. I shall close this issue.

          People

          • Assignee:
            Jagadish
            Reporter:
            Anissa Lam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: