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 BF73C200BA0 for ; Fri, 30 Sep 2016 02:33:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BE20D160AE3; Fri, 30 Sep 2016 00:33:18 +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 73185160AEA for ; Fri, 30 Sep 2016 02:33:17 +0200 (CEST) Received: (qmail 62774 invoked by uid 500); 30 Sep 2016 00:33:16 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 62765 invoked by uid 99); 30 Sep 2016 00:33:16 -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; Fri, 30 Sep 2016 00:33:16 +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 425FDCC06A for ; Fri, 30 Sep 2016 00:33:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CA4IVbHNjGy4 for ; Fri, 30 Sep 2016 00:33:15 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 2897060E53 for ; Fri, 30 Sep 2016 00:33:09 +0000 (UTC) Received: (qmail 60336 invoked by uid 99); 30 Sep 2016 00:33:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2016 00:33:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 23F2AEEE2A; Fri, 30 Sep 2016 00:33:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rvs@apache.org To: commits@geode.incubator.apache.org Date: Fri, 30 Sep 2016 00:33:41 -0000 Message-Id: In-Reply-To: <2b89ce6a4ffc4a24b0b200ff5e4148ba@git.apache.org> References: <2b89ce6a4ffc4a24b0b200ff5e4148ba@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [34/50] [abbrv] incubator-geode git commit: Incomplete update of setting credentials for authentication. [#130304427] archived-at: Fri, 30 Sep 2016 00:33:18 -0000 Incomplete update of setting credentials for authentication. [#130304427] Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b9e16c0d Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b9e16c0d Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b9e16c0d Branch: refs/staging/docs-grant1 Commit: b9e16c0dff53236654806877aee5e1bfb1518088 Parents: b40485b Author: Karen Miller Authored: Wed Sep 14 16:34:40 2016 -0700 Committer: Karen Miller Committed: Wed Sep 14 16:34:40 2016 -0700 ---------------------------------------------------------------------- .../implementing_authentication.html.md.erb | 87 +++++++++++++++++++- managing/security/security-audit.html.md.erb | 2 +- 2 files changed, 85 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b9e16c0d/managing/security/implementing_authentication.html.md.erb ---------------------------------------------------------------------- diff --git a/managing/security/implementing_authentication.html.md.erb b/managing/security/implementing_authentication.html.md.erb index c238be9..98b5505 100644 --- a/managing/security/implementing_authentication.html.md.erb +++ b/managing/security/implementing_authentication.html.md.erb @@ -10,15 +10,96 @@ All components use the same authentication mechanism. When a component initiates a connection to the distributed system, the `SecurityManager.authenticate` method is invoked. -The component provides credentials in the form of `Properties`, -which are passed to the `authenticate` method. +The component provides its credentials in the form of properties +as a parameter to the `authenticate` method. +The credential is presumed to be the two properties: +`security-username` and `security-password`. The `authenticate` method is expected to either return an object representing a principal or throw an `AuthenticationFailedException`. +A well-designed `authenticate` method will have or will have a way of +obtaining a set of known user and password pairs that can be compared +to the credential presented. + +## How a Server Sets Its Credential + +In order to connect with a locator that does authentication, +a server will need to set its credential, composed of the two properties +`security-username` and `security-password`. +There are two ways of accomplishing this: + +- Set the `security-username` and `security-password` in the server's +`gfsecurity.properties` file that will be read upon server start up, +as in the example + + ``` pre + security-username=admin + security-password=xyz1234 + ``` +The user name and password are stored in the clear, so the +`gfsecurity.properties` file must be protected by restricting access with +file system permissions. + +- Implement the `getCredentials` method of the `AuthInitialize` interface +for the server. +This callback's location is defined in the property `security-peer-auth-init`, +as in the example + + ``` pre + security-peer-auth-init=com.example.security.MyAuthInitialize + ``` +The implementation of `getCredentials` may then acquire values for +the properties `security-username` and `security-password` in whatever way +it wishes. +It might look up values in a database or another external resource. + +## How a Cache Client Sets Its Credential + +In order to connect with a locator or a server that does authentication, +a client will need to set its credential, composed of the two properties +`security-username` and `security-password`. +There are two ways of accomplishing this: + +- Set the `security-username` and `security-password` in the client's +`gfsecurity.properties` file that will be read upon client start up, +as in the example + + ``` pre + security-username=webclient + security-password=xyz1234 + ``` +The user name and password are stored in the clear, so the +`gfsecurity.properties` file must be protected by restricting access with +file system permissions. + +- Implement the `getCredentials` method of the `AuthInitialize` interface +for the client. +This callback's location is defined in the property `security-client-auth-init`, +as in the example + + ``` pre + security-client-auth-init=com.example.security.ClientAuthInitialize + ``` +The implementation of `getCredentials` may then acquire values for +the properties `security-username` and `security-password` in whatever way +it wishes. +It might look up values in a database or another external resource, +or it might prompt for values. + +## How Other Components Set Their Credentials + +gfsh prompts upon `gfsh connect`. + +Pulse prompts upon start up. + +Components connecting via the REST API do something. + + ## Implement SecurityManager Interface -Complete these items to implement authentication. +Complete these items to implement authentication done by either a +locator or a server. - Decide upon an authentication algorithm. The [Authentication Example](authentication_examples.html) http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b9e16c0d/managing/security/security-audit.html.md.erb ---------------------------------------------------------------------- diff --git a/managing/security/security-audit.html.md.erb b/managing/security/security-audit.html.md.erb index cec5e31..f35a29a 100644 --- a/managing/security/security-audit.html.md.erb +++ b/managing/security/security-audit.html.md.erb @@ -24,7 +24,7 @@ These configuration files should be readable and writeable *only* by the dedicat - `gemfire.properties` - `cache.xml` - `gfsecurity.properties` - **Note:** A default `gfsecurity.properties` is not provided in the `defaultConfigs` directory. If you choose to use this properties file, you must create it manually. See [Where to Place Security Settings](implementing_security.html) for more information. + A default `gfsecurity.properties` is not provided in the `defaultConfigs` directory. If you choose to use this properties file, you must create it manually. A clear text user name and associated clear text password may be in this file for authentication purposes. The file system's access rights are relied upon to protect this sensitive information. The default location of the `gemfire.properties` and `cache.xml` configuration files is the `defaultConfigs` child directory of the main installation directory.