By setting up a gateway connection and then looking at the journal records I tracked down this global subtree:

%SYS>d ^%G
 
For help on global specifications DO HELP^%G
Global ^%SYS("sql","ODBCCONNECTION"
^%SYS("sql","ODBCCONNECTION","DATA")=1
^%SYS("sql","ODBCCONNECTION","DATA",1)=$lb("","ENS171 Samples","YJM","_system","HnBuSSuEERERntcVPGsUMQ==",0,0,"","","","",0,"",0,0,1,0,1,0,"",0)
^%SYS("sql","ODBCCONNECTION","INDEX","NameIndex"," YJM",1)=""
 
Global ^
 
%SYS>

The password (see yellow highlight) isn't stored in plaintext.

As well as our RE/* tools please also consider Yuzinji.

In addition to the main UI that is illustrated in the short video here, the output from Yuzinji can also be browsed in a web app. An example is available at http://demo.georgejames.com:8080/s101g/tracker/home.html where you can get some insights into how a couple of codebases have changed over time. One comes from the InterSystems SAMPLES namespace, and the other is from [@Eduard Lebedyuk]'s RESTForms project.