From dev-return-90181-archive-asf-public=cust-asf.ponee.io@sling.apache.org Mon Jul 30 23:17:58 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 23AE4180630 for ; Mon, 30 Jul 2018 23:17:57 +0200 (CEST) Received: (qmail 53414 invoked by uid 500); 30 Jul 2018 21:17:57 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 53402 invoked by uid 99); 30 Jul 2018 21:17:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2018 21:17:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0EEF31A330D for ; Mon, 30 Jul 2018 21:17:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.502 X-Spam-Level: X-Spam-Status: No, score=0.502 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=me.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 6WJyBUmjgKF3 for ; Mon, 30 Jul 2018 21:17:53 +0000 (UTC) Received: from st14p37im-asmtp002.me.com (st14p37im-asmtp002.me.com [17.41.209.31]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 57E265F3B4 for ; Mon, 30 Jul 2018 21:17:53 +0000 (UTC) Received: from process-dkim-sign-daemon.st14p37im-asmtp002.me.com by st14p37im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) id <0PCP00L0074T6H00@st14p37im-asmtp002.me.com> for dev@sling.apache.org; Mon, 30 Jul 2018 21:17:31 +0000 (GMT) Received: from icloud.com ([127.0.0.1]) by st14p37im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPSA id <0PCP00MDE755QE40@st14p37im-asmtp002.me.com>; Mon, 30 Jul 2018 21:17:30 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-30_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1807300224 From: Andreas Schaefer Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable MIME-version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: /etc/map with Placeholders for farms / dev stack Date: Mon, 30 Jul 2018 14:17:28 -0700 References: <1B33EE48-1D87-4A82-BC26-14CC3384EDB4@me.com> <5A37B31C-A7CC-4BA8-A6F6-51D5AC2655B2@me.com> To: dev , georg.henzler@netcentric.biz In-reply-to: Message-id: <885EC77E-45D7-40F9-9438-D6B0013EF3C1@me.com> X-Mailer: Apple Mail (2.3445.9.1) Hi George > On Jul 26, 2018, at 2:21 PM, Georg Henzler = wrote: >=20 > Hi Andreas, >=20 > I'm not sure if this is going in the right direction - this is = currently > implemented at at a local module level = (sling-org-apache-sling-resourceresolver) > when it is really something that the platform should support (see = below). Ruben and I were discussing to add placeholders also to OSGi = Configurations to be able to change host names for both the etc-mapping = but also for Distribution / Replication. That would requires to add the string interpolation to Felix in order to = make it work as just trying to handle the OSG configuration from JCR = leads to many issues. But for now we would love to see this in Sling as soon as possible as = testing of bigger companies is difficult and time consuming. If we have a solution in Jackrabbit I am more than happy to remove my = code from the resource resolver. >=20 > Also note that your example/reasoning in the description of SLING-7768 > only lists DEV/QA/STAGING/PROD - if you are limited to those = environments you > can easily do with runmodes. Placeholder replacement becomes = interesting when > you think about an "elastic number of environments" that are not known = at > development time (think about spinning up "STAGING-7" for that special = performance > test that needs to run in isolation) This was the basic test case but our case this involves to have a = different host name because of a temporary migration server. It would also work for URL paths as well. >=20 >> ... Ruben and I think it could be helpful to make the Placeholder = Provider >> more generic to that it could be used in other services like the >> distribution/replication, externalizers etc to have an easier way to >> manage server configuration in a central place. >=20 > I agree we should have the capability in the platform, but IMHO it = should not > be in sling-org-apache-sling-resourceresolver. There was a discussion = in > jackrabbit-dev: >=20 > = http://jackrabbit.510166.n4.nabble.com/Environment-specific-non-role-based= -configurations-td4669795.html > and https://issues.apache.org/jira/browse/JCRVLT-254 > for the initial issue. >=20 > Btw.: you can achieve your requirement already today (down to AEM 6.0) = with > https://github.com/Netcentric/system-env-install-hook > (but I'd rather see this as first-class citizen as part of the = platform > and not as a third-party module) Install Hooks have their own issues like that they do not work for = replication and they requires to changes whatever the customer has / = provides in order to add the place holders. >=20 >>> * No need to support anything else like files and system properties = to >>> provide the placeholders. Makes error handling much more complicated = (what >>> do you do if the http download of that placeholder file fails?), and = I >>> would rather leave it to the ops team to implement that process and = handle >>> any errors. >> I see the issue with the external files / web resources. The system >> properties are there to make sure an admin can override any settings >> if things do not work out. >=20 > I agree here with J=C3=B6rg that allowing external URLs is dangerous = here (and > it could even be seen critical from a security perspective). Also, the = config allows > to give both key value pairs directly and a URL to retrieve them from = - I suppose > these two property sets are merged? I do agree with that and I will remove that from my POC. >=20 > But to sum up I think the best would be to have a mechanism for = placeholder replacement > on a lower level... >=20 > -Georg