Handle SSL and principal-based endpoint determination