You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Zhiting Guo (Jira)" <ji...@apache.org> on 2023/07/18 02:07:00 UTC

[jira] [Created] (KYLIN-5644) fix diag api security, encryption changed from base64 to AES

Zhiting Guo created KYLIN-5644:
----------------------------------

             Summary: fix diag api security, encryption changed from base64 to AES
                 Key: KYLIN-5644
                 URL: https://issues.apache.org/jira/browse/KYLIN-5644
             Project: Kylin
          Issue Type: Bug
          Components: REST Service, Security
    Affects Versions: 5.0-alpha
            Reporter: Zhiting Guo
             Fix For: 5.0-alpha


*dev design*

Continue to develop along the existing logic, adjust Base64 encryption to AES encryption, encryption & decryption algorithm multiplexing has been implemented as follows:

  Encryption: org.apache.kylin.common.util.EncryptUtil#encrypt(String strToEncrypt)
  Decryption: org.apache.kylin.common.util.EncryptUtil#decrypt(String strToDecrypt)

Because there will be special characters after AES encryption, such as: +, when API parameters are passed, they will be recognized as spaces, resulting in subsequent errors.
So here is the adjustment, the encryption algorithm is changed to: first encrypt with EncryptUtil#encrypt and then encrypt twice with Base64, and the decryption algorithm is the same: first decrypt with Base64 and then decrypt twice with EncryptUtil#decrypt.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)