CryptorResponse plugin
Description#
- The CryptorResponseplug-in usesfieldNamesto match the parameters inresponseBodyforencryptionprocessing, replacing the corresponding content of the currentfieldNames.
Plugin Setting#
- In shenyu-adminBasicConfig --> plugin ->cryptor_responseset to enable.

- Open - selectorto configure the traffic that needs to be matched.
- Open the - Rulesconfiguration corresponding to the- selector. 
- strategyName: Algorithm name. Currently, based on shenyu's SPI mechanism, the encryption and decryption algorithms can be customized, Need to implement the - org.apache.shenyu.plugin.cryptor.strategy.CryptorStrategyinterface.- At the same time find the - org.apache.shenyu.plugin.cryptor.strategy.CryptorStrategyfile under- resources/META-INF/shenyu/, Write the name of the algorithm, and the package name of the class that implements the- CryptorStrategyinterface.
- fieldNames: Matching parameter name. Support parsing multi-level json format matching, using .segmentation, such as data.id.
    {      data: {        "id": ""      }    }- decryptKey: Secret key. Used to decrypt data. 
- encryptKey: Secret key. Used to encrypt data. 
- way: Select encrypt or decrypt. 
Plugin Use#
- Add support for cryptorResponsein thepom.xmlfile of shenyu-bootstrap.
<!-- apache shenyu Cryptor Response plugin start--><dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-cryptor</artifactId>  <version>${project.version}</version></dependency><!-- apache shenyu Cryptor Response plugin end-->Situation#
Prevent Internet hacking and obtain data maliciously. Improve data security.