Browse Source

HADOOP-11870. [JDK8] AuthenticationFilter, CertificateUtil, SignerSecretProviders, KeyAuthorizationKeyProvider Javadoc issues (rkanter)

(cherry picked from commit 9fec02c069f9bb24b5ee99031917075b4c7a7682)
Robert Kanter 10 years ago
parent
commit
f00815ac8a

+ 13 - 0
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java

@@ -589,6 +589,13 @@ public class AuthenticationFilter implements Filter {
   /**
   /**
    * Delegates call to the servlet filter chain. Sub-classes my override this
    * Delegates call to the servlet filter chain. Sub-classes my override this
    * method to perform pre and post tasks.
    * method to perform pre and post tasks.
+   *
+   * @param filterChain the filter chain object.
+   * @param request the request object.
+   * @param response the response object.
+   *
+   * @throws IOException thrown if an IO error occurred.
+   * @throws ServletException thrown if a processing error occurred.
    */
    */
   protected void doFilter(FilterChain filterChain, HttpServletRequest request,
   protected void doFilter(FilterChain filterChain, HttpServletRequest request,
       HttpServletResponse response) throws IOException, ServletException {
       HttpServletResponse response) throws IOException, ServletException {
@@ -598,9 +605,15 @@ public class AuthenticationFilter implements Filter {
   /**
   /**
    * Creates the Hadoop authentication HTTP cookie.
    * Creates the Hadoop authentication HTTP cookie.
    *
    *
+   * @param resp the response object.
    * @param token authentication token for the cookie.
    * @param token authentication token for the cookie.
+   * @param domain the cookie domain.
+   * @param path the cokie path.
    * @param expires UNIX timestamp that indicates the expire date of the
    * @param expires UNIX timestamp that indicates the expire date of the
    *                cookie. It has no effect if its value < 0.
    *                cookie. It has no effect if its value < 0.
+   * @param isSecure is the cookie secure?
+   * @param token the token.
+   * @param expires the cookie expiration time.
    *
    *
    * XXX the following code duplicate some logic in Jetty / Servlet API,
    * XXX the following code duplicate some logic in Jetty / Servlet API,
    * because of the fact that Hadoop is stuck at servlet 2.5 and jetty 6
    * because of the fact that Hadoop is stuck at servlet 2.5 and jetty 6

+ 2 - 1
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/CertificateUtil.java

@@ -36,7 +36,8 @@ public class CertificateUtil {
    *
    *
    * @param pem
    * @param pem
    *          - the pem encoding from config without the header and footer
    *          - the pem encoding from config without the header and footer
-   * @return RSAPublicKey
+   * @return RSAPublicKey the RSA public key
+   * @throws ServletException thrown if a processing error occurred
    */
    */
   public static RSAPublicKey parseRSAPublicKey(String pem) throws ServletException {
   public static RSAPublicKey parseRSAPublicKey(String pem) throws ServletException {
     String fullPem = PEM_HEADER + pem + PEM_FOOTER;
     String fullPem = PEM_HEADER + pem + PEM_FOOTER;

+ 1 - 1
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/RolloverSignerSecretProvider.java

@@ -61,7 +61,7 @@ public abstract class RolloverSignerSecretProvider
    * @param config configuration properties
    * @param config configuration properties
    * @param servletContext servlet context
    * @param servletContext servlet context
    * @param tokenValidity The amount of time a token is valid for
    * @param tokenValidity The amount of time a token is valid for
-   * @throws Exception
+   * @throws Exception thrown if an error occurred
    */
    */
   @Override
   @Override
   public void init(Properties config, ServletContext servletContext,
   public void init(Properties config, ServletContext servletContext,

+ 1 - 1
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/SignerSecretProvider.java

@@ -34,7 +34,7 @@ public abstract class SignerSecretProvider {
    * @param config configuration properties
    * @param config configuration properties
    * @param servletContext servlet context
    * @param servletContext servlet context
    * @param tokenValidity The amount of time a token is valid for
    * @param tokenValidity The amount of time a token is valid for
-   * @throws Exception
+   * @throws Exception thrown if an error occurred
    */
    */
   public abstract void init(Properties config, ServletContext servletContext,
   public abstract void init(Properties config, ServletContext servletContext,
           long tokenValidity) throws Exception;
           long tokenValidity) throws Exception;

+ 1 - 1
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java

@@ -377,7 +377,7 @@ public class ZKSignerSecretProvider extends RolloverSignerSecretProvider {
    * This method creates the Curator client and connects to ZooKeeper.
    * This method creates the Curator client and connects to ZooKeeper.
    * @param config configuration properties
    * @param config configuration properties
    * @return A Curator client
    * @return A Curator client
-   * @throws Exception
+   * @throws Exception thrown if an error occurred
    */
    */
   protected CuratorFramework createCuratorClient(Properties config)
   protected CuratorFramework createCuratorClient(Properties config)
           throws Exception {
           throws Exception {

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -118,6 +118,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11876. Refactor code to make it more readable, minor
     HADOOP-11876. Refactor code to make it more readable, minor
     maybePrintStats bug (Zoran Dimitrijevic via raviprak)
     maybePrintStats bug (Zoran Dimitrijevic via raviprak)
 
 
+    HADOOP-11870. [JDK8] AuthenticationFilter, CertificateUtil,
+    SignerSecretProviders, KeyAuthorizationKeyProvider Javadoc issues (rkanter)
+
 Release 2.7.1 - UNRELEASED
 Release 2.7.1 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 2 - 2
hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KeyAuthorizationKeyProvider.java

@@ -93,8 +93,8 @@ public class KeyAuthorizationKeyProvider extends KeyProviderCryptoExtension {
    * The constructor takes a {@link KeyProviderCryptoExtension} and an
    * The constructor takes a {@link KeyProviderCryptoExtension} and an
    * implementation of <code>KeyACLs</code>. All calls are delegated to the
    * implementation of <code>KeyACLs</code>. All calls are delegated to the
    * provider keyProvider after authorization check (if required)
    * provider keyProvider after authorization check (if required)
-   * @param keyProvider 
-   * @param acls
+   * @param keyProvider  the key provider
+   * @param acls the Key ACLs
    */
    */
   public KeyAuthorizationKeyProvider(KeyProviderCryptoExtension keyProvider,
   public KeyAuthorizationKeyProvider(KeyProviderCryptoExtension keyProvider,
       KeyACLs acls) {
       KeyACLs acls) {