vikaskr22 commented on code in PR #1143: URL: https://github.com/apache/ranger/pull/1143#discussion_r3752246267
########## ranger-tools/src/main/python/stress/stress_kms.py: ########## @@ -29,21 +29,37 @@ # This script requires Python package apache_ranger to be present. # The package can be installed using following command: # pip3 install --upgrade apache_ranger -# +# If KMS is running with Kerberos, then 'requests-kerberos' package is required and can be installed using following command: +# pip3 install requests-kerberos ## ## This script calls KMS APIs from multiple-threads ## ## parameters: ## kms_url: URL to Apache Ranger admin server -## kms_auth: authentication to connect to Apache Ranger admin server +## kms_auth_type: authentication mode used to connect to Ranger KMS +## 'simple' - Hadoop simple auth; identity is taken +## from `kms_user`. +## 'kerberos' - SPNEGO/Kerberos auth; identity is taken +## from the caller's Kerberos ticket cache +## (run `kinit` before starting the script). +## Requires the `requests-kerberos` package. +## kms_user: user name to pass when kms_auth_type == 'simple'. +## Ignored in kerberos mode. ## key_count number of keys to create ## rollover_key_count: number of times each key to be rolled over ## encrypted_key_count: number of encrypted keys to generate per key ## thread_count: number of threads to call Apache Ranger APIs from ## -kms_url = 'http://localhost:9292' -kms_auth = HadoopSimpleAuth('keyadmin') +kms_auth_type = 'kerberos' # 'simple' | 'kerberos' Review Comment: thanks for the review @mneethiraj . Actually I simply tried to keep all the parameters that can be modified at one place, this way it remains consistent with other params like kms_user, kms_url etc. With explicit kms_auth_type along with description , it would be clear for the new user that this part is configurable. Making inline changes is also fine, but to me it seems making changes in the execution logic. It's only about convention, please let me know your thoughts, I will change it. -- 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]
