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 18D1617D3D for ; Wed, 22 Oct 2014 14:56:34 +0000 (UTC) Received: (qmail 93884 invoked by uid 500); 22 Oct 2014 14:56:34 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 93839 invoked by uid 500); 22 Oct 2014 14:56:34 -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 93826 invoked by uid 99); 22 Oct 2014 14:56:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2014 14:56:33 +0000 Date: Wed, 22 Oct 2014 14:56:33 +0000 (UTC) From: "Andrii Tkach (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-7893) Slider View: Updating view params in UI breaks masked params 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-7893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14179988#comment-14179988 ] Andrii Tkach commented on AMBARI-7893: -------------------------------------- committed to trunk and branch-1.7.0 > Slider View: Updating view params in UI breaks masked params > ------------------------------------------------------------ > > Key: AMBARI-7893 > URL: https://issues.apache.org/jira/browse/AMBARI-7893 > Project: Ambari > Issue Type: Bug > Components: ambari-admin > Affects Versions: 1.7.0 > Reporter: Andrii Tkach > Assignee: Andrii Tkach > Priority: Critical > Fix For: 1.7.0 > > Attachments: AMBARI-7893.patch, AMBARI-7893_branch-1.7.0.patch > > > I created a slider view in the Ambari-Admin UI. The view had one masked parameter {{ambari.server.password}}. I entered "admin" and saw in the POST that the decoded value was uploaded: > {code} > { > "ViewInstanceInfo": { > "instance_name": "s2", > "label": "s2", > "visible": true, > "icon_path": "", > "icon64_path": "", > "properties": { > "ambari.server.url": "http://tdk-1:8080/api/c1/clusters/tdk", > "ambari.server.username": "admin", > "ambari.server.password": "admin", > "view.kerberos.principal": "a", > "view.kerberos.principal.keytab": "aa" > }, > "description": "s2" > } > } > {code} > After saved, I editing and changed another param (say view.kerberos.principal). This broke the masked param. The reason is that the GET call to view parameters gives the encoded value. > So POST takes decoded values and GET provides encoded values. So the next time UI PUTs, the encoded value is put resulting in original value corruption. > The API should either always provided encoded or decoded values, but not both. -- This message was sent by Atlassian JIRA (v6.3.4#6332)