title: ABAP Secure Storage: how to store passwords?
body: <p>I never needed to store passwords in an ABAP System.. now it's time to learn something new...</p>
  <p>I need to store a password, which I use on an ABAP System to connect to a different system, so I cant store a (oneway) hash.</p>
  <p>I came across some function modules like <code>FIEB_PASSWORD_ENCRYPT</code> (which is using a hardcoded key) or some suggestions of storing a base64 encoded version of the password (gosh!) =&gt; both would only prevent anyone from &quot;quickly reading&quot; the password if it is on the screen, not prevent anyone from stealing it.</p>
  <p>I also came across <code>SECSTORE</code> (<a href="https://help.sap.com/viewer/280f016edb8049e998237fcbd80558e7/7.51.6/en-US/4eeb2dce10f2398de10000000a42189b.html" rel="nofollow noreferrer">SAP Help Link</a>), which apparently is only usable by SAP components not by custom applications.</p>
  <p>Basically, my need is</p>
  <ul>
  <li><p>store password in some DB table in encrypted form</p>
  </li>
  <li><p>impossible (at least very hard) to get the pw by plain select on that table</p>
  </li>
  <li><p>get from the DB table in clear form to be able to pass it to the &quot;other system&quot;</p>
  </li>
  <li><p>I don't want to re-invent the wheel, especially not in a security area.</p>
  </li>
  </ul>
  <p>I think, there MUST be something there that can be used for that purpose...</p>
  <p><strong>UPDATE</strong> Why do I need that:</p>
  <ul>
  <li>I'm accessing an HTTPS System (destination type G) and all connection params are configured in the destination.</li>
  <li>unfortunately, a PW needs to be transmitted in body as form parameter</li>
  </ul>
  <p><strong>Disclaimer</strong>: I am in discussion currently whether this can be turned into basic auth, which is neither more nor less secure (header vs. body). But with basic auth, I can use the destination config, which in turn uses SECSTORE. This discussion is a long story as many parties are involved and the access to the system is multi-layered...</p>