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 2A2A018C32 for ; Thu, 14 Jan 2016 18:33:40 +0000 (UTC) Received: (qmail 41021 invoked by uid 500); 14 Jan 2016 18:33:40 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 41005 invoked by uid 500); 14 Jan 2016 18:33:40 -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 40992 invoked by uid 99); 14 Jan 2016 18:33:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 18:33:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C91EB2C1F57 for ; Thu, 14 Jan 2016 18:33:39 +0000 (UTC) Date: Thu, 14 Jan 2016 18:33:39 +0000 (UTC) From: "Greg Hill (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-14672) Creating a user with a mixed-case username behaves strangely MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-14672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Greg Hill updated AMBARI-14672: ------------------------------- Priority: Minor (was: Major) > Creating a user with a mixed-case username behaves strangely > ------------------------------------------------------------ > > Key: AMBARI-14672 > URL: https://issues.apache.org/jira/browse/AMBARI-14672 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.1.1 > Reporter: Greg Hill > Priority: Minor > > If you create a user with some capital letters in the username, Ambari accepts the request and creates a user with the lowercase version of that username. However, if you then do a GET on the original username, Ambari gives a 200 response but an empty response body: > {noformat} > GET /api/v1/users/MixedCase > 200 OK > > GET /api/v1/users/mixedcase > 200 OK > { > "href" : "https://ambari-8d6c17ae32685572aa82f82b813138a1.cbdptest.com/api/v1/users/mixedcase", > "Users" : { > "active" : true, > "admin" : false, > "groups" : [ ], > "ldap_user" : false, > "user_name" : "mixedcase" > }, > "widget_layouts" : [ ], > "privileges" : [ ] > } > {noformat} > Ambari should throw a 404 error at a minimum, but better yet, just lowercase the username requested and return the right user. Since we silently lowercase it on POST, we should do the same on GET, IMO. -- This message was sent by Atlassian JIRA (v6.3.4#6332)