String lenght limitation in SDK method context.getUserContext().getProp("SM_USERGROUPS", 8192);
search cancel

String lenght limitation in SDK method context.getUserContext().getProp("SM_USERGROUPS", 8192);

book

Article ID: 400856

calendar_today

Updated On:

Products

SITEMINDER

Issue/Introduction

Trying to use SDK authorization method 

context.getUserContext().getProp("SM_USERGROUPS", <arbitrary_lenght>);

with a long string, it seems like the resulting string is truncated at 4096 byte

Is there any limitation to the length that may be passed to this method ?

Resolution

In principle there is no specific limitation to the size passed to the string of this java method. As of SiteMinder 12.9, this method has been tested up to 10000 chars as a size inside webauthn flow inside authentication schemes successfully.
 
There are other factors that may make this call look like a failure. One of them is that most headers have a limitation of 4096 chars, so it might be that the string is correctly returned but only the default size is passed. Another reason why this may look like failing is that the APIContext.log(...) method is just logging a fixed length to the smps.log, thus making it look like a failure