Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA7DA1171D for ; Fri, 5 Sep 2014 08:53:01 +0000 (UTC) Received: (qmail 73973 invoked by uid 500); 5 Sep 2014 08:47:02 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 72781 invoked by uid 500); 5 Sep 2014 08:47:01 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 69497 invoked by uid 99); 5 Sep 2014 08:41:26 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2014 08:41:26 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1E424A09B89; Fri, 5 Sep 2014 08:41:26 +0000 (UTC) From: xeronix To: dev@hc.apache.org Reply-To: dev@hc.apache.org Message-ID: Subject: [GitHub] httpclient pull request: Adding support for using delegated GSSCre... Content-Type: text/plain Date: Fri, 5 Sep 2014 08:41:26 +0000 (UTC) GitHub user xeronix opened a pull request: https://github.com/apache/httpclient/pull/17 Adding support for using delegated GSSCredential for Kerberos authentication Internally httpclient relies on GSS API which uses JAAS login configuration specified by user to get the GSSCredential. This patch will allow a user to avoid the config file and directly set a delegated or normal GSSCredential. A normal GSSCredential can be obtained programatically from spn-keytab or user-password using custom Login module. Snippet to set GSSCredential for SPNEGO-KERBEROS Authentication : //gssCredential is the GSSCredential Object KerberosCredentials kerebrosCredential = new KerberosCredentials(gssCredential); CredentialsProvider credsProvider = new BasicCredentialsProvider(); credsProvider.setCredentials(new AuthScope(null, -1, null), kerebrosCredential); Registry authSchemeRegistry = RegistryBuilder . create().register(AuthSchemes.SPNEGO, new SPNegoSchemeFactory()).build(); Use this authSchemeRegistry for HttpClient. You can merge this pull request into a Git repository by running: $ git pull https://github.com/xeronix/httpclient trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/httpclient/pull/17.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17 ---- commit 8f88ec4c58a3d0a72e25af43809698aaf1ccf193 Author: Vipul Mehta Date: 2014-09-04T13:48:34Z Adding support for using delegated GSSCredential for Kerberos authentication Internally httpclient relies on GSS API which uses JAAS login configuration specified by user to get the GSSCredential. This patch will allow a user to avoid the config file and directly set a delegated or normal GSSCredential. A normal GSSCredential can be obtained programatically from spn-keytab or user-password using custom Login module. Snippet to set GSSCredential for SPNEGO-KERBEROS Authentication : //gssCredential is the GSSCredential Object KerberosCredentials kerebrosCredential = new KerberosCredentials(gssCredential); CredentialsProvider credsProvider = new BasicCredentialsProvider(); credsProvider.setCredentials(new AuthScope(null, -1, null), kerebrosCredential); Registry authSchemeRegistry = RegistryBuilder . create().register(AuthSchemes.SPNEGO, new SPNegoSchemeFactory()).build(); Use this authSchemeRegistry for HttpClient. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org