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 73F5A200CDF for ; Thu, 17 Aug 2017 22:41:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 70266160E44; Thu, 17 Aug 2017 20:41:35 +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 B6BDD160E11 for ; Thu, 17 Aug 2017 22:41:34 +0200 (CEST) Received: (qmail 13471 invoked by uid 500); 17 Aug 2017 20:41:33 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 13459 invoked by uid 99); 17 Aug 2017 20:41:32 -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; Thu, 17 Aug 2017 20:41:32 +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 64C8AC6865 for ; Thu, 17 Aug 2017 20:41:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.299 X-Spam-Level: X-Spam-Status: No, score=-0.299 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=-2.8, RCVD_IN_SORBS_SPAM=0.5, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pivotal-io.20150623.gappssmtp.com Received: from mx1-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 302m2GYPzQPP for ; Thu, 17 Aug 2017 20:41:31 +0000 (UTC) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4C0D85F2EC for ; Thu, 17 Aug 2017 20:41:31 +0000 (UTC) Received: by mail-io0-f180.google.com with SMTP id g71so26967641ioe.5 for ; Thu, 17 Aug 2017 13:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=kRC+YIPUvqgW24tmfSfE0+HmiUK0VnrJ0Dy0UVTISO4=; b=z5CnqGeSJhZHskR2q4jgK+JWyEN3uAt7YMEPtCv2jY9EfLq/ren78+kejNIqwJ6csS l59+TfRuK+5aduCqS4ec7KWTHEovSvVdIx3Ey1W1UZelerl6SvSs5pfP7MICaWeiufFO GNXruZCtFhIe/6ra0LBuPZ90Zcs0go28fO7CtNIBA3/EZpvnPBfS6ibJvoJnvoNn4UUf qpxykafyQbVXJCxzx1YCCFOvjpMuTteyOjH6INrIgcGiXYqGM44mBK+6bnoMPbJa+JKa fHB1CJ7QeuYs+fb0gXfwXWXw+9e8FbX4MvwXwkc6Uszsg34y5R5lOk6GxttoLtGHnxGL HbJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=kRC+YIPUvqgW24tmfSfE0+HmiUK0VnrJ0Dy0UVTISO4=; b=HSnzws2tsZebcn0r7jgjixg8fqg3DdvL1MbApZrkoAYiJ6I67BDRWaIRXuacaNVcSA cMQ6BqZyUaKu62yIG6++8BVIshazgxxwzO/LZKeERnhZYyHNT1XzZzKusdDCeGL7qQtF KRwuPZYG3bk/Xg/fJbJq+KcEE7zsLJlEiEmxeycfHwGvq4KOUd0nRtr8xA4kvBs/6Hf4 A57Xz2m9xKUQ2SEfGOO2FcXnONrunOlvgMC7EoiPVUOUZqJXttEUj8W/z13mRVx7lLzu ezroBXdhJwIRyg/Vm2Ny2zh199jcyrZ+RhqMuemBOsClZvpInJ6aM876xDN00356VbUO 1nOQ== X-Gm-Message-State: AHYfb5iFiU/2jfEKLZRrRkqx7/sTYEEoE5c3IMNEok8DsxNqjs9rXRJY sLOky7aTUOBlQEHTo8ZmLPmeK5r4fWVy X-Received: by 10.107.36.18 with SMTP id k18mr6184022iok.147.1503002483958; Thu, 17 Aug 2017 13:41:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.19.82 with HTTP; Thu, 17 Aug 2017 13:41:23 -0700 (PDT) In-Reply-To: References: <2EC8B340-A355-4A26-8827-6BEEFC25132C@pivotal.io> <121c32a4-2314-1afb-aebe-bb6dc99bff7c@pivotal.io> <74246de5-cc31-4712-2e15-37983a5aa0f9@pivotal.io> From: Dan Smith Date: Thu, 17 Aug 2017 13:41:23 -0700 Message-ID: Subject: Re: [DISCUSS] authorizing function execution To: dev@geode.apache.org Content-Type: multipart/alternative; boundary="001a114031e22744a20556f90975" archived-at: Thu, 17 Aug 2017 20:41:35 -0000 --001a114031e22744a20556f90975 Content-Type: text/plain; charset="UTF-8" On Thu, Aug 17, 2017 at 12:10 PM, Swapnil Bawaskar wrote: > So, it sounds like if we did #1 above: i.e: > 1) externalize SecurityService so that function author can use it in the > function.execute code to check authorization. > > we could get this to work with lambdas: > ResultCollector rc = getExecution().execute(context -> > context.getCache().getSecurityService().authorizeRead(); > // perform read > context.getResultSender().lastResult(result) > ); > I'm a bit confused by this proposal. The current behavior is that a function requires write. Are you saying that we will change that so that anyone can execute a function, and then all functions need to call this method to check for what authorization level they want? I think we should keep the current behavior of requiring write access by default. Which means the develop needs a way override the permission level *before* the function executes. You could technically make marker interfaces work with lambdas, or if we provide annotations, users can create their own marker interfaces. execute((ReadOnlyFunction) context -> ....) -Dan --001a114031e22744a20556f90975--