3

I'm working on an open-source web application that will retrieve and display data from a database whose authentication info I would like to keep under wraps, but at the same time, I would like anyone to be able to view and contribute to the source code. The idea is that we don't want the database to be used for profit.

Is there a way to make the database schema public, but only have a few rows of each table actually visible outside of the production server? I'm using ASP.NET MVC 4 in Visual Studio 2012, hosting the code on git, and publishing to Windows Azure. I'm also using a pre-existing Microsoft Access 2007 database.

1
  • 5
    How about creating a copy of the Db, eliminate the verbose data and let the developers access only that Db, not the full one? Commented Jun 5, 2013 at 17:41

1 Answer 1

1

You could encrypt the connectionStrings section of the Web.config file.

How you do that is described here. The connectionStrings section would not be decryptable on any machine except the server. It would be rather inconvenient for other developers though. You could set up so that this connection string is only used when the web site is published using transforms.

Sign up to request clarification or add additional context in comments.

6 Comments

Would Web.config transforms be compatible with Azure deployment from Github?
@VGambit yes, they are. Web site publishing is the normal way to deploy from VS2012 to Azure. That the code is in github does not matter.
I meant something more along the lines of this: vishaljoshi.blogspot.com/2012/09/…
@VGambit Ah, I see. No, I don't know how you apply transforms when deploying azure using git. There is some documentation here github.com/projectkudu/kudu/wiki/Customizing-deployments but it does not sound like it covers transforms.
I think an ideal solution might be a combination of something similar to your idea and Quinton's comment; github.com/projectkudu/kudu/wiki/Managing-settings-and-secrets I could have a testing database with only a few rows per table, and have the Web.config file point to that, which would be public. I can also have the project get deployed from Github. On the Azure end, I can modify the connection string to use the authentication info for the real database.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.