Log settings RavenDB 4

107 views
Skip to first unread message

Besozzi Luca

unread,
Mar 18, 2018, 2:46:00 AM3/18/18
to RavenDB - 2nd generation document database
Hi

I've implemented a single node of RavenDB 4 (4.0.3-patch-40031) on my Windows 2012 R2.
I've configured authentication trough certificate, and now I need to set the logs for trace
login/operations on the DB. 

Following the online guide, I set the Logs.Mode both in Information and Operations mode, but
I can not find the logins and the operations performed by the users.

what is the correct "settings.json" setting?

Thaks 

Luca


Oren Eini (Ayende Rahien)

unread,
Mar 18, 2018, 3:09:26 AM3/18/18
to ravendb

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Besozzi Luca

unread,
Mar 19, 2018, 4:08:36 AM3/19/18
to RavenDB - 2nd generation document database
This is my config file


{
  "DataDir": "RavenData",
  "License.Eula.Accepted": true,
  "Security.Certificate.LetsEncrypt.Email": "svilup...@test.net",
  "Setup.Mode": "LetsEncrypt",
  "Security.Certificate.Path": "cluster.server.certificate.test.pfx",
  "ServerUrl": "https://192.168.100.137",
  "ServerUrl.Tcp": "tcp://192.168.100.137:38888",
  "PublicServerUrl": "https://a.test.development.run",
  "PublicServerUrl.Tcp": "tcp://a.test.development.run:38888",
  "Logs.Path": "Logs",
  "Logs.Mode": "Operations"
}

For example the log of today is completely empty.

Luca
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2018, 4:18:09 AM3/19/18
to ravendb
Try providing the _full_ path to the directoy.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 19, 2018, 4:52:21 AM3/19/18
to RavenDB - 2nd generation document database
If I replace "Logs" with the full path "D:\RavenDB4\Server\Logs" the service doesn't start
This is the error in Event Viewer:

Faulting application name: Raven.Server.exe, version: 0.0.0.0, time stamp: 0x5a3b026d
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18895, time stamp: 0x5a4b1cf7
Exception code: 0xe0434352
Fault offset: 0x00000000000092fc
Faulting process id: 0xacc
Faulting application start time: 0x01d3bf5f14b39f01
Faulting application path: D:\RavenDB4\Server\Raven.Server.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 5bef9176-2b52-11e8-80ca-005056bc4069
Faulting package full name: 
Faulting package-relative application ID: 
Event ID: 1000

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2018, 4:56:59 AM3/19/18
to ravendb
D:\\RavenDB\\Logs

You need to double excape?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 19, 2018, 5:13:54 AM3/19/18
to RavenDB - 2nd generation document database

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2018, 5:14:49 AM3/19/18
to ravendb
Try running this from the command line, what do you get?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 19, 2018, 5:32:45 AM3/19/18
to RavenDB - 2nd generation document database
C:\Windows\system32>net start RavenDB
The RavenDB service is starting.
The RavenDB service could not be started.

A system error has occurred.

System error 65535 has occurred.

The system cannot find message text for message number 0xffff in the message fil
e for BASE.

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2018, 5:45:54 AM3/19/18
to ravendb
Unable to create file with File system error (65535)
Check file permissisons?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2018, 5:46:07 AM3/19/18
to ravendb
And please, start it as YOUR user, not as a service

Besozzi Luca

unread,
Mar 19, 2018, 6:38:55 AM3/19/18
to RavenDB - 2nd generation document database
This is the permission of the folder




























If I start it as my user:

Besozzi Luca

unread,
Mar 19, 2018, 6:49:21 AM3/19/18
to RavenDB - 2nd generation document database
I solved the problem of the certificate, now Raven start correctly.
The log file was created, but there is only some log, not the information that I need, for example login or operation on db.

Oren Eini (Ayende Rahien)

unread,
Mar 19, 2018, 7:56:52 AM3/19/18
to ravendb
Set the log mode to Information
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 20, 2018, 4:55:35 AM3/20/18
to RavenDB - 2nd generation document database
Ok, I've set the log mode to Information, now I have more details.
But the strange thing is when I login with my certificate, in the log:

2018-03-20T08:08:28.8918443Z, 15, Information, Raven/Server, Raven.Server.Https.AuthenticatingAdapter, Received TLS connection request from : with client certificate: . Authentication status: NoCertificateProvided.

Seems that I log in without certificate.

Oren Eini (Ayende Rahien)

unread,
Mar 20, 2018, 5:02:40 AM3/20/18
to ravendb
What does  /certificates/whoami says?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 20, 2018, 5:19:25 AM3/20/18
to RavenDB - 2nd generation document database
Seems to be ok.

