Tracing Thinktecture.IdentityModel.Hawk through Event Tracing for Windows (ETW)

Thinktecture.IdentityModel.Hawk version 2.1.0 now uses ETW infrastructure to raise events. One of the challenges with Hawk authentication is that it uses different parts of the message to compute MAC and when authentication fails, it is generally difficult to figure out what went wrong. Both client and server must use the exact same values in the MAC computation process, for the MAC computed by the server to match the MAC computed by the client. If there is even a slight mismatch such as an additional space or difference in capitalization, etc authentication fails and 401 is the end result. A secure system does not give out much in terms of what went wrong but then, for a developer, it is a real problem to figure out what is wrong. To help solve this problem, tt.idm Hawk now raises ETW events.
Continue reading


Event Tracing for Windows (ETW), ETL file and Tracerpt

Event Tracing for Windows (ETW) is cool. There is nothing like it, for instrumenting your app. ETW is interesting because at this time, it is not easy to find your way around. There is an excellent Pluralsight course by Kathleen Dollard and several blog posts and videos by Vance Morrison. .NET 4.5 has made ETW so easy. All you need to do is to create a custom event source by inheriting from the System.Diagnostics.Tracing.EventSource class. You can use the PerfView tool or logman command to start and stop a session and create an ETL file. ETL file is binary and contains pretty much all the info one would ever need but then getting the info out is not an easy task.
Continue reading