LRP-614 practice question 9 of 25
The recommended way to implement a new SSO solution that captures the SSO header is to:
Full set: 144 questionsThe recommended and most appropriate method for implementing a custom, header-based SSO solution is to use a hook plugin to deploy a servlet filter. A servlet filter is the standard Java EE mechanism for intercepting requests, allowing inspection of headers before they are processed by the portal. Liferay's hook plugin architecture is specifically designed to allow such customizations in a modular, non-invasive, and upgrade-friendly manner. This approach correctly separates the custom SSO logic from the portal's core code, adhering to Liferay's development best practices.
A. An Ext plugin is too invasive for this task. Liferay best practices dictate using the least invasive plugin type possible, and a hook is fully capable of deploying a servlet filter.
C. Directly modifying the portal source code is strongly discouraged. This practice makes future upgrades extremely difficult and is not a sustainable or recommended development approach.
D. Overriding a Struts action is not suitable for SSO. An SSO mechanism must check every incoming request for authentication credentials, whereas a Struts action only fires for a specific user interaction. ---
1. Liferay Portal 6.2 Developer's Guide, Chapter 7: "Customizing Liferay with Hooks".
Reference: The section "Using Servlet Filters with a Hook" explicitly details the procedure for creating and deploying a servlet filter via a hook plugin. It states, "You can use a hook to add a servlet filter to Liferay’s chain of servlet filters." This confirms that a hook is the intended mechanism for this task.
2. Liferay Portal 6.2 Developer's Guide, Chapter 8: "Advanced Liferay Development with the Ext Plugin".
Reference: The introductory section warns, "The Ext plugin is the most powerful of Liferay’s plugins, but it’s also the most invasive... You should only use an Ext plugin when you can’t use a hook." This supports the rejection of option A as the "recommended" way.
3. Liferay Portal 6.2 Developer's Guide, Chapter 12: "Single Sign On".
Reference: This chapter discusses Liferay's SSO architecture, including the AutoLogin hook interface. While an AutoLogin hook is part of a complete SSO solution (to perform the actual login), the initial step of capturing credentials from a request header is best handled by a servlet filter, which then passes the information to the AutoLogin implementation. This contextualizes the servlet filter's role as the correct entry point for the process described in the question.
Keep practicing
Take the free LRP-614 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LRP-614 practice questions
- Question 1The best way to add a new language key to the portal is through:
- Question 2In a JSP that includes the tag, the method to check permissions is:
- Question 3A hook plugin can be used to: (Please select all correct answers.)
- Question 4An administrator would like to add a new travel preferences section in the Miscellaneous …
- Question 5The following statements about plugins are true: (Please select all correct answers.)
- Question 6All Service Builder entities contain a local reference to: (Please select all correct ans…