{"Name":"L.Besozzi","Certificate":"MIIE8zCCAtugAwIBAgIDBpzCMA0GCSqGSIb3DQEBDQUAMCcxJTAjBgNVBAMTHGEuYXN0YWxlZ2FsZS5kZXZlbG9wbWVudC5ydW4wHhcNMTgwMzA5MDAwMDAwWhcNMjMwMzA5MDAwMDAwWjAUMRIwEAYDVQQDDAlMLkJlc296emkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDMOty0Ya9KiAYH7cgT0S5exqQQkndc5DrpY/F8GyeWV79n/2nFW9WOK2a++FZDZrLfUFszJkNx3/Dg43rONPGTnFmGB4aitA6tmQG/oc8iKLxYE/8pJw6trm2oYTJUsZeEnp0wf80iPU0hIi2vKD0Sybw151EEAzor2CZSftvoLBjKSC76wpu1ZEVx2old2mmjhwk7HeYST0FmwEzsaaKu55YaZMKxvoK7iyV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aSuKDBf4tPTbh+Xt+ZMAo5pABON7lm44olVwetF0RnEE6Nb0IkOTarjgicCTDwG40k/3tzGEsCXpf13LgIR5CT33X2Sq1VTenI4D+Os+zDQ+i9QI6ymiJd//k/CSw1x8osTMPEHNiV6ZrAwuRh57OZArWdlMckeePGCAuyfiU=","Thumbprint":"566C2FB019BDE838C1C01B25051B8DE59963465D","NotAfter":"2023-03-09T01:00:00.0000000","SecurityClearance":"ClusterAdmin","Permissions":{},"CollectionPrimaryKey":"","CollectionSecondaryKeys":[]}

But in the log 

2018-03-20T08:10:29.9387191Z, 11, Information, Server, Raven.Server.RavenServerStartup, GET /certificates/whoami? - 200 - 0 ms

Besozzi Luca

unread,
Mar 21, 2018, 4:30:20 AM3/21/18
to RavenDB - 2nd generation document database
In the log file I still cannot see collegue log with the certificate:
Information, Raven/Server, Raven.Server.Https.AuthenticatingAdapter, Received TLS connection request from : with client certificate: . Authentication status: NoCertificateProvided.

Oren Eini (Ayende Rahien)

unread,
Mar 21, 2018, 10:46:02 AM3/21/18
to ravendb
This is an attempted request that was rejected because it had no certificate. 
I assume that something in the browser first tried this request without the cert?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 21, 2018, 10:56:10 AM3/21/18
to RavenDB - 2nd generation document database
Is strange because in every browser immediately compare a pop-up for choose the certificate to login.
And than in the log file there is not the login event.

Oren Eini (Ayende Rahien)

unread,
Mar 21, 2018, 10:59:36 AM3/21/18
to ravendb
The log statement there is, so I'm not sure how it isn't showing at least the remote address.:

  Logger.Info($"Received TLS connection request from {info?.RemoteIpAddress}:{info?.RemotePort} with client certificate: {certificate?.SubjectName?.Name}. " +
                            $"Authentication status: {authenticationStatus.Status}.");
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Arkadiusz Palinski

unread,
Mar 21, 2018, 11:10:30 AM3/21/18
to rav...@googlegroups.com
We log only unsuccessful connection attempts. As you don't have any problem with accessing the server you don't see anything in the log.

Besozzi Luca

unread,
Mar 21, 2018, 11:49:53 AM3/21/18
to RavenDB - 2nd generation document database
For us, and for the GDPR law compliance, is also very important to log also the successful logins.
In 3.5 we use Api-key and windows AD login, and in the log I can see all the login.

Oren Eini (Ayende Rahien)

unread,
Mar 22, 2018, 2:51:34 AM3/22/18
to ravendb
We can offer that, but I'm not sure that the log is the best place to put such a thing, to be frank.
Activating the log at information level is too much for such a requirement.

The question here is, what kind of audit are we talking about? Remember, this is done on a _per_ connection basis, so likely is going to be a lot of that6 over time.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 22, 2018, 3:59:04 AM3/22/18
to RavenDB - 2nd generation document database
For the GDPR law it is important to know who logs in on Ravendb, both for applications and users,
Because in case of data breach we have to provide as much data as possible to the authorities.

Oren Eini (Ayende Rahien)

unread,
Mar 22, 2018, 4:01:06 AM3/22/18
to ravendb
What I'm trying to say here is that we probably need a specific feature, audit log, which will have such entries.
The problem is how do we keep it, and what trims it
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 22, 2018, 4:17:42 AM3/22/18
to RavenDB - 2nd generation document database
It would be very good to save them in another log file that changes name every day.
We would then import them on EventLogAnalyzer or Kibana, so for cleaning we can also make the software decide when to delete them.
For more options, visit <a href="https://groups.google.com/d/optout" rel="

Oren Eini (Ayende Rahien)

