Forum Discussion

codyowens's avatar
codyowens
Frequent Visitor
3 years ago

Obfuscate database credentials from Version Control/XML

I am trying to work with version control for a ReadyAPI project. I have some database connections that use personal credentials for each user. We do not want these passwords shared in the version control.

I initially tried setting up a default settings.xml file for the project, adding it to the version control and then ignoring the settings.xml after each user puts their personal credentials into the project database connections.

I thought this would work but every time a data source using that connection is added to a test case it writes the password as a string into the settings.xml of that individual test case.

I've also tried global properties but it always seems to write the credentials as a plain string when used in a project.

Is there a way to obfuscate our database connection info from version control?

  • richie's avatar
    richie
    Community Hero
    Hey codyowens,

    Im answering cos no one else has yet, but i havent got any composites to try replicating your issue....im assuming your using composites rather than thr flat .xml, right?

    Im curious why the .gitignore didnt work....it shouldve done.

    Is there a single settings.xml or multiple versions of the file?

    Cheers,

    Rich
    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you for involving into this thread, Rich!

       

      codyowens did you manage to solve this? If not, looks like Richie here might be on to something. Please provide more details as he's requiring.