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 # 43 Topic 5 Discussion

GIAC Secure Software Programmer – Java GSSP-Java Question # 43 Topic 5 Discussion

GSSP-Java Exam Topic 5 Question 43 Discussion:
Question #: 43
Topic #: 5

You work as a Software Developer for NewTech Inc. You write a bean class using Enterprise

JavaBeans 3.0. The class uses the @DeclareRoles ("ADMIN, HR, DBA, USER") annotation to declare the security roles. The class contains a method named showResult(). You want to ensure that the ADMIN role is granted privilege to the showResult() method. Moreover, if a role that is not allowed to access the method tries to call the method, an error message must be shown. Assuming that there is no security-related element in the deployment descriptor, which of the following will you use to accomplish the task?

Each correct answer represents a part of the solution. Choose two.


A.

The isCallerInRole() method


B.

The getCallerPrincipal() method


C.

The @RolesAllowed("ADMIN") annotation


D.

The @PermitAll annotation


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.