For Some process(redwoodscript code) I need to use a username/password
so I thought that can be a good idea to store it using credentials
and then from the code be able to retrieve the password.
But when I did it my paswword was not cleared.
Credential c = jcsSession.getCredentialByCredentialProtocolEndpointRealUser(jcsSession.getCredentialProtocolByName("XXX"), "XXX", "XXX");
jcsOut.println(c.getPassword());
The api doc sais that it is encripted some how.
Get the value for Password. (The password for a connection. Encrypted by postSetPassword) This value is mandatory, and therefore will not be null
if this object has been retrieved from the database.
So is there any way of Clearing that password?
it's clear that internally sapcps is able to clear those, however it would make sense that we users/admin cant event using redwood scripting.
My other alternative was to store the password in a systemtable using standard Java crypto api (but again I could not find a way of insert the value into the table from redwood script and I do not want to use copy and paste since Encrypted password might not be printable characters.
Could someone give me first any confirmation that option 1 and 2 are not viable and if so. any idea on how to store and retrieve a password.
(the idea is not to make bullet prove system but just avoid to have something in plain text password=XXXXX
I hope I made my self clear.
Thanks
Miguel Campos.