The New Data Protection Features of .NET 8 (GDPR)

Sdílet
Vložit
  • čas přidán 20. 12. 2023
  • Use code CLEAN20 and get 20% off the brand new "Deep Dive in Clean Architecture" course on Dometrain: dometrain.com/course/deep-div...
    Get the source code: mailchi.mp/dometrain/rk3-to7k6i8
    Become a Patreon and get special perks: / nickchapsas
    Hello everybody, I'm Nick, and in this video, I will introduce you to the new data compliance packages added in .NET 8. These packages include data redaction functionality that data regulators require in applications, usually due to GDPR.
    Workshops: bit.ly/nickworkshops
    Don't forget to comment, like and subscribe :)
    Social Media:
    Follow me on GitHub: github.com/Elfocrash
    Follow me on Twitter: / nickchapsas
    Connect on LinkedIn: / nick-chapsas
    Keep coding merch: keepcoding.shop
    #csharp #dotnet

Komentáře • 70

  • @vincentverweij1053
    @vincentverweij1053 Před 5 měsíci +43

    Happy that you covered the StarRedactor as well. Simply removing the data looked a bit odd, as if the user did not provide anything. So, having something like that StarRedactor at least shows that some input was given. Great video, thanks for it!

  • @antonmartyniuk
    @antonmartyniuk Před 5 měsíci +19

    We definetely need some benchmarks here to see the performance comparing to non redacted logging and comparison to Serilog as well

  • @Simnico99
    @Simnico99 Před 5 měsíci +11

    As someone who use Serilog heavily. I find it very nice to see that the built in logger is starting to become more and more and alternative as it as more and more features and it is very nice that they use span everywhere and make it efficient as logging can really slow down an application espicially if you have alot of logs.

  • @akeemaweda1716
    @akeemaweda1716 Před 5 měsíci

    Great video Nick, thanks a million,

  • @Astral100
    @Astral100 Před měsícem

    That was great video, thanks!

  • @nocgod
    @nocgod Před 5 měsíci +4

    I'd love to see some benchmarks for msft logging + redaction vs. serilog direct interface with redactor and serilog through microsoft logging interface including redactor.

  • @MatinDevs
    @MatinDevs Před 5 měsíci +14

    "This random number" in 10:42 is the biggest lie you've ever said in your life

  • @atomicazure
    @atomicazure Před 5 měsíci

    I'm happy you made this video.

  • @romanhrytskiv6280
    @romanhrytskiv6280 Před 5 měsíci

    That is useful!

  • @Cristian-ek7xy
    @Cristian-ek7xy Před 5 měsíci

    What can we do if we are stuck in .net 6? I would love to have that expand object feature in .net 6

  • @Widzion
    @Widzion Před 5 měsíci

    awesome!

  • @mouradaissani8957
    @mouradaissani8957 Před 5 měsíci

    very nice

  • @javiergarciadelanoceda7708
    @javiergarciadelanoceda7708 Před 5 měsíci

    Really nice! We implemented a solution that was heavy reflection based. Could we just plug this with system.Text.Json serializer?

  • @lordicemaniac
    @lordicemaniac Před 4 měsíci

    if you use nlog and add @ before parameter in logging message (customer created {@customer}), it will get deconstructed even if its class, not sure if this works in other loggers

  • @alexandernava9275
    @alexandernava9275 Před 5 měsíci +1

    With the new code injection/generating, can we now extract the logging logic out of the classes, and specify where it should be added from outside the classes?

    • @alexandernava9275
      @alexandernava9275 Před 5 měsíci

      I think you did a video around this, and single responsability. Where there is a library that will, from what I remember, intercept the method call and log before calling/after calling it.

  • @AlexanderBelikov
    @AlexanderBelikov Před 5 měsíci +11

    Biggest challenge I see is adding attributes on models. It's convenient but now models have bits required for logging. I wish there was an easy way to set it up aside leaving models clean.

    • @michaelrall8142
      @michaelrall8142 Před 5 měsíci +3

      agreed, some fluent stuff like ef core would be nice

    • @cgeorgescu72
      @cgeorgescu72 Před 5 měsíci

      @@michaelrall8142 Logger.LogInformation("Customer created").WithoutSensitiveInfo().LeaveEmailVisible().ButNotTheUsername().OrMaybeTheUsernameButCertainlyNotThePassword().Please()

    • @rafalmzyk3679
      @rafalmzyk3679 Před 4 měsíci +3

      You can annotate the model directly in the generated logging method parameter, then your object remains clean. At the other point of view, we decided to have data directly annotated, since the sensitivness is attached to data itself. If you add one more flow, and forget about which parts of your data was sensitive you may leak it.
      A lot of tradeoffs we made in the design were towards safety/not leaking data/performance.

  • @paulmdevenney
    @paulmdevenney Před 5 měsíci

    Genuine question. Is there still a need for a tool like serilog now? Every additional package adds complexity to the solution, and it would be nice if the "OOB" tools did the job.

    • @DemoBytom
      @DemoBytom Před 5 měsíci +9

      Probably still is, for it's sinks and integration with 3rd party services. But I would not use serilog directly, but through Microsoft's ILogger abstraction.

    • @paulmdevenney
      @paulmdevenney Před 5 měsíci

      @@DemoBytomAye - I always use the MS ILogger . I wonder now though, when my main target is Azure Insights, whether its time to stop hooking up Serilog.

    • @modernkennnern
      @modernkennnern Před 5 měsíci +1

      Using Serilog and OTel together is currently very awkward, so a new project I'm on I've currently decided to not use Serilog.

  • @zirkzirk1512
    @zirkzirk1512 Před 3 měsíci

    Good video! My social security number is leaked every quarter! Hopefully the IT world learns a thing or two.

  • @Termit2009
    @Termit2009 Před 3 měsíci

    Thank you for the video! But this doesn't make an application automatically GDPR compliant. It is just masking data, but the real thing is not to process personal data if they are not needed and store them in separate protected store

  • @noelfrancisco5778
    @noelfrancisco5778 Před 2 měsíci

    Is it possible to combine LoggerMessage with Serilog? thanks.

  • @robl39
    @robl39 Před 5 měsíci +7

    At first glance the Redactor api seems odd to me. Why does the Redact method return a length and what is the purpose of the GetRedactedLength method? Why isn’t there just the one Redact method?

    • @metaltyphoon
      @metaltyphoon Před 5 měsíci +1

      Possibly to create a buffer on the stack before the modification happens, so it will be faster and use less memory.

    • @rafalmzyk3679
      @rafalmzyk3679 Před 4 měsíci

      The reason for that is to allow redactor caller to provide buffer of specific size and make redactor implementation allocation free. GetRedactedLength should be called to obtain required size buffer for given redactor ( it depends on the hashing algorithm ). Then int is returned from redact method, so that caller know how mamy chars were really written.

  • @stevehumby386
    @stevehumby386 Před 3 měsíci

    Hi Nick. I purchased the Modular Monoliths Geting Started and Deep Dive courses separately but didn't realise there came as a bundle. Any chance you could re-embuse the difference off my next course please? Ta

    • @nickchapsas
      @nickchapsas  Před 3 měsíci +1

      Email me at contact@dometrain.com

  • @soulsearchingsun83
    @soulsearchingsun83 Před 5 měsíci +3

    What about using @ to deconstruct objects?

    • @nickchapsas
      @nickchapsas  Před 5 měsíci +5

      Pretty sure this is a serilog feature that the built in provider doesn’t support by default

    • @soulsearchingsun83
      @soulsearchingsun83 Před 5 měsíci

      ​@@nickchapsasMakes sense, thanks!

  • @tHesTx-ytb
    @tHesTx-ytb Před 5 měsíci

    Can this be used for saving to database? Is there a way of return full data saved like this in db?

    • @stephen6605
      @stephen6605 Před měsícem

      You can use encrypted columns so it will be encrypted on the db level. If I understood you correct

  • @Alibek11221
    @Alibek11221 Před 3 měsíci

    Hi! It would be fantastic if you would give us a repo with your .editorconfig file or some other code style sniffer config using your prefered choices

  • @Kaiservonchina
    @Kaiservonchina Před 5 měsíci +5

    "random number" - 69 😂

  • @surendrapratap24
    @surendrapratap24 Před 5 měsíci

    Please create video on .NET 8 with JWT using refresh Token

  • @rasmuskarlsson5741
    @rasmuskarlsson5741 Před 5 měsíci

    I have a hard time understanding why you would ever log anything more than the unique identifier for the object. Anyone can fill me in with a usercase?

    • @rafalmzyk3679
      @rafalmzyk3679 Před 4 měsíci

      ID can be understood as sensitive data, since in case of data breach it allows to correlate userId with its data.

  • @jendrikoltmanns1017
    @jendrikoltmanns1017 Před 5 měsíci +1

    Thanks for the video : ) Unfortunately this feature seems to me overly complicated and breaking cohesion. What about overriding toString() method and returning Json Format without the "critical" properties? For the encryption we can have two presentation of a domain object: DecryptedCustomer and EncryptedCustomer. DecryptedCustomer will have the custom toString() method and will be converted to EncryptedCustomer by domain service.

    • @sacalbal
      @sacalbal Před 5 měsíci +1

      This is what I called overcomplicated. In the end in the video, after initial setup, all you have to do is add attributes to specific fields. It remains readable.

  • @tedchirvasiu
    @tedchirvasiu Před 5 měsíci +4

    hellovrybody

  • @Vietnamkid1993
    @Vietnamkid1993 Před 5 měsíci

    If only it was supported in .NET 6 too

  • @dotnetdevni
    @dotnetdevni Před 5 měsíci

    its sad one of dotnets most prominent voices not even using visual studio

  • @moofymoo
    @moofymoo Před 5 měsíci

    frack thgat GDPR sideways around telegraph line pole. GDPR is not about protecting your data, it's about allowing only big tech to collect and sell customer data.

  • @suleymanov1990
    @suleymanov1990 Před 5 měsíci

    What about built in PrintMembers() method in records? It should work fine as well

  • @fotofoxes2255
    @fotofoxes2255 Před 3 měsíci

    Distributed transactions were invented many years ago just to solve this problem.
    This crap basically making the worst thing possible: it creates another queue out of a database table, and makes it pump messages to the next queue.

  • @utubekade
    @utubekade Před 5 měsíci

    not sure why, but getting drunk vibes form nick there

    • @nickchapsas
      @nickchapsas  Před 5 měsíci +1

      I was sick with a cold when I recorded 🥲

  • @starbuck3980
    @starbuck3980 Před 3 měsíci

    Dont understand the video, and what is the problem with the data compliance, dont understand why need to add * to the passwords besides when an user logins, that already happens by default using asp net core identity.

  • @Arni2_gaming
    @Arni2_gaming Před 4 měsíci +1

    69 as “random number”…. Naughty 😊

  • @alex_liaskos_
    @alex_liaskos_ Před 5 měsíci

    Where are you from???
    I gotta admit i hear a greek accent there...

  • @LogicException
    @LogicException Před 5 měsíci

    10:44 ... sure... 69... random number ;)

  • @kiiOni
    @kiiOni Před 5 měsíci +3

    I would love to see a hint in the title what the video covers in the .NET world. I‘m mostly doing UI with WPF and am a bit disappointed when I see web related code after a few seconds in.

    • @volan4ik.
      @volan4ik. Před 5 měsíci +1

      You represent minority of .NET developers that use new .NET (Core), so I guess it's okay to omit the details. Most desktop projects are still on .NET Framework

    • @mariocamspam72
      @mariocamspam72 Před 5 měsíci +1

      ​@volan4ik. Indeed, sad reality. Winforms + egyptian pyramid-era framework version still are prevalent

    • @nickchapsas
      @nickchapsas  Před 5 měsíci +12

      Any .NET app can use the ILogger interface so it’s very much applicable to every type of app including WPF

    • @kiiOni
      @kiiOni Před 5 měsíci +1

      True. See, I didn‘t even saw it‘s about ILogger, because I saw web related stuff in the first place and moved on. So just a little suggestion on how you could improve for choosing a title, from my side. Putting .NET for general, ASP/Web or UI/WPF/WinForms at the end of the title.

    • @modernkennnern
      @modernkennnern Před 5 měsíci

      ​@@kiiOnihe more or less always uses AspNetCore to illustrate something as it's the easiest thing to test, with postman etc.., and it's what most dotnet developers are using dotnet for (... I believe)

  • @eyu6652
    @eyu6652 Před 5 měsíci

    Challenge. Integrate an ASPNET Core project into Unity :D

  • @margosdesarian
    @margosdesarian Před 5 měsíci

    Second

  • @margosdesarian
    @margosdesarian Před 5 měsíci

    Third?

  • @deathrace-bx5ne
    @deathrace-bx5ne Před 5 měsíci

    Too many ads.. in and outside of video. makes me want to leave the vdo asap

  • @stranger0152
    @stranger0152 Před 5 měsíci

    First!!!!