From issues-return-132110-archive-asf-public=cust-asf.ponee.io@maven.apache.org Tue May 1 22:57:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B67BE180645 for ; Tue, 1 May 2018 22:57:05 +0200 (CEST) Received: (qmail 96422 invoked by uid 500); 1 May 2018 20:57:04 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 96411 invoked by uid 99); 1 May 2018 20:57:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2018 20:57:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2C37FC0188 for ; Tue, 1 May 2018 20:57:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dKP6VrpYue54 for ; Tue, 1 May 2018 20:57:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 5590E5FB51 for ; Tue, 1 May 2018 20:57:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 31194E012E for ; Tue, 1 May 2018 20:57:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 66E7C212A4 for ; Tue, 1 May 2018 20:57:00 +0000 (UTC) Date: Tue, 1 May 2018 20:57:00 +0000 (UTC) From: "Alessandro Gerlinger Romero (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WAGON-309) NTLM for webdav behind IIS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WAGON-309?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16460= 147#comment-16460147 ]=20 Alessandro Gerlinger Romero commented on WAGON-309: --------------------------------------------------- It=C2=A0should be tested since the change was proposed almost 8 years ago. > NTLM for webdav behind IIS > -------------------------- > > Key: WAGON-309 > URL: https://issues.apache.org/jira/browse/WAGON-309 > Project: Maven Wagon > Issue Type: Improvement > Components: wagon-webdav > Affects Versions: 1.0-beta-2 > Environment: client: jdk1.5 > server: iis 6, tomcat 5.5 and ssl > Reporter: Alessandro Gerlinger Romero > Priority: Minor > Fix For: waiting-for-feedback > > Attachments: wagon-webdav.zip, wagon-webdav.zip > > > To use webdav over https with IIS 6, I changed two files to use NTCredent= ials. It is compatible with basic authentication. > ------- > WebDavWagon.java > ------- > try > { > httpURL =3D urlToHttpURL( url ); > /* - begin - before > if ( hasAuthentication ) > { > String userName =3D authenticationInfo.getUserName(); > String password =3D authenticationInfo.getPassword(); > if ( userName !=3D null && password !=3D null ) > { //httpURL.setUserinfo( userName, password ); webdavResource.setCredenti= als( new NTCredentials(userName, password, "host.com", "host") ); } > } > - end - before > */ > CorrectedWebdavResource.setDefaultAction( CorrectedWebdavResource.NOACTI= ON ); > webdavResource =3D new CorrectedWebdavResource( httpURL ); > // begin - after=20 > if ( hasAuthentication ) > { > String userName =3D authenticationInfo.getUserName(); > String password =3D authenticationInfo.getPassword(); > if ( userName !=3D null && password !=3D null ) > { //httpURL.setUserinfo( userName, password ); webdavResource.setCredenti= als( new NTCredentials(userName, password, repository.getHost(), repository= .getHost()) ); } > } > // end - after > ----------- > CorrectedWebdavResource.java > ----------- > /** > * FOWARD NTCREDENTIALS FOR EACH TRANSACTION > * It is compatible with basic authentication. > * > * @see org.apache.webdav.lib.WebdavResource#generateTransactionHeader(or= g.apache.commons.httpclient.HttpMethod) > */ > protected void generateTransactionHeader(HttpMethod method) { > WebdavState state =3D (WebdavState) client.getState(); > String host =3D null; > String realm =3D null; > if ( hostCredentials instanceof NTCredentials) > { host =3D ((NTCredentials)hostCredentials).getHost(); realm =3D ((NTCred= entials)hostCredentials).getDomain(); } > state.setCredentials(realm, host, hostCredentials); > super.generateTransactionHeader(method); > } > ******* > LIMITATIONS > ******* > Uses host as realm. -- This message was sent by Atlassian JIRA (v7.6.3#76005)