JiaLiangC opened a new pull request, #4279: URL: https://github.com/apache/ambari/pull/4279
[JIRA: AMBARI-26686](https://issues.apache.org/jira/browse/AMBARI-26686) ## What changes were proposed in this pull request? Enabling the native Ranger HDFS plugin with an HTTP policy-manager URL and the default empty optional client SSL keystore password prevents NameNode startup. The common setup helper tries to write an empty sslKeyStore secret to JCEKS and fails before the authorizer can activate. The proposed fix allows HTTP plugin activation while preserving nonempty credentials, stdin secret transport and restricted credential-file ownership. ### Observed failure ```text Credential store update failed: IllegalArgumentException setup_ranger_plugin_keystore -> create_password_in_credential_store Fail: Credential store update failed with exit code 1 ``` The optional keystore password is empty in this valid HTTP configuration. A truststore credential may still be present independently. Hadoop's provider cannot create the corresponding empty secret key. ### Proposed behavior - Skip absent or empty optional SSL credentials; preserve required audit DB behavior. - If no credentials need writing, do not create an empty invalid JCEKS file. - Mark only nonempty SSL password values as crypted in the generated XML. - Retain the existing helper, stdin transport, ownership and failure propagation for actual writes. ### Reproduction 1. Configure a Ranger HTTP URL and leave the optional SSL keystore password empty. 2. Enable the HDFS Ranger plugin and restart the NameNode. Capture the common helper's JCEKS failure. 3. Apply the fix and restart NameNode and HiveServer2. Verify their real policy-cache versions before issuing allowed, denied, revocation and restoration requests. Historical AMBARI-15878 covers earlier credential-helper integration; this report concerns an empty optional input in the current common helper. AMBARI-23696 instead describes a missing JDK/JCEKS path and does not explain this IllegalArgumentException. ## How was this patch tested? The isolated branch is based on merged trunk `fffc0b8e16`; **6 focused tests passed**. ```bash PYTHONPATH=ambari-common/src/main/python:ambari-common/src/test/python python3 -m unittest -q TestSetupRangerPluginXml ``` Combined runtime: both plugin activation tasks completed; eight non-Kerberos access cases and twelve Kerberos access cases passed. Native audits correlate actual policy IDs, users, resources, results and policy versions. The runtime contains all three related fix sets together; these results are separate from the isolated branch checks. No component recompilation or full Ambari Maven build is claimed. ### Public evidence [Immutable evidence index](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/README.md) and [exact branch/check metadata](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/source-validation.json). - [Before: empty optional key failure](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/ranger/request17-task-230-failure.json) - [After: both authorizers activated](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/ranger/restart-ranger-plugins-with-optional-ssl-credentials-current.json) - [Non-Kerberos native audit correlation](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/ranger/AUDIT-acceptance.json) - [Kerberos native audit correlation](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/kerberos/KERBEROS-AUDIT-acceptance.json) ### Screenshots   <details> <summary>Current Ranger Hive policy listing</summary>  </details> Application captures show the current UI; recorded-evidence screenshots render saved audit/client data. Active alert-worker Environment errors remain visible and are [tracked separately](https://github.com/JiaLiangC/ambari/blob/650390b512ffd5d476760dee7345aff772f49dce/validation/bigtop360-20261203/follow-ups/kerberos-alert-context.json); these source changes do not claim to fix alert monitoring. Please review [Ambari Contributing Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) before opening a pull request. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
