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 DF381200CFE for ; Fri, 8 Sep 2017 17:59:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DE605160CC7; Fri, 8 Sep 2017 15:59:44 +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 54D0B160CB2 for ; Fri, 8 Sep 2017 17:59:44 +0200 (CEST) Received: (qmail 77198 invoked by uid 500); 8 Sep 2017 15:59:43 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Delivered-To: moderator for dev@chemistry.apache.org Received: (qmail 69506 invoked by uid 99); 8 Sep 2017 15:57:46 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.674 X-Spam-Level: ** X-Spam-Status: No, score=2.674 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FROM_MISSPACED=0.001, KAM_NUMSUBJECT=0.5, NML_ADSP_CUSTOM_MED=1.2, SPF_SOFTFAIL=0.972] autolearn=disabled MIME-Version: 1.0 Message-ID: Subject: SPNEGO Authentication Provider impl used with CMIS 1.1.0 References: From: "krzysztoffzielinski@gmail.com" In-Reply-To: Content-Type: text/plain; charset="iso-8859-1" x-ponymail-sender: ecc74a61f02f963c775ecf372330514902c9a258 Date: Fri, 08 Sep 2017 15:57:41 -0000 x-ponymail-agent: PonyMail Composer/0.2 To: X-Mailer: LuaSocket 3.0-rc1 archived-at: Fri, 08 Sep 2017 15:59:45 -0000 I have Alfresco Core repository configured with SPNEGO authentication (Kerberos SSO). I am writing a service that talks to it using Apache Chemistry opencmis library 1.1.0. Cmis library requires me to provide custom authentication provider, but it drops the Authorisation header I am adding(DefaultHttpInvoker.invoke() line:129). So far I came up with following: public class KerberosAuthProvider extends AbstractAuthenticationProvider { @Override public Map> getHTTPHeaders(String url) { try { String authToken = …. // generate token Map> headers = Maps.newHashMap(); headers.put("Authorization", Lists.newArrayList("Negotiate " + authToken)); return headers; } catch (Exception ex) { throw new IllegalStateException("Couldn't get token", ex); }} } Alfresco responds with following: No Proxy-Authorization Header is present. No Authorization Header is present. I will appreciate any suggestions.