unread,
Mar 22, 2018, 9:58:16 AM3/22/18
to ravendb
Please see if you have additional needs there.

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Besozzi Luca

unread,
Mar 22, 2018, 10:13:04 AM3/22/18
to RavenDB - 2nd generation document database
Thanks a lot

Oren Eini (Ayende Rahien)

unread,
Mar 22, 2018, 10:26:15 AM3/22/18
to ravendb
Please add any other details you need to be there
--

Besozzi Luca

unread,
Mar 22, 2018, 10:41:25 AM3/22/18
to RavenDB - 2nd generation document database
it may also be useful to log the operations that the logged in user performs on the db.
As I told you before, it is important for the law to provide the most information in the event of a data breach.

But I would not want all these additional logs impact Raven's performance.

Oren Eini (Ayende Rahien)

unread,
Mar 23, 2018, 3:38:08 AM3/23/18
to ravendb
The problem is what you define as operations.
Each document modified? What about queries? What about patch queries?
The moment we add something to the audit log, this becomes _really bad_ if users can avoid it.
And there is the cost associated with it, too.
--

Besozzi Luca

unread,
Mar 23, 2018, 3:55:25 AM3/23/18
to RavenDB - 2nd generation document database
Honestly I would not trace the queries and every single change on the db, not even sql server does it.
Perhaps the only operations I would like to track are the delete and the drop.
however, for us it is already very useful to trace successful connections, including IP & certificate thumbprint,
name and time as we already talk. 

Oren Eini (Ayende Rahien)

unread,
Mar 23, 2018, 4:06:29 AM3/23/18
to ravendb
delete and drop? 
--

Besozzi Luca

unread,
Mar 23, 2018, 4:24:24 AM3/23/18
to RavenDB - 2nd generation document database
Yes, should be fine. 
I think have notice of delete, drop and login (failed/success) will be enough.
Thanks
delete and drop? 
What does  /certificates/whoami says?

<span

Oren Eini (Ayende Rahien)

unread,
Mar 23, 2018, 4:27:21 AM3/23/18
to ravendb
Login in easy.
Delete you mean document deletion?
Drop you mean db deletion?

--

Besozzi Luca

unread,
Mar 23, 2018, 4:34:04 AM3/23/18
to RavenDB - 2nd generation document database
Exactly.
I don't know if is also possible to do with the indexes.
delete and drop? 
What does  /certificates/whoami says?
<b

Oren Eini (Ayende Rahien)

unread,
Mar 23, 2018, 4:46:42 AM3/23/18
to ravendb
DB & Indexes are easy. I'm not sure why you want to do things with doc deletes.
How is setting the document to {} different from deleting the data? But one would be logged and one not

--

Besozzi Luca

unread,
Mar 23, 2018, 4:55:11 AM3/23/18
to RavenDB - 2nd generation document database
you're right, in the end the importance of having traced the delete of a document is not fundamental.
I would however track the drop of db and indexes
Exactly.
delete and drop? 
What does  /certificates/whoami says?
On Mon, Mar 19, 2018 at 11:32 AM, Besozzi Luca <<a re

Oren Eini (Ayende Rahien)

unread,
Mar 27, 2018, 8:02:29 AM3/27/18
to ravendb
This is not implemented Security.AuditLog.FolderPath

--

Besozzi Luca

unread,
Mar 27, 2018, 10:33:45 AM3/27/18
to RavenDB - 2nd generation document database
So the in the next patch of RavenDB4 we will have the log of login, drop db and indexes?

Oren Eini (Ayende Rahien)

unread,
Mar 27, 2018, 12:25:04 PM3/27/18
to ravendb
Yes, but note that it isn't in the log, you have to configure it explicitly, and it writes to a different location and have a different retention policy

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Tue, Mar 27, 2018 at 5:33 PM, Besozzi Luca <bes...@gmail.com> wrote:
So the in the next patch of RavenDB4 we will have the log of login, drop db and indexes?

Besozzi Luca

unread,
Mar 28, 2018, 4:21:31 AM3/28/18
to RavenDB - 2nd generation document database
Thanks a lot!

Besozzi Luca

unread,
Apr 6, 2018, 9:33:18 AM4/6/18
to RavenDB - 2nd generation document database
Hi Oren

I've installed the update and configure the log settings, it's exactly what we need.

Just a question, in this new RavenDB4 the only way for authentication is using certificate, why 
you remove Api keys? for us they were very useful.

Thanks

Oren Eini (Ayende Rahien)

unread,
Apr 8, 2018, 2:17:53 AM4/8/18
to ravendb
API Keys are limited in the following ways:
- Cannot be implemented natively in browsers, so you need a bunch of workarounds to deal with it.
- Same for curl.
- Same for any client we need to implement.
- They relied on our own provided secured solution. I don't want to do security on my own, I want to use well known and trusted solutions.



Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
Reply all
Reply to author
Forward
0 new messages