[ 
https://issues.apache.org/jira/browse/HBASE-30576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152823#comment-18152823
 ] 

Kevin Geiszler commented on HBASE-30576:
----------------------------------------

Hey [~xavierfernandis], this is a great find. Thanks for reporting this. Do you 
plan on submitting a fix for this soon?

> Debug Dump overwrites sensitive properties in the live configuration of the 
> Master and RegionServers
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-30576
>                 URL: https://issues.apache.org/jira/browse/HBASE-30576
>             Project: HBase
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 3.0.0, 2.6.5, 2.6.6, 2.6.7
>            Reporter: Xavier Fernandis
>            Assignee: Xavier Fernandis
>            Priority: Major
>
> The Debug Dump page is meant to hide passwords in what it SHOWS, but in HBase 
> 2.6.5+ it hides them in the server's RUNNING configuration, so the server 
> itself loses its real passwords.
> *How it happens:*
>  #  Every HBase Master and RegionServer keeps one configuration object in 
> memory. It is loaded from hbase-site.xml and core-site.xml at startup, and 
> the server reads its settings from it whenever it needs them.
>  #  Every Master and RegionServer web UI has a "Debug Dump" link in its 
> navigation bar (/dump).  It shows threads, tasks, logs and the server's 
> configuration, and is a standard troubleshooting page.
>  # Since HBASE-29761 (2.6.5, 2.6.6, 2.6.7, 3.0.0), the page hides sensitive 
> values by writing  "******" INTO that configuration 
> object: StateDumpServlet.getRedactedConfiguration()  ->  conf.set(key, 
> "******")
>   It should write them into a copy, as the /conf page already does 
> (ConfServlet.mask()).
>  # So after ONE visit, the running server has "******" instead of:
>        - the TLS keystore and truststore passwords
>        - object store keys (S3A / ABFS / GCS)
>        - ZooKeeper TLS passwords
>        - its own list of redaction patterns 
> (hadoop.security.sensitive-config-keys)
> *Impact :*
> The server can no longer set up new TLS connections Its keystore password is 
> now "******", so every TLS connection it has to set up from scratch fails 
> with "keystore password was incorrect". 
>  - Master failover: a standby master sets up its TLS connections only when it 
> takes over. If  its Debug Dump page was opened at any time before, it cannot 
> reach the RegionServers or  hbase:meta, fails to become the active master and 
> aborts. The cluster is left with no active master.
> - Certificate renewal: with certificate hot reload on, the server rebuilds 
> its TLS setup when the certificate file is renewed, fails, and refuses every 
> new connection.
> -Only a restart recovers Reloading the configuration (update_config / 
> update_all_config) does not bring the real values back.
> *The Fix :*
>  Redact a copy of the configuration instead of the live one (about 4 lines in 
> StateDumpServlet.getRedactedConfiguration()). Both the Master and 
> RegionServer dump pages use this one method, so one change covers both. 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to