ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andriy Babiichuk" <ababiic...@hortonworks.com>
Subject Re: Review Request 27035: Slider View: Updating view params in UI breaks masked params
Date Wed, 22 Oct 2014 14:40:39 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27035/#review57788
-----------------------------------------------------------

Ship it!


Ship It!

- Andriy Babiichuk


On Окт. 22, 2014, 1:28 п.п., Andrii Tkach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27035/
> -----------------------------------------------------------
> 
> (Updated Окт. 22, 2014, 1:28 п.п.)
> 
> 
> Review request for Ambari, Andriy Babiichuk and Aleksandr Kovalenko.
> 
> 
> Bugs: AMBARI-7893
>     https://issues.apache.org/jira/browse/AMBARI-7893
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 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:
> {
>   "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"
>   }
> }
> 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.
> 
> 
> Diffs
> -----
> 
>   ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
b179a70 
> 
> Diff: https://reviews.apache.org/r/27035/diff/
> 
> 
> Testing
> -------
> 
> Tested on cluster
> 
> 
> Thanks,
> 
> Andrii Tkach
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message