ubeac / ubeac-api

Source of uBeac .NET Core packages
3 stars 2 forks source link

Feature to disable Debug data while deserializing API response #153

Open pournasserian opened 1 year ago

pournasserian commented 1 year ago

Debug data may contain sensitive information.

For instance, in payment processing API's call, we want to add third party's request/response in debugger. It may contain username, API key, etc.

We need a solution to prevent this problem.

pournasserian commented 1 year ago

@ilhesam @mhmdtaherian prior to development, please provide your solutions here.

ilhesam commented 1 year ago

Hi @pournasserian, I think attributes is a good solution to handling it. In this solution we will have an attribute called "DebugIgnore" and use it for critical/sensitive properties:

[DebugIgnore] public string Username { get; set; }

Of course we also have something like this for HTTP Logging, So maybe it is better to have a general attribute for this purpose:

[Secret] public string Username { get; set; }