New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

GIAC Secure Software Programmer – Java GSSP-Java Question # 81 Topic 9 Discussion

GIAC Secure Software Programmer – Java GSSP-Java Question # 81 Topic 9 Discussion

GSSP-Java Exam Topic 9 Question 81 Discussion:
Question #: 81
Topic #: 9

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.


A.

Annotate method doPrint() with @RolesAllowed({"ADMIN","MANAGER"}).


B.

Annotate method doPrint() with @PermitAll.


C.

If EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for MANAGER in role "ADMIN".


D.

If EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for MANAGER in role ADMIN.


Get Premium GSSP-Java Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.