Passwords exposed in URIs
An application stores URIs to be used for file transfers via SFTP, FTP, FTPS and SCP. Many of these URIs contain passwords, for example:
These URIs are visible to too many people. We cannot hide email addresses from these people.
A mini-language to get passwords out of URIs
Using a mini-DSL, we can specify the parts of the email address we don't want to show:
The program that does the file transfer would look for instances of this mini-DSL in the URI, parse them, look up the appropriate strings from restricted sources, and substitute those strings into the URI. For example, supposing that restricted source contains this key/value pair:
Then, after replacement, the URI should be:
Each instance of the mini-DSL within the URI would be delimited with
>>. Details of the mini-DSL between the
>> would be free to vary in order to meet future requirements; the only requirement would be that it contain no
This would achieve my goal of reducing the exposure of these passwords.
Is this mini-language fragile?
- Are there valid FTP/FTPS/SFTP/SCP URIs which will break this scheme?
- Are they at all likely?
- What mini-DSL is less likely to be broken by valid URIs?