Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FA9011309 for ; Sat, 5 Jul 2014 14:51:26 +0000 (UTC) Received: (qmail 21584 invoked by uid 500); 5 Jul 2014 14:51:25 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 21543 invoked by uid 500); 5 Jul 2014 14:51:25 -0000 Mailing-List: contact commits-help@falcon.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.incubator.apache.org Delivered-To: mailing list commits@falcon.incubator.apache.org Received: (qmail 21534 invoked by uid 99); 5 Jul 2014 14:51:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jul 2014 14:51:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jul 2014 14:51:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CD36E2388A5B; Sat, 5 Jul 2014 14:51:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1608026 [2/2] - in /incubator/falcon: site/ site/0.3-incubating/ site/0.4-incubating/ site/docs/ trunk/general/src/site/twiki/docs/ Date: Sat, 05 Jul 2014 14:50:59 -0000 To: commits@falcon.incubator.apache.org From: sriksun@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140705145100.CD36E2388A5B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/falcon/trunk/general/src/site/twiki/docs/Security.twiki URL: http://svn.apache.org/viewvc/incubator/falcon/trunk/general/src/site/twiki/docs/Security.twiki?rev=1608026&view=auto ============================================================================== --- incubator/falcon/trunk/general/src/site/twiki/docs/Security.twiki (added) +++ incubator/falcon/trunk/general/src/site/twiki/docs/Security.twiki Sat Jul 5 14:50:58 2014 @@ -0,0 +1,193 @@ +---+ Securing Falcon + +---++ Overview + +Apache Falcon enforces authentication on protected resources. Once authentication has been established it sets a +signed HTTP Cookie that contains an authentication token with the user name, user principal, +authentication type and expiration time. + +It does so by using [[http://hadoop.apache .org/docs/current/hadoop-auth/index.html][Hadoop Auth]]. +Hadoop Auth is a Java library consisting of a client and a server components to enable Kerberos SPNEGO authentication +for HTTP. Hadoop Auth also supports additional authentication mechanisms on the client and the server side via 2 +simple interfaces. + + +---++ Authentication Methods + +It supports 2 authentication methods, simple and kerberos out of the box. + +---+++ Pseudo/Simple Authentication + +Falcon authenticates the user by simply trusting the value of the query string parameter 'user.name'. This is the +default mode Falcon is configured with. + +---+++ Kerberos Authentication + +Falcon uses HTTP Kerberos SPNEGO to authenticate the user. + +---++ Server Side Configuration Setup + +---+++ Common Configuration Parameters + + +# Authentication type must be specified: simple|kerberos +*.falcon.authentication.type=kerberos + + +---+++ Kerberos Configuration + + +##### Service Configuration + +# Indicates the Kerberos principal to be used in Falcon Service. +*.falcon.service.authentication.kerberos.principal=falcon/_HOST@EXAMPLE.COM + +# Location of the keytab file with the credentials for the Service principal. +*.falcon.service.authentication.kerberos.keytab=/etc/security/keytabs/falcon.service.keytab + +# name node principal to talk to config store +*.dfs.namenode.kerberos.principal=nn/_HOST@EXAMPLE.COM + +##### SPNEGO Configuration + +# Authentication type must be specified: simple|kerberos| +# org.apache.falcon.security.RemoteUserInHeaderBasedAuthenticationHandler can be used for backwards compatibility +*.falcon.http.authentication.type=kerberos + +# Indicates how long (in seconds) an authentication token is valid before it has to be renewed. +*.falcon.http.authentication.token.validity=36000 + +# The signature secret for signing the authentication tokens. +*.falcon.http.authentication.signature.secret=falcon + +# The domain to use for the HTTP cookie that stores the authentication token. +*.falcon.http.authentication.cookie.domain= + +# Indicates if anonymous requests are allowed when using 'simple' authentication. +*.falcon.http.authentication.simple.anonymous.allowed=true + +# Indicates the Kerberos principal to be used for HTTP endpoint. +# The principal MUST start with 'HTTP/' as per Kerberos HTTP SPNEGO specification. +*.falcon.http.authentication.kerberos.principal=HTTP/_HOST@EXAMPLE.COM + +# Location of the keytab file with the credentials for the HTTP principal. +*.falcon.http.authentication.kerberos.keytab=/etc/security/keytabs/spnego.service.keytab + +# The kerberos names rules is to resolve kerberos principal names, refer to Hadoop's KerberosName for more details. +*.falcon.http.authentication.kerberos.name.rules=DEFAULT + +# Comma separated list of black listed users +*.falcon.http.authentication.blacklisted.users= + + +---+++ Pseudo/Simple Configuration + + +##### SPNEGO Configuration + +# Authentication type must be specified: simple|kerberos| +# org.apache.falcon.security.RemoteUserInHeaderBasedAuthenticationHandler can be used for backwards compatibility +*.falcon.http.authentication.type=simple + +# Indicates how long (in seconds) an authentication token is valid before it has to be renewed. +*.falcon.http.authentication.token.validity=36000 + +# The signature secret for signing the authentication tokens. +*.falcon.http.authentication.signature.secret=falcon + +# The domain to use for the HTTP cookie that stores the authentication token. +*.falcon.http.authentication.cookie.domain= + +# Indicates if anonymous requests are allowed when using 'simple' authentication. +*.falcon.http.authentication.simple.anonymous.allowed=true + +# Comma separated list of black listed users +*.falcon.http.authentication.blacklisted.users= + + +---+++ SSL Configuration + + +*.falcon.enableTLS=true +*.keystore.file=/path/to/keystore/file +*.keystore.password=password + + +---+++ Distributed Falcon Setup + +Falcon should be configured to communicate with Prism over TLS in secure mode. Its not enabled by default. + + +---++ Changes to ownership and permissions of directories managed by Falcon + +| *Directory* | *Location* | *Owner* | *Permissions* | +| Configuration Store | ${config.store.uri} | falcon | 750 | +| Oozie coord/bundle XMLs | ${cluster.staging-location}/workflows/{entity}/{entity-name} | falcon | 644 | +| Shared libs | {cluster.working}/{lib,libext} | falcon | 755 | +| App logs | ${cluster.staging-location}/workflows/{entity}/{entity-name}/logs | falcon | 777 | + + +---++ Backwards compatibility + +---+++ Scheduled Entities + +Entities already scheduled with an earlier version of Falcon are not compatible with this version + +---+++ Falcon Clients + +Older Falcon clients are backwards compatible wrt Authentication and user information sent as part of the HTTP +header, Remote-User is still honoured when the authentication type is configured as below: + + +*.falcon.http.authentication.type=org.apache.falcon.security.RemoteUserInHeaderBasedAuthenticationHandler + + +---+++ Blacklisted super users for authentication + +The blacklist users used to have the following super users: hdfs, mapreduce, oozie, and falcon. +The list is externalized from code into Startup.properties file and is empty now and needs to be +configured specifically in the file. + + +---+++ Falcon Dashboard + +The dashboard assumes an anonymous user in Pseudo/Simple method and hence anonymous users must be enabled for it to +work. + +# Indicates if anonymous requests are allowed when using 'simple' authentication. +*.falcon.http.authentication.simple.anonymous.allowed=true + + +In Kerberos method, the browser must support HTTP Kerberos SPNEGO. + + +---++ Known Limitations + + * ActiveMQ topics are not secure but will be in the near future + * Entities already scheduled with an earlier version of Falcon are not compatible with this version as new + workflow parameters are being passed back into Falcon such as the user are required + * Use of hftp as the scheme for read only interface in cluster entity [[https://issues.apache.org/jira/browse/HADOOP-10215][will not work in Oozie]] + The alternative is to use webhdfs scheme instead and its been tested with DistCp. + + +---++ Examples + +---+++ Accessing the server using Falcon CLI (Java client) + +There is no change in the way the CLI is used. The CLI has been changed to work with the configured authentication +method. + +---+++ Accessing the server using curl + +Try accessing protected resources using curl. The protected resources are: + + +$ kinit +Please enter the password for venkatesh@LOCALHOST: + +$ curl http://localhost:15000/api/admin/version + +$ curl http://localhost:15000/api/admin/version?user.name=venkatesh + +$ curl --negotiate -u foo -b ~/cookiejar.txt -c ~/cookiejar.txt curl http://localhost:15000/api/admin/version +