-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
send_default_pii should also remove query params #1301
send_default_pii should also remove query params #1301
Comments
Moved from raven to sentry-ruby and spent ages wondering why query params aren't being sent any more. I did wonder about send_default_pii but the docs just say:
No mention of query. I'm used to POST body being considered PII as the docs say but I'm not used to GET params being considered PII so could you please make that clear in the docs. I'm also not sure how to turn it back on now without turning everything on. I don't want cookies or POST bodies because those are very sensitive, but I do want GET params. The |
@sfcgeorge if you google "pii query string", you can find several cases that pii is leaked from the query string (example). so I think it's reasonable to consider it as pii sensitive. and because the SDK doesn't know if our users would put pii in their query string (they probably can't even be 100% sure either), we an only assume all query strings considering pii and not sending them. @rhcarvalho do you think it's reasonable to replace the I'll update the doc to mention it though, thanks for catching it. |
On first look, I'd avoid the fine-grained options for now if there's no strong justification for them -- configuration comes at a cost. For a custom data-scrubbing strategy we already offer Before Send or Event Processors (a generic way to update events before they go out of the SDK) in the client side, and controls on the server side (or on a local Relay proxy). All details in https://docs.sentry.io/platforms/ruby/data-management/sensitive-data/ Perhaps that's new to the folks in this discussion? Is that helpful information? |
I agree that PII can be leaked in this way and completely agree that there need to be paranoid defaults. But I don't think it should be the only option. This is the Ruby/Rails SDK and Rails devs have a good understanding of REST, CRUD and HTTP verbs and most wouldn't put anything sensitive or non-stateless in GETs. Our company code reviews every PR, we use automated security linters, have independent security audits, and a lawyer written privacy policy. Reset tokens are a valid exception, but they're short lived and expire once used so not a huge threat. Nonetheless since sentry-ruby already has various integrations and defaults it could strip out Devise and Clearance stuff automatically to be safe. I realise it's like whack-a-mole and you can't cover every library, but as it would be an opt-in choice so I think that's ok. The name The bigger issue I have with this setting is you effectively only offer 2 modes:
Sentry really is close to useless without parameters. How am I supposed to debug anything without IDs? I've got an undefined method on nil error so I'm left guessing whether the database record really is missing, or is our code just broken? I can't look up the record because I don't have the ID. And I can't even replicate because, well, I've got no IDs. I have seen the scrubbing and filtering docs. The first example in both is filtering out a ZeroDivisionError which is something nobody would ever ask how to do. The params Unless I'm missing something (I hope I am) the options you're giving are:
Short term please at least provide a code example of how to write a sensibly strict
And then there's the risk that if the SDK's API changes, or the way Rails handles things changes, the custom We use Sentry as a hosted solution because historically we've been blown away by your top notch UX, design, and customer support. I hope you can find a better long term solution that gets Sentry back to that standard. |
Hey @sfcgeorge, we really appreciate your feedback on the topic. Here's the short version of my response:
And here's a more detailed response:
Scrubbing data for libraries like Devise in the SDK isn't a maintainable way to deal with these issues. But if someone is willing to make gems like There's a community-built data scrubbing extenion: https://github.com/mrexox/sentry-sanitizer that may be an example for this.
I don't get the point. What we should call it otherwise? Of course it'll have a generic name with more information in the document. (But thanks again for catching the missing info).
You can substitude it with any exception class you want to filter out. It's never to be a thing that you can paste into your code and just work. How are we suppose to know about the use case you have?
I'll add more information about the event and hint parameters.
I'll update it, thanks.
The improvement I'll do here is adding rubydoc for the top-level APIs and the interfaces of essential classes like
There's a
Given it's still a new feature and only a few languages have it, we don't have an official approach on scrubbing locals atm. So if there's any concern, I'd recommend turning it off for now. But we'll be happy to discuss an approach (e.g. a
It's impossible for us to know either as the breadcrumb loggers only listen to a certain protocol and record whatever is passed. For example, But there's a
Data scrubbing, unlike other SDK features, highly depends on individual application's needs. What we can do is to provide high-level interfaces like I'm sorry for the confusion and time spent on debugging because of the lack of documentation. And thank you for spending time to provide so much feedback. I hope we can eventually come up solutions to:
|
@sfcgeorge here's a start for our document improvements: #1635 |
No description provided.
The text was updated successfully, but these errors were encountered: