Test Series - spring

Test Number 14/20

Q: Filter chain configured by Spring security, when web app security enabled.
A. springSecurityFilterChain
B. delegatingFilterProxy
C. none of the mentioned
D. all of the mentioned
Solution: As Spring Security will automatically configure a filter chain with the name springSecurityFilterChain when you enable web application security, you can simply use this name for your DelegatingFilterProxy instance.
Q: Element used to restrict access to a particular URL.
A. restrict-url
B. intercept-url
C. intercept-restrict
D. none of the mentioned
Solution: Inside the http configuration element, you can restrict access to particular URLs with one or more intercept-url elements.
Q: Element which configures authentication services.
A. authentication-provider
B. authentication-manager
C. all of the mentioned
D. none of the mentioned
Solution: You can configure authentication services in the authentication-provider element, which is nested inside the authentication-manager element.
Q: Element which defines user details.
A. user-service
B. user-details
C. user-requirements
D. user-servicerequirements
Solution: Spring Security also supports defining user details in user-service directly for simple security requirements. You can specify a
username, a password, and a set of authorities for each user.
Q: Which of the following way to provide authenticity of users is/are supported by Spring Security?
A. Authenticating against a database
B. LDAP repository
C. All of the mentioned
D. None of the mentioned
Solution: Spring Security supports several ways of authenticating users, including authenticating against a database or an LDAP repository.
Q: The basic security services registered and configured by Spring Security.
A. Form-based login service
B. Logout Service
C. HTTP Basic authentication.
D. All of the mentioned
Solution: Spring Security will automatically register and configure several basic security services, including the above mentioned.
Q: HTTP Basic authentication support is configured by:-
A. logout
B. http-basic
C. http-basicauth
D. none of the mentioned
Solution: The HTTP Basic authentication support can be configured via the http-basic element. When HTTP Basic authentication is required, a browser will typically display a login dialog or a specific login page for users to log in.
Q: Form-based login is configured by:-
A. servlet filters
B. refresh-check-delay
C. form-login
D. none of the mentioned
Solution: The form-based login service will render a web page that contains a login form for users to input their login details and process the login form submission. It’s configured via the form-login element.
Q: Attribute used to display custom login page.
A. login-url
B. custom-login
C. login-custom
D. custom-login
Solution: In order for Spring Security to display your custom login page when a login is requested, you have to specify its URL in the login-page attribute.
Q: Attribute which specifies redirection URL on login error.
A. authentication-failure-url
B. authentication-failure_login-url
C. authentication-login-url
D. none of the mentioned
Solution: If you specify a custom login page, you will have to configure the authentication-failure-url attribute to specify which URL to redirect to on login error.

You Have Score    /10