From dev-return-15495-archive-asf-public=cust-asf.ponee.io@syncope.apache.org Fri Apr 13 09:26:04 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 08108180627 for ; Fri, 13 Apr 2018 09:26:03 +0200 (CEST) Received: (qmail 88327 invoked by uid 500); 13 Apr 2018 07:26:03 -0000 Mailing-List: contact dev-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list dev@syncope.apache.org Received: (qmail 88316 invoked by uid 99); 13 Apr 2018 07:26:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2018 07:26:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id AB5BA18030A for ; Fri, 13 Apr 2018 07:26:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id VAh7V20G_g_m for ; Fri, 13 Apr 2018 07:26:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 581355FAEB for ; Fri, 13 Apr 2018 07:26:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8C98DE0BE2 for ; Fri, 13 Apr 2018 07:26:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4F792241C7 for ; Fri, 13 Apr 2018 07:26:00 +0000 (UTC) Date: Fri, 13 Apr 2018 07:26:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@syncope.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SYNCOPE-1301) Token creation is not threadsafe 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/SYNCOPE-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436948#comment-16436948 ] ASF subversion and git services commented on SYNCOPE-1301: ---------------------------------------------------------- Commit 24f789932141ee05fa12d81eca9d43178953f508 in syncope's branch refs/heads/master from [~ilgrosso] [ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=24f7899 ] [SYNCOPE-1301] Reworking logic to avoid conficts > Token creation is not threadsafe > -------------------------------- > > Key: SYNCOPE-1301 > URL: https://issues.apache.org/jira/browse/SYNCOPE-1301 > Project: Syncope > Issue Type: Bug > Components: core > Affects Versions: 2.0.8 > Reporter: Isuranga Perera > Priority: Major > Fix For: 2.0.9, 2.1.0 > > > Token create method in AccessTokenDataBinderImpl[1] is not thread safe. This could result in several problems including > * Exist 2 different access token for a particular user at a given time which may result in an exception thrown by method call[2] since it expects a single token a given user. > In addition to that token replace is implemented as a combination of 2 different functionalities. Since the method is not thread safe this may cause some unexpected behaviors (since there can be 2 tokens exist for a particular user. same scenario as above). > [1] [https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java#L104] > [2] [https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java#L113] -- This message was sent by Atlassian JIRA (v7.6.3#76005)