Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-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 A900D18DDE for ; Mon, 25 May 2015 08:44:02 +0000 (UTC) Received: (qmail 73119 invoked by uid 500); 25 May 2015 08:37:22 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 73086 invoked by uid 500); 25 May 2015 08:37:22 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 73071 invoked by uid 99); 25 May 2015 08:37:22 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2015 08:37:22 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B981B1CF887; Mon, 25 May 2015 08:37:21 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5289673319340032247==" MIME-Version: 1.0 Subject: Re: Review Request 34643: Kerberos: Creating principals in AD when special characters are involved causes failures From: "Emil Anca" To: "Emil Anca" , "Robert Nettleton" , "Tom Beerbower" Cc: "Robert Levas" , "Ambari" Date: Mon, 25 May 2015 08:37:21 -0000 Message-ID: <20150525083721.18664.11465@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Emil Anca" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/34643/ X-Sender: "Emil Anca" References: <20150524142339.18664.99577@reviews.apache.org> In-Reply-To: <20150524142339.18664.99577@reviews.apache.org> Reply-To: "Emil Anca" X-ReviewRequest-Repository: ambari --===============5289673319340032247== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34643/#review85123 ----------------------------------------------------------- Ship it! Ship It! - Emil Anca On May 24, 2015, 2:23 p.m., Robert Levas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34643/ > ----------------------------------------------------------- > > (Updated May 24, 2015, 2:23 p.m.) > > > Review request for Ambari, Emil Anca, Robert Nettleton, and Tom Beerbower. > > > Bugs: AMBARI-11362 > https://issues.apache.org/jira/browse/AMBARI-11362 > > > Repository: ambari > > > Description > ------- > > Creating principals in AD when special characters are involved causes failures. > > The following characters in the CN need to be escaped: > ``` > / , \ # + < > ; " = > ``` > > *Note:* javax.naming.ldap.Rdn will properly escape relative distinguished name parts. > > > The following characters in the sAMAccountName need to be removed or replaced: > ``` > [ ] : ; | = + * ? < > / \ > ``` > > *Note:* This needs to be done explicitly within the attributes set if a relevant entry exists. > ``` > // Replace the following _illegal_ characters: [ ] : ; | = + * ? < > / \ > value = value.toString().replaceAll("\[|\]|\:|\;|\||\=|\+|\*|\?|\<|\>|\/|\\", "_"); > ``` > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java 38a7563 > ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java 48bf473 > > Diff: https://reviews.apache.org/r/34643/diff/ > > > Testing > ------- > > Manually tested using different special characters in the CN and spaces in the container DN. > > > Thanks, > > Robert Levas > > --===============5289673319340032247==--