[ 
https://issues.apache.org/jira/browse/HADOOP-8787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454650#comment-13454650
 ] 

Alejandro Abdelnur commented on HADOOP-8787:
--------------------------------------------

Ted,

----
On AuthenticationFilter.

{code}
      if (configPrefix.isEmpty()) {
        errorMessage = "Unable to init AuthenticationHandler because of the 
following exception.";
      } else {
        errorMessage = "Unable to init AuthenticationHandler of '" + 
configPrefix + "*' properties because of the following exception.";
      }
      throw new ServletException(errorMessage, ex);
{code}

I'd do:

{code}
      errorMessage = "Unable to init AuthenticationHandler";
      if (!configPrefix.isEmpty()) {
        errorMessage += " with '" + configPrefix + "*' properties";
      }
      throw new ServletException(errorMessage + ": " + ex.getMessage(), ex);
{code}

----
On

{code}
      LOG.warn("'" + configPrefix + "signature.secret' configuration not set, 
using a random value as secret");
{code}

use the {{SIGNATURE_SECRET}} constant instead.

----
On the {{AuthenticatorFilter.getConfiguration()}} method I would add the 
{{configPrefix}} as a 'config.prefix' property in the {{Properties}} object.

This will allow you to generate the full property name in the exception thrown 
from the KerberosAuthenticatorHandler. -------


                
> KerberosAuthenticationHandler should include missing property names in 
> configuration
> ------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8787
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8787
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: security
>    Affects Versions: 1.0.3, 3.0.0, 2.0.1-alpha
>            Reporter: Todd Lipcon
>            Assignee: Ted Malaska
>            Priority: Minor
>              Labels: newbie
>         Attachments: HADOOP-8787-0.patch, HADOOP-8787-1.patch, 
> HADOOP-8787-2.patch
>
>
> Currently, if the spnego keytab is missing from the configuration, the user 
> gets an error like: "javax.servlet.ServletException: Principal not defined in 
> configuration". This should be augmented to actually show the configuration 
> variable which is missing. Otherwise it is hard for a user to know what to 
> fix.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to