1. Form-based login is configured by:-
a) servlet filters
b) refresh-check-delay
c) form-login
d) none of the mentioned
Answer: c
Explanation: 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.
2. Action URL can be customized using form-login.
a) True
b) False
Answer: a
Explanation: Note that the form action URL and the input field names are Spring Security–
specific. However, the action URL can be customized with the login-url attribute of form-
login.
3. Attribute used to display custom login page.
a) login-url
b) custom-login
c) login-custom
d) custom-login
Answer: a
Explanation: 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.
4. 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
Answer: a
Explanation: 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.
5. Session scope attribute to display error message.
a) SPRING_SECURITY_FIRST_EXCEPTION
b) SPRING_SECURITY_LAST_EXCEPTION
c) SPRING_SECURITY_EXCEPTION
d) SPRING_SECURITY_LAST_ERROR
Answer: b
Explanation: If an error has occurred, you will have to display the error message by
accessing the session scope attribute SPRING_SECURITY_LAST_EXCEPTION, which
stores the last exception for the current user.
6. Logout service is configured by:-
a) logout
b) login
c) logout-basic
d) logout_basic
Answer: a
Explanation: The logout service provides a handler to handle logout requests. It can be
configured via the logout element.
7. Element which redirects to a specific URL on logout.
a) logout-success
b) logout-success_url
c) logout-url
d) logout-success-url
Answer: d
Explanation: By default, a user will be redirected to the context path root when the logout
succeeds, but sometimes, you may wish to direct the user to another URL.
8. Anonymous login services can be configured by:-
a) anonymous-basic
b) anonymous
c) anonymous-target
d) none of the mentioned
Answer: b
Explanation: The anonymous login service can be configured via the anonymous element.
9. Default values of customized Username and authorities are anonymousUser and
ROLE_ANONYMOUS respectively.
a) True
b) False
Answer: a
Explanation: You can customize the username and authorities of an anonymous user,
whose default values are anonymousUser and ROLE_ANONYMOUS.
10. Remember-me support can be configured by:-
a) remember-me
b) remember-me-basic
c) remember-basic
d) none of the mentioned
Answer: a
Explanation: Remember-me support can be configured via the remember-me element.
11. By default, Remember-me encodes the username, password, remember-me expiration
time, and a private key as a token, and stores it as a cache in the user’s browser.
a) True
b) False
Answer: b
Explanation: Remember-me stores as cookie in the user’s browser not as cache.
12. Spring Security algorithms to secure password.
a) MD5
b) SHA
c) All of the mentioned
d) None of the mentioned
Answer: c
Explanation: Spring Security supports several algorithms for encoding passwords (including
MD5 and SHA) and provides built-in password encoders for these algorithms.
13. Connection of database with Apache derby server requires.
a) Derby client.jar
b) Spring JDBC support
c) None of the mentioned
d) All of the mentioned
Answer: d
Explanation: To connect to a database in the Apache Derby server, you need the Derby
client .jars, as well as the Spring JDBC support.
14. You can specify the statements for querying a user’s information and authorities in the
users-by-username-query and authorities-by-username-query attributes.
a) True
b) False
Answer: a
Explanation: Spring Security also supports using custom SQL statements to query a legacy
database for user details.
15. Utility to calculate MD5 digests for your password.
a) CheckSum
b) BeanShell
c) Jacksum
d) None of the mentioned
Answer: c
Explanation: Jacksum, which you can download from
http://sourceforge.net/projects/jacksum/ and extract to a directory of your choice. Then
execute the following command to calculate a digest for a text:
java -jar jacksum.jar -a md5 -q “txt:secret”

More Related Content

PPTX
Oauth 2.0 security
PDF
EmberConf 2015 – Ambitious UX for Ambitious Apps
PDF
Client-side Auth with Ember.js
PDF
Stateless authentication for microservices
PPTX
An Introduction to OAuth2
PDF
Stateless authentication for microservices - Greach 2015
PDF
OAuth 2.0
PDF
Stateless Auth using OAuth2 & JWT
Oauth 2.0 security
EmberConf 2015 – Ambitious UX for Ambitious Apps
Client-side Auth with Ember.js
Stateless authentication for microservices
An Introduction to OAuth2
Stateless authentication for microservices - Greach 2015
OAuth 2.0
Stateless Auth using OAuth2 & JWT

What's hot (11)

