hs-v3: Client authorization fixes and improvements post-merge
The legacy/trac#20700 is soon to be merged upstream. Some fixes and improvement have been found during the review process. This is the parent ticket that will collect them all in one place so we don't forget.
issue