smolnar82 opened a new pull request, #1187:
URL: https://github.com/apache/knox/pull/1187

   [KNOX-3288](https://issues.apache.org/jira/browse/KNOX-3288) - Database 
support in Knox's Docker image
   
   ## What changes were proposed in this pull request?
   
   ### Summary of Changes:
   
   This PR enhances the gateway-entrypoint.sh script to support gateway 
database connection configuration via environment variables and refactors the 
alias creation logic for better maintainability.
   
   ### Key Improvements:
      - Database Configuration Support: Added support for 
`DATABASE_CONNECTION_USER`, `DATABASE_CONNECTION_PASSWORD`, and 
`DATABASE_CONNECTION_TRUSTSTORE_PASSWORD` environment variables, allowing these 
to be configured as Knox aliases during Docker container startup.
      - Refactored Alias Creation: Introduced a `saveAlias` helper function to 
streamline the process of creating aliases from environment variables, reducing 
code duplication and improving readability.
      - Improved Code Quality:
          - Updated line 49 from $(($CERTS - 1)) to $((CERTS - 1)) to resolve 
CheckStyle/ShellCheck warnings.
          - Quoted ${KEYSTORE_DIR} in truststore paths (e.g., 
"${KEYSTORE_DIR}"/truststore.jks) to ensure robust path handling and satisfy 
CheckStyle requirements.
      - Cleaned up Existing Logic: Migrated `ldap-bind-password`, 
`knox.token.hash.key`, and `keystore password` alias creation to use the new 
`saveAlias` function.
   
   ## How was this patch tested?
   
   Runnning Docker tests here.
   
   ## Integration Tests
   None yet
   
   ## UI changes
   N/A
   


-- 
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]

Reply via email to