Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0AC75200B3C for ; Mon, 6 Jun 2016 17:34:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 09504160A1E; Mon, 6 Jun 2016 15:34:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 40B08160A55 for ; Mon, 6 Jun 2016 17:34:22 +0200 (CEST) Received: (qmail 41167 invoked by uid 500); 6 Jun 2016 15:34:21 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 41110 invoked by uid 99); 6 Jun 2016 15:34:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2016 15:34:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 692D0C20D0 for ; Mon, 6 Jun 2016 15:34:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.997 X-Spam-Level: * X-Spam-Status: No, score=1.997 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=netorg75979.onmicrosoft.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id aKvHxsf40SU0 for ; Mon, 6 Jun 2016 15:34:16 +0000 (UTC) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0133.outbound.protection.outlook.com [65.55.169.133]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id EA2DF5FB6F for ; Mon, 6 Jun 2016 15:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG75979.onmicrosoft.com; s=selector1-valsphere-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uEf5vMvhU7tP0zQu+tJlESvfp77fFgJZCJ57KD5iZAk=; b=O63m893JZ/RqouZ3VuYBD15ND9cAUzCJszDWqHy33rfsmkrEmb15GizA97+AzCDJXw51mfKL2q3Rg24zyEHup8pXp3gbIE0uravEThZK8WlaVE+0WYjRR2HG9Eym/JqhO+oGnLB6Hm/A6woqeQWqsVJOeKRqu5dp6yIZoAjNzS8= Received: from BY2PR06MB2133.namprd06.prod.outlook.com (10.166.113.25) by BY2PR06MB2134.namprd06.prod.outlook.com (10.166.113.26) with Microsoft SMTP Server (TLS) id 15.1.511.8; Mon, 6 Jun 2016 15:34:08 +0000 Received: from BY2PR06MB2133.namprd06.prod.outlook.com ([10.166.113.25]) by BY2PR06MB2133.namprd06.prod.outlook.com ([10.166.113.25]) with mapi id 15.01.0511.010; Mon, 6 Jun 2016 15:34:07 +0000 From: Adam Boyle To: "user@cayenne.apache.org" Subject: Re: Code obfuscation and the model Thread-Topic: Code obfuscation and the model Thread-Index: AQHRvaW/UrVrLmtbh0yEsdbvcwvek5/cb/gAgAAgfQM= Date: Mon, 6 Jun 2016 15:34:07 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=aboyle@valsphere.com; x-originating-ip: [132.245.54.101] x-ms-office365-filtering-correlation-id: be5892d7-6f21-40ea-97cf-08d38e1fffe6 x-microsoft-exchange-diagnostics: 1;BY2PR06MB2134;5:npPXB8udBR/LolpcsqNkOHezih1DXgq4cSlnO5Ixkkwuo/2/AgUjnjNy9F/KCtAAP2CklEXG9yqQkfzd8pGPqiJ4wDeASSwLCchxGvDRvJiFS+OTNWyZSpuVuvN9kWTyMRtRT+a6rjQzNwipdtzsPw==;24:kQus6MNXhuj2EK11CgfTrm7M6jrzAk0QxKW9QDKFDrpTru/kjmbF1486ZpOArs8FdwUZt4xWSYf6fXGK7+P4ceRlC6tyiBltYprh7Xw93+E=;7:1hgZXmUzadxuQWIjHpRD74KCE6eUDlGbwQ4YlsVnLpWHZ+EZZYLLp3vCUvuVvG/zptYlMxm0Ega9J0IfYluV1T9KWSpFlbXvJJmJKzg2j/uT+OU5ZmsiCo5tl9//OoqjQQb3E/7HHS+aAxSTFJR/RDFwfCVsdzAUf8Esnt9NJxnezwp7cSgLtWM+2LQo9GqoQ60krddOF5DNoJVJ0RDiTavCJFVFjsT3svhjim9u6ls= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR06MB2134; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041072)(6043046);SRVR:BY2PR06MB2134;BCL:0;PCL:0;RULEID:;SRVR:BY2PR06MB2134; x-forefront-prvs: 096507C068 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(51874003)(199003)(377454003)(24454002)(189002)(87936001)(1730700003)(3280700002)(81166006)(81156014)(74316001)(105586002)(2900100001)(3660700001)(50986999)(8676002)(5008740100001)(54356999)(106356001)(10400500002)(2351001)(76176999)(33656002)(76576001)(2906002)(2950100001)(16236675004)(86362001)(106116001)(5002640100001)(77096005)(66066001)(450100001)(9686002)(5003600100002)(92566002)(101416001)(6116002)(3846002)(189998001)(102836003)(110136002)(107886002)(5004730100002)(68736007)(2501003)(97736004)(99286002)(8936002)(122556002)(19580405001)(19580395003)(19625215002)(586003)(18121605002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR06MB2134;H:BY2PR06MB2133.namprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: valsphere.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR06MB2133AB3B944AD676381E5A63CB5C0BY2PR06MB2133namp_" MIME-Version: 1.0 X-OriginatorOrg: valsphere.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2016 15:34:07.1241 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 552f1932-42eb-4db3-a137-fd645bffe074 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR06MB2134 archived-at: Mon, 06 Jun 2016 15:34:23 -0000 --_000_BY2PR06MB2133AB3B944AD676381E5A63CB5C0BY2PR06MB2133namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable More than likely we want to obfuscate both client and server. Our current t= hinking is to use concepts in the Modeler jar file to load the XML, perform= the renames (via the event structure you have in there), save a separate m= odel xml file, then figure out how to incorporate it into our project all a= s part of specific build goals when we want to build a production set of ar= tifacts. Once the obfuscated xml is generated we should be able to remap re= ferences to the DAOs using existing tools such as those used as part of the= process to decompile/deobfuscate the Minecraft jar file using the Forge Mo= d Development Kit, something that we have some experience with. If we come up with a working solution, we may be able to incorporate it int= o the existing cayenne maven plugin or make a new plugin with just that pur= pose, so we'll let you know what we come up with, although it may only be a= subset of a full obfuscation solution as there are some object types we ar= en't using such as Embeddables and Queries (so far). Semi-related question: does the client need to include the model xml in its= jar, or does only the server need the xml since only the server actually t= alks to the DB? -Adam ________________________________ From: Andrus Adamchik Sent: Monday, June 6, 2016 9:16:28 AM To: user@cayenne.apache.org Subject: Re: Code obfuscation and the model I don't have any real life examples, but maybe we can brainstorm something. Are you obfuscating just the client, or the server as well? Andrus > On Jun 3, 2016, at 9:15 PM, Adam Boyle wrote: > > Have any of you ever had to tackle the problem of obfuscating a project t= hat uses Cayenne? I'm looking to find a way to be able to obfuscate a Cayen= ne ROP project and I'm hoping that we're not the first to attempt this. > > > Our thinking is that we would write a utility/maven plugin to obfuscate t= he project XML, generate the classes/DB, use a custom remapping utility to = fix up any code references, then use Proguard/whatever to obfuscate the rem= aining code. > > > Thanks in advance for any advice you can provide! > > -Adam --_000_BY2PR06MB2133AB3B944AD676381E5A63CB5C0BY2PR06MB2133namp_--