Webservice No authentication encrypt/decrypt password

Hi All,
I have configured Custom authentication, I have stored the credentials in application object import sailpoint.object.Application;

// Get the application by name
Application app = context.getObjectByName(Application.class, "iBusiness");

// Set plain text attributes (not encrypted)
app.setAttribute("username_CA", "service_user");
app.setAttribute("password_CA", "123456789");

// Save and commit
context.saveObject(app);
context.commitTransaction();

return "Username and password attributes set on application."; $application_pasword_ca$

How can I encrypt and decrypt while using?

with:

context.decrypt()
context.encrypt()

Yeah but for custom authentication in webservice there is no option to write a rule right how can I decrypt?

Hi @pradeepireddy_123

You don’t need to explicitly decrypt the password. Instead, store your password using key suffixes ending with _CA and add it to the encrypted list. You can then retrieve it directly in your custom authentication header.

For more details, please refer to the link below.