GSSP-Java GIAC Secure Software Programmer-Java

Loading demo links...

Showing 4–6 of 15 questions

Question 4 (Volume A)

Which of the following statements are true?

Each correct answer represents a complete solution. Choose all that apply.

Select all that apply, then click Submit answer.

  • An inner class cannot be defined as private.

  • An inner class cannot be defined as protected.

  • An inner class can be defined as private.

  • An inner class can extend another class.

Question 5 (Volume A)

Which of the following actions can you take to seal two packages, PackageA and PackageB, in the JAR file MyJar.jar?

Each correct answer represents a complete solution. Choose all that apply.

Select all that apply, then click Submit answer.

  • Execute the following command. jar cvf MyJar.jar Manifest.txt MyPackage/*.class

  • Create a text file named Manifest.txt with the following contents. Name. myCompany/*Sealed. true

  • Execute the following command. jar cmf MyJar.jar Manifest.txt MyPackage/*.class

  • Create a text file named Manifest.txt with the following contents.
    Name. myCompany/PackageA/Sealed. true
    Name. myCompany/PackageB/ Sealed. true

Question 6 (Volume C)

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.

Select all that apply, then click Submit answer.

  • The isCallerInRole() method

  • The getCallerPrincipal() method

  • The @RolesAllowed("ADMIN") annotation

  • The @PermitAll annotation