Test Series - spring

Test Number 16/20

Q: Element used to secure methods.
A. security:intercept-methods
B. global-method-security
C. all of the mentioned
D. none of the mentioned
Solution: First, you can embed a security:intercept-methods element in a bean definition to secure its methods. Alternatively, you can configure a global global-method-security element to secure multiple methods.
Q: Element used to specify access attributes for bean’s methods.
A. security:protect
B. security:intercept
C. security:intercept-security
D. none of the mentioned
Solution: In a bean’s security:intercept-methods, you can specify multiple security:protect elements to specify access attributes for this bean’s methods.
Q: Attribute used to specify custom access decision manager.
A. access-decision-manager-ref
B. access-decision-ref
C. access-decision
D. none of the mentioned
Solution: If you would like to use a custom access decision manager, you can specify it in the access-decision-manager-ref.
Q: Tag which displays user’s Authentication object.
A. security:tag
B. security_Tag
C. security:authentication
D. none of the mentioned
Solution: The security:authentication tag exposes the current user’s Authentication object for you to render its properties.
Q: Tag which renders the granted authorities one by one.
A. c:for
B. c:forEach
C. c:doWhile
D. c:while
Solution: You can store the authorities property, which contains the authorities granted to the user, in the JSP variable authorities, and render them one by one with a c:forEach tag.
Q: Tag used to render view contents conditionally.
A. security:authorize
B. security:authority
C. security:authenticate
D. none of the mentioned
Solution: If you would like to render view contents conditionally according to a user’s authorities, you can use the security:authorize tag.
Q: Attribute used to render enclosed content.
A. ifGranted
B. if_Granted
C. ifAllGranted
D. none of the mentioned
Solution: If you want the enclosing content to be rendered only when the user has been granted certain authorities at the same time, you have to specify them in the ifAllGranted attribute.
Q: Module that allows each domain to have it’s own access.
A. access share list
B. access common list
C. access control list
D. access list
Solution: Spring Security provides a module named ACL that allows each domain object to have its own access control list (ACL).
Q: SID(Security Identity) associates with permission using.
A. principal(PrincipalSid)
B. authority (GrantedAuthoritySid)
C. all of the mentioned
D. none of the mentioned
Solution: Each ACE contains permissions for a particular SID. An SID can be a principal (PrincipalSid) or an authority (GrantedAuthoritySid) to associate with permissions.
Q: Interfaces that defines operation of an ACL service.
A. AclService
B. MutableAclService
C. All of the mentioned
D. None of the mentioned
Solution: In Spring Security, there are two interfaces that define operations of an ACL service: AclService and MutableAclService. AclService defines operations for you to read ACLs.

You Have Score    /10