Search code examples
intellij-ideaintellij-plugin

Intellij IDEA - DB Navigator - reveal password


I use "DB navigator" plugin(https://plugins.jetbrains.com/plugin/1800-database-navigator/) for my Intellij IDEA Community version quite some time and am very satisfied.

I want to know the password of my DB connection saved in the plugin. They are saved, they are there, but I cannot share it with my teammates.

Even all the IDEA passwords are set to be stored in the system keyring, I don't find them in seahorse, i.e., "Passwords and Keyrings" application in my Ubuntu.

Where are they?


Solution

  • At last, I found it in

    <project_root>/.idea/dbnavigator.xml
    

    search your connection name, and you will see sth like this:

        <connection id="e208f307-8c08-45d5-93fd-958c1d68d049" active="true">
            <database>
              <name value="UAT" />
              <description value="" />
              <database-type value="ORACLE" />
              <config-type value="BASIC" />
              <database-version value="11.2" />
              <driver-source value="BUILTIN" />
              <driver-library value="" />
              <driver value="" />
              <url-type value="SERVICE" />
              <host value="some-host" />
              <port value="1523" />
              <database value="APP_DB" />
              <type value="USER_PASSWORD" />
              <user value="admin" />
              <deprecated-pwd value="<base64-encoded-password>" />
            </database>
            ...
        </connection>
    

    So, I tried to base64 decoded them... and it works...

    Please, if the author sees this, please don't encrypt it in the future versions; I need them to be in my local so that I don't have to ask my teammates again; too shy am I. Please take into consideration that I created the tag db-navigator for the first time while asking this question, so that ppl around the world could gather together with love of this plugin.

    And, any coder reading this: please ignore this file in Git, as it contains sensitive data.