PPTX
OAuth 2 Presentation
PDF
OAuth 2.0 and Library
PDF
OAuth2 and Spring Security
PDF
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
ODP
OAuth2 - Introduction
PPT
OAuth2 Protocol with Grails Spring Security
PDF
Stateless token-based authentication for pure front-end applications
PDF
Android Cloud to Device Messaging Framework at GTUG Stockholm
PPTX
An introduction to OAuth 2
PDF
Implementing OAuth
PDF
Paul Lammertsma: Account manager & sync
OAuth 2 Presentation
OAuth 2.0 and Library
OAuth2 and Spring Security
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
OAuth2 - Introduction
OAuth2 Protocol with Grails Spring Security
Stateless token-based authentication for pure front-end applications
Android Cloud to Device Messaging Framework at GTUG Stockholm
An introduction to OAuth 2
Implementing OAuth
Paul Lammertsma: Account manager & sync
Ad

Similar to Spring security (20)

PDF
300 208 exam dumps
PPTX
PHP Session - Mcq ppt
PDF
Microsoft AZ-204 Exam Dumps
PDF
Adobe Experience Manager 6.0 Developer Exam
PPT
Express 070 536
PDF
000 252
PDF
How to Pass Salesforce Identity and Access Management Architect Exam?
PDF
Google cloud Professional Data Engineer practice exam test 2020
PDF
Exam 9A0-384 Adobe ExperienceManager 6.0 Developer Exam
PDF
Exam 9a0-384 Adobe Experience Manager 6.0 Developer Exam
PDF
1 y0 253-q&a-demo-certmagic
PDF
SCS-C02 Exam Practice Tests for Amazon | Boost2Certify
PDF
Programming Assignment 3 CSCE 3530 Introduction to Comput.pdf
PPTX
Jdbc ppt
DOCX
CAD Report
PDF
Top Resources to Pass the SC-300 Exam in 2025 – What You Need to Know
PDF
Aws certified security specialty practice tests 2022
PDF
CRACKED AZ-204 Exam in Just 4 Hours! | Developing Solutions for Microsoft Azu...
PDF
Sea surfing in asp.net mvc
ZIP
300 208 exam dumps
PHP Session - Mcq ppt
Microsoft AZ-204 Exam Dumps
Adobe Experience Manager 6.0 Developer Exam
Express 070 536
000 252
How to Pass Salesforce Identity and Access Management Architect Exam?
Google cloud Professional Data Engineer practice exam test 2020
Exam 9A0-384 Adobe ExperienceManager 6.0 Developer Exam
Exam 9a0-384 Adobe Experience Manager 6.0 Developer Exam
1 y0 253-q&a-demo-certmagic
SCS-C02 Exam Practice Tests for Amazon | Boost2Certify
Programming Assignment 3 CSCE 3530 Introduction to Comput.pdf
Jdbc ppt
CAD Report
Top Resources to Pass the SC-300 Exam in 2025 – What You Need to Know
Aws certified security specialty practice tests 2022
CRACKED AZ-204 Exam in Just 4 Hours! | Developing Solutions for Microsoft Azu...
Sea surfing in asp.net mvc
Ad

More from JyothiAmpally (19)

DOCX
node.js interview questions and answers.
PPT
Exception and ErrorHandling in Java .ppt
PPT
Java Strings methods and operations.ppt
PPT
Arrays Basicfundamentaldatastructure.ppt
PPT
_Java__Expressions__and__FlowControl.ppt
PPT
Java-Variables_about_different_Scope.ppt
PPT
Java Operators explained _in __brief.ppt
PPT
UML to Object Oriented Mapping java .ppt
PPT
OOPS_AbstractClasses_explained__java.ppt
PPT
Java_Identifiers_keywords_data_types.ppt
PPT
Java_gui_with_AWT_and_its_components.ppt
PPT
1. Introduction to HTML5.ppt
PPT
01-basics-functions.ppt
PPT
03_A-OOPs_Interfaces.ppt
PPT
25-functions.ppt
PPT
03_A-OOPs_Interfaces.ppt
PPT
02-Java Technology Details.ppt
PPT
01-Java Introduction.ppt
PPT
01_What is Java.ppt
node.js interview questions and answers.
Exception and ErrorHandling in Java .ppt
Java Strings methods and operations.ppt
Arrays Basicfundamentaldatastructure.ppt
_Java__Expressions__and__FlowControl.ppt
Java-Variables_about_different_Scope.ppt
Java Operators explained _in __brief.ppt
UML to Object Oriented Mapping java .ppt
OOPS_AbstractClasses_explained__java.ppt
Java_Identifiers_keywords_data_types.ppt
Java_gui_with_AWT_and_its_components.ppt
1. Introduction to HTML5.ppt
01-basics-functions.ppt
03_A-OOPs_Interfaces.ppt
25-functions.ppt
03_A-OOPs_Interfaces.ppt
02-Java Technology Details.ppt
01-Java Introduction.ppt
01_What is Java.ppt

Recently uploaded (20)

PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Hybrid model detection and classification of lung cancer
PPT
Geologic Time for studying geology for geologist
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PPTX
Modernising the Digital Integration Hub
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
DOCX
search engine optimization ppt fir known well about this
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
CloudStack 4.21: First Look Webinar slides
PPT
Module 1.ppt Iot fundamentals and Architecture
A novel scalable deep ensemble learning framework for big data classification...
Chapter 5: Probability Theory and Statistics
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
1 - Historical Antecedents, Social Consideration.pdf
DP Operators-handbook-extract for the Mautical Institute
Hybrid model detection and classification of lung cancer
Geologic Time for studying geology for geologist
O2C Customer Invoices to Receipt V15A.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Web Crawler for Trend Tracking Gen Z Insights.pptx
Modernising the Digital Integration Hub
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
search engine optimization ppt fir known well about this
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Taming the Chaos: How to Turn Unstructured Data into Decisions
Developing a website for English-speaking practice to English as a foreign la...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
CloudStack 4.21: First Look Webinar slides
Module 1.ppt Iot fundamentals and Architecture

Spring security

  • 1. 1. Form-based login is configured by:- a) servlet filters b) refresh-check-delay c) form-login d) none of the mentioned Answer: c Explanation: 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. 2. Action URL can be customized using form-login. a) True b) False Answer: a Explanation: Note that the form action URL and the input field names are Spring Security– specific. However, the action URL can be customized with the login-url attribute of form- login. 3. Attribute used to display custom login page. a) login-url b) custom-login c) login-custom d) custom-login Answer: a Explanation: 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. 4. 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 Answer: a Explanation: 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. 5. Session scope attribute to display error message. a) SPRING_SECURITY_FIRST_EXCEPTION b) SPRING_SECURITY_LAST_EXCEPTION c) SPRING_SECURITY_EXCEPTION d) SPRING_SECURITY_LAST_ERROR Answer: b Explanation: If an error has occurred, you will have to display the error message by
  • 2. accessing the session scope attribute SPRING_SECURITY_LAST_EXCEPTION, which stores the last exception for the current user. 6. Logout service is configured by:- a) logout b) login c) logout-basic d) logout_basic Answer: a Explanation: The logout service provides a handler to handle logout requests. It can be configured via the logout element. 7. Element which redirects to a specific URL on logout. a) logout-success b) logout-success_url c) logout-url d) logout-success-url Answer: d Explanation: By default, a user will be redirected to the context path root when the logout succeeds, but sometimes, you may wish to direct the user to another URL. 8. Anonymous login services can be configured by:- a) anonymous-basic b) anonymous c) anonymous-target d) none of the mentioned Answer: b Explanation: The anonymous login service can be configured via the anonymous element. 9. Default values of customized Username and authorities are anonymousUser and ROLE_ANONYMOUS respectively. a) True b) False Answer: a Explanation: You can customize the username and authorities of an anonymous user, whose default values are anonymousUser and ROLE_ANONYMOUS. 10. Remember-me support can be configured by:- a) remember-me b) remember-me-basic c) remember-basic d) none of the mentioned Answer: a Explanation: Remember-me support can be configured via the remember-me element.
  • 3. 11. By default, Remember-me encodes the username, password, remember-me expiration time, and a private key as a token, and stores it as a cache in the user’s browser. a) True b) False Answer: b Explanation: Remember-me stores as cookie in the user’s browser not as cache. 12. Spring Security algorithms to secure password. a) MD5 b) SHA c) All of the mentioned d) None of the mentioned Answer: c Explanation: Spring Security supports several algorithms for encoding passwords (including MD5 and SHA) and provides built-in password encoders for these algorithms. 13. Connection of database with Apache derby server requires. a) Derby client.jar b) Spring JDBC support c) None of the mentioned d) All of the mentioned Answer: d Explanation: To connect to a database in the Apache Derby server, you need the Derby client .jars, as well as the Spring JDBC support. 14. You can specify the statements for querying a user’s information and authorities in the users-by-username-query and authorities-by-username-query attributes. a) True b) False Answer: a Explanation: Spring Security also supports using custom SQL statements to query a legacy database for user details. 15. Utility to calculate MD5 digests for your password. a) CheckSum b) BeanShell c) Jacksum d) None of the mentioned Answer: c Explanation: Jacksum, which you can download from http://sourceforge.net/projects/jacksum/ and extract to a directory of your choice. Then execute the following command to calculate a digest for a text: java -jar jacksum.jar -a md5 -q “txt:secret”