* fix(security): restrict API key access on internal-only routes
* test(security): update function execute tests for checkInternalAuth
* updated agent handler
* move session check higher in checkSessionOrInternalAuth
* extracted duplicate code into helper for resolving user from jwt