yunyezhang-work opened a new pull request, #734:
URL: https://github.com/apache/ranger/pull/734

   ## What changes were proposed in this pull request?
   When creating a kms key, if the key name exceeds 240+ characters, it will 
display "Key createed successfully". However, in reality, the key creation 
failed and the corresponding key could not be found in the database either. The 
reason for this problem is that when creating the ranger_keystore table in the 
scripts/db/sqlserver/kms_core_db_sqlserver.sql file, the length of the 
kms_alias field was restricted. Therefore, judgment logic needs to be added in 
the code. If the length exceeds the limit, an exception will be thrown.
   <img width="1229" height="550" alt="Clipboard_Screenshot_1763435066" 
src="https://github.com/user-attachments/assets/29b691c5-1b3e-4c51-b699-f8eb02e8eca1";
 />
   
   ## How was this patch tested?
   To test this patch, create keys of different lengths in the ranger ui test. 
When the number of key characters exceeds 255, an error will be reported and 
creation will not be allowed. When the number of key characters is less than 
255, it is created normally.
   The repaired example is shown in the figure
   The key length exceeds the limit:
   <img width="2059" height="785" alt="image" 
src="https://github.com/user-attachments/assets/92c2b679-9c64-47cc-a635-a1abea391439";
 />
   The key length is within the normal range:
   <img width="1290" height="251" alt="Clipboard_Screenshot_1763435139" 
src="https://github.com/user-attachments/assets/3a5397a5-a253-489f-a470-3f883f619d64";
 />
   


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