From notifications-return-32411-archive-asf-public=cust-asf.ponee.io@ofbiz.apache.org Fri Mar 20 16:53:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2C6BE180679 for ; Fri, 20 Mar 2020 17:53:03 +0100 (CET) Received: (qmail 908 invoked by uid 500); 20 Mar 2020 16:53:02 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 879 invoked by uid 99); 20 Mar 2020 16:53:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2020 16:53:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DA744E3148 for ; Fri, 20 Mar 2020 16:53:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 80B50780355 for ; Fri, 20 Mar 2020 16:53:00 +0000 (UTC) Date: Fri, 20 Mar 2020 16:53:00 +0000 (UTC) From: "ASF subversion and git services (Jira)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OFBIZ-11470) Ensure that the SameSite attribute is set to 'strict' for all cookies. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OFBIZ-11470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063512#comment-17063512 ] ASF subversion and git services commented on OFBIZ-11470: --------------------------------------------------------- Commit 82ef7a58713607010bbc4c946068516306c9c03e in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=82ef7a5 ] Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies. (OFBIZ-11470) As reported by OWASP ZAP: A cookie has been set without the SameSite attribute, which means that the cookie can be sent as a result of a 'cross-site' request. The SameSite attribute is an effective counter measure to cross-site request forgery, cross-site script inclusion, and timing attacks. The solution was not obvious in OFBiz for 2 reasons: 1. There is no HttpServletResponse::setHeader. So we need to use a filter (SameSiteFilter) and even that is not enough because of 2: 2. To prevent session fixation we force Tomcat to generates a new jsessionId, ultimately put in cookie, in LoginWorker::login. So we need to add a call to SameSiteFilter::addSameSiteCookieAttribute in UtilHttp::setResponseBrowserDefaultSecurityHeaders. > Ensure that the SameSite attribute is set to 'strict' for all cookies. > ---------------------------------------------------------------------- > > Key: OFBIZ-11470 > URL: https://issues.apache.org/jira/browse/OFBIZ-11470 > Project: OFBiz > Issue Type: Sub-task > Components: ALL APPLICATIONS > Affects Versions: Trunk > Reporter: Jacques Le Roux > Assignee: Jacques Le Roux > Priority: Major > > As reported by OWASP ZAP: > bq. A cookie has been set without the SameSite attribute, which means that the cookie can be sent as a result of a 'cross-site' request. The SameSite attribute is an effective counter measure to cross-site request forgery, cross-site script inclusion, and timing attacks. > The solution was not obvious in OFBiz for 2 reasons: > # There is no HttpServletResponse::setHeader. So we need to use a filter (SameSiteFilter) and even that is not enough because of 2: > # To prevent session fixation we force Tomcat to generates a new jsessionId, ultimately put in cookie, in LoginWorker::login. So we need to add a call to SameSiteFilter::addSameSiteCookieAttribute in UtilHttp::setResponseBrowserDefaultSecurityHeaders. -- This message was sent by Atlassian Jira (v8.3.4#803005)