Merge pull request #23865 from arjantijms/16587_support_custom_principal

Fixes 16587 - support custom principal in Jakarta Authentication