Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18030

Authentication cookie will never expire by default after HADOOP-12049

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • security
    • None

    Description

      Whlie create auth cookie for client, AuthenticationFilter will add "Expires"  attribute for the cookie if needed. But after https://issues.apache.org/jira/browse/HADOOP-12049, it never enter the code block by default.

       

       

      // AuthenticationFilter
      
      public static void createAuthCookie(HttpServletResponse resp, String token,
                                          String domain, String path, long expires,
                                          boolean isCookiePersistent,
                                          boolean isSecure) {
        //...
        //By default, isCookiePersistent = false
        if (expires >= 0 && isCookiePersistent) {
          Date date = new Date(expires);
          SimpleDateFormat df = new SimpleDateFormat("EEE, " +
                  "dd-MMM-yyyy HH:mm:ss zzz");
          df.setTimeZone(TimeZone.getTimeZone("GMT"));
          sb.append("; Expires=").append(df.format(date));
        }
      
        //...
      }

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            lalapala gaozhan ding
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: