nerdexam
GIAC

GSSP-JAVA · Question #120

You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the…

Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #120. The question stem and answer options stay visible for context.

Question

You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the security roles "ADMIN" and "MANAGER" are allowed to call the method. Which of the following actions are appropriate to accomplish if there is no security-related metadata in the deployment descriptor? Each correct answer represents a complete solution. Choose all that apply.

Options

  • AIf EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for
  • BIf EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for
  • CAnnotate method doPrint() with @RolesAllowed({"ADMIN","MANAGER"}).
  • DAnnotate method doPrint() with @PermitAll.

Unlock GSSP-JAVA to see the answer

You've previewed enough free GSSP-JAVA questions. Unlock GSSP-JAVA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full GSSP-JAVA Practice