If government comes to you and says you must send data here and there or log this and that and you must not tell anybody about it, then you have to comply and you can't do much about it even with your best intentions. I don't think it should be like this but as far as I understand it is the current state of affairs.
Even if they shouldn't be able to force you to do some things the best you can do is take them to court, still completely outside public eye, and they can provide some plausible reasons regarding say national security which are likely pretty much impossible to verify.