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

Поделиться
HTML-код
  • Опубликовано: 20 дек 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

Комментарии • 69

  • @vincentverweij1053
    @vincentverweij1053 5 месяцев назад +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 5 месяцев назад +19

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

  • @MatinDevs
    @MatinDevs 5 месяцев назад +14

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

  • @Simnico99
    @Simnico99 5 месяцев назад +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 5 месяцев назад

    Great video Nick, thanks a million,

  • @Astral100
    @Astral100 2 месяца назад

    That was great video, thanks!

  • @nocgod
    @nocgod 5 месяцев назад +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.

  • @atomicazure
    @atomicazure 5 месяцев назад

    I'm happy you made this video.

  • @romanhrytskiv6280
    @romanhrytskiv6280 5 месяцев назад

    That is useful!

  • @AlexanderBelikov
    @AlexanderBelikov 5 месяцев назад +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 5 месяцев назад +3

      agreed, some fluent stuff like ef core would be nice

    • @cgeorgescu72
      @cgeorgescu72 5 месяцев назад

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

    • @rafalmzyk3679
      @rafalmzyk3679 5 месяцев назад +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.

  • @javiergarciadelanoceda7708
    @javiergarciadelanoceda7708 5 месяцев назад

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

  • @lordicemaniac
    @lordicemaniac 5 месяцев назад

    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

  • @Widzion
    @Widzion 5 месяцев назад

    awesome!

  • @Cristian-ek7xy
    @Cristian-ek7xy 5 месяцев назад

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

  • @alexandernava9275
    @alexandernava9275 5 месяцев назад +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 5 месяцев назад

      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.

  • @zirkzirk1512
    @zirkzirk1512 4 месяца назад

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

  • @mouradaissani8957
    @mouradaissani8957 5 месяцев назад

    very nice

  • @robl39
    @robl39 5 месяцев назад +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 5 месяцев назад +1

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

    • @rafalmzyk3679
      @rafalmzyk3679 5 месяцев назад

      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.

  • @paulmdevenney
    @paulmdevenney 5 месяцев назад

    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 5 месяцев назад +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 5 месяцев назад

      @@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 5 месяцев назад +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.

  • @noelfrancisco5778
    @noelfrancisco5778 3 месяца назад

    Is it possible to combine LoggerMessage with Serilog? thanks.

  • @soulsearchingsun83
    @soulsearchingsun83 5 месяцев назад +3

    What about using @ to deconstruct objects?

    • @nickchapsas
      @nickchapsas  5 месяцев назад +5

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

    • @soulsearchingsun83
      @soulsearchingsun83 5 месяцев назад

      ​@@nickchapsasMakes sense, thanks!

  • @Termit2009
    @Termit2009 4 месяца назад

    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

  • @stevehumby386
    @stevehumby386 3 месяца назад

    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  3 месяца назад +1

      Email me at contact@dometrain.com

  • @tHesTx-ytb
    @tHesTx-ytb 5 месяцев назад

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

    • @stephen6605
      @stephen6605 Месяц назад

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

  • @Alibek11221
    @Alibek11221 3 месяца назад

    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

  • @surendrapratap24
    @surendrapratap24 5 месяцев назад

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

  • @rasmuskarlsson5741
    @rasmuskarlsson5741 5 месяцев назад

    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 5 месяцев назад

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

  • @jendrikoltmanns1017
    @jendrikoltmanns1017 5 месяцев назад +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 5 месяцев назад +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 5 месяцев назад +4

    hellovrybody

  • @suleymanov1990
    @suleymanov1990 5 месяцев назад

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

  • @starbuck3980
    @starbuck3980 3 месяца назад

    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.

  • @Vietnamkid1993
    @Vietnamkid1993 5 месяцев назад

    If only it was supported in .NET 6 too

  • @dotnetdevni
    @dotnetdevni 5 месяцев назад

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

  • @moofymoo
    @moofymoo 5 месяцев назад

    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.

  • @utubekade
    @utubekade 5 месяцев назад

    not sure why, but getting drunk vibes form nick there

    • @nickchapsas
      @nickchapsas  5 месяцев назад +1

      I was sick with a cold when I recorded 🥲

  • @fotofoxes2255
    @fotofoxes2255 3 месяца назад

    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.

  • @Arni2_gaming
    @Arni2_gaming 5 месяцев назад +1

    69 as “random number”…. Naughty 😊

  • @alex_liaskos_
    @alex_liaskos_ 5 месяцев назад

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

  • @LogicException
    @LogicException 5 месяцев назад

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

  • @kiiOni
    @kiiOni 5 месяцев назад +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. 5 месяцев назад +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 5 месяцев назад +1

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

    • @nickchapsas
      @nickchapsas  5 месяцев назад +12

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

    • @kiiOni
      @kiiOni 5 месяцев назад +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 5 месяцев назад

      ​@@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 5 месяцев назад

    Challenge. Integrate an ASPNET Core project into Unity :D

  • @margosdesarian
    @margosdesarian 5 месяцев назад

    Second

  • @margosdesarian
    @margosdesarian 5 месяцев назад

    Third?

  • @deathrace-bx5ne
    @deathrace-bx5ne 5 месяцев назад

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

  • @stranger0152
    @stranger0152 5 месяцев назад

    First!!!!