Multiple choice technology security

Which of the following API's associates a Subject with the thread of execution?

  1. Subject.doAs ()

  2. AccessController.checkPermission()

  3. SecurityManager.checkAccess()

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Subject.doAs() executes a specified action as a particular JAAS Subject, associating it with the current thread of execution. Other methods like checkPermission() and checkAccess() only verify authorization policies and do not bind or manage user identities on threads.