[Test] public void can_export_document_by_id() { using (var store = new EmbeddableDocumentStore { DataDirectory = "Data", RunInMemory = true, UseEmbeddedHttpServer = false })
{
store.Initialize();
var company = new Company {Name = "Sean"};
using (var session = store.OpenSession())
{
session.Store(company);
session.SaveChanges();
}
var api = new SmugglerApi(new EmbeddedRavenConnectionStringOptions { DataDirectory = "Data", AllowEmbeddedOptions = true, });
var options = new SmugglerOptions { File = @"c:\users\sean\desktop\sean.raven" };
options.Filters.Add("Id", company.Id);
api.ExportData(options);
}
}Sean,If the data is on the user's computer, he got it.Oh, you can make it awkward to get it, but they can do that.There is literally no way to hide that if your are running on his machine.
I think that there is some code around (Tobi or Justin wrote it, I believe) that will work like the smuggler for the embedded version.
At the end, it is a file on his machine.Sure, you can encrypt that, but the encryption key also has to be on the machine at some point, so that is pretty meaningless.
Who is the user? What is the data? How important is it to prevent tampering? Are you likely to be dealing with devs / hackers or with standard users?
Sean,
Encrypt the data, that should take you pretty far in only allowing access from your own software.
Sean,
Let me rephrase that, what do you want? How do you envision it?
You _can_ require a password for HTTP access. That is what the OAuth bundle does.
A pull request
If you can get it to work with the current smuggler application that would be ideal, otherwise adding this to Raven.Client.Embedded seems like the best bet
Itamar - I really think that this should be a core feature and not rely on a KB article. You should be able to run Smuggler - or similar - in embedded mode without having to enable HTTP. Using HTTP when Raven is running on the user's desktop throws up issues about user permission levels. Yes, I know there is support for this in Raven, but in my scenario I specifically do not want to enable access through Studio as I want to prevent the user from accessing the data easily. How do I add a feature request for this?
Yes, waiting on a pull request
Since when running in embedded mode, you are already doing this inside your app, is there a reason not to add this to the Raven.Database project?
You cannot export from an embedded DB without enabling the embedded http server.
Smuggler works over HTTP.On Mon, Apr 30, 2012 at 2:52 AM, Sean Kearon <kearo...@googlemail.com> wrote:
I'm trying to use Smuggler to export a single document from an embedded database that does not use the embedded. I'm getting URI format errors from HttpRavenRequest. Can this be done? If so, where am I going wrong in the test below:Thanks :)[Test] public void can_export_document_by_id() { using (var store = new EmbeddableDocumentStore { DataDirectory = "Data", RunInMemory = true, UseEmbeddedHttpServer = false }){ store.Initialize(); var company = new Company {Name = "Sean"}; using (var session = store.OpenSession()) { session.Store(company); session.SaveChanges(); } var api = new SmugglerApi(new EmbeddedRavenConnectionStringOptions { DataDirectory = "Data", AllowEmbeddedOptions = true, }); var options = new SmugglerOptions { File = @"c:\users\sean\desktop\sean.raven" }; options.Filters.Add("Id", company.Id); api.ExportData(options); } }
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/Yfk81TcK9UU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.