Symantec Access Management

Avoid the situation where the Response attribute will be trimmed

  • 1.  Avoid the situation where the Response attribute will be trimmed

    Broadcom Employee
    Posted May 16, 2018 11:49 AM

    The UserContext class in smjavaapi has a getProp function which can be used to retrieve a user's attribute.

    public java.lang.String getProp(java.lang.String propName)
    The documentation does not report that the returned value is trimmed to 100 characters.

    So if the attribute is longer than 100 character it will be trimmed and you got in the trace log the following message:

     

    [05/15/2018][18:05:28.667][18:05:28][2912][3388][SmAuthUser.cpp:804][GetDsUserProp][][][][][][][][][][][][][][][][][][][][][WARNING: Response attribute will be trimmed. [attr = ATTRUBUTE] [actual attr len = 3489] [ response attr len = 100]][]

     

    I found a workaround using instead the method:

    public java.lang.String getProp(java.lang.String propName, java.lang.integer buffersize)

     

    setting a buffersize bigger than the maximum expected value.

    I'm afraid it will use too more memory and it is not best approach.

     

    do someone face the same issue? did you find a better solution?