The issue here is likely that the long API key is getting encrypted in to an even longer string and overflowing somewhere. As the max limit for the DB insert is likely 255 characters. If the encrypted key is converted in to a 512 long string, then it will not save as expected as the UI might sit there trying to save the value. The best option here is likely to embed the API key in to your (python, pearl, or bash file directly) as the UI is getting stuck on saving the encrypted value. This is going to make it harder to modify, but should work to get you around the UI saving issue.
I looked in to the case logged against this issue and it turns out that is the root cause of the UI being able to save the value correctly as qradar.error reports the following:
[tomcat.tomcat] [user@host (290) /console/restapi/api/analytics/custom_actions/actions/251] org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: value too long for type character varying(255) {prepstmnt 484729968 INSERT INTO custom_action_parameter
I saw some notes in the case about opening an IBM Idea to expand the limits. If you create an idea, it would be a good idea to add a link here in case other users hit this limit and can vote up your suggestion.
------------------------------
Jonathan Pechta
QRadar Support Content Lead
Support forums: ibm.biz/qradarforums
jonathan.pechta1@ibm.com------------------------------
Original Message:
Sent: Fri September 29, 2023 04:36 PM
From: Tom L
Subject: Custom Action Encrypted Parameter hangs on saving...
I am trying to save and encrypt a 172-character API key for a Custom Action. It's been stuck on "Saving.." for a few hours now. I can save it as plaintext, later edit it as encrypted, and then save it; however, when the custom action ran, it threw a " decrypting value" error to /var/log/qradar.log (like the parameter was never properly encrypted to begin with).
Curious if anyone else experienced this issue or if there is a limit to the length of the parameter to encrypt. Thanks.

------------------------------
Tom L
------------------------------