Forum Discussion
Can I encrypt specific nodes within HTTP payload with iRules?
Hi, I have a requirement to encrypt some of the contents within an HTTP request body. Is this possible with iRules? If yes, how would it be done? Example:
Input to F5 LTM:
John
Output from F5 LTM:
123asdgdfg21354654dfgdf
Regards
3 Replies
- Kevin_Stewart
Employee
You can use an encryption mechanism:
And even hashing mechanisms:
sha1 commands (also sha256, 384, and 512)
But then it depends on where you're sending it and who needs to be able to decrypt it (or if it needs to be decrypted at all). If you're just encrypting it to the sender so that you can decrypt it when it's relayed back, the AES:: commands will work best. If you need interoperability with third parties, the CRYPTO:: commands are probably best (new in v11.1). If you don't need to decrypt at all, a hashing algorithm like md5 or sha will work.
- Torti
Cirrus
does something like that make any sense? - Kevin_Stewart
Employee
Absolutely. You can use HTTP::collect, HTTP::payload, and a variety of string and regex commands to manipulate the content. If you need help with this, please post a sample of the payload data. Also, is this request or response data?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com