Disclaimer: I am not a political scientist. But, well, I am a student of a School of Government anyway, so I'm the one having the most authority among four of us speaking on this issue...
Following a controversy around a statement from the head of BIN (Badan Intelijen Negara = State Intelligence Agency). He said, to prevent religious terrorism and radicalism, they won't hesitate on planting their agents to infiltrate into suspicious Muslim groups or boarding schools. The statement created a controversy among moderate and hardliner Muslims leaders.
I personally don't see any problem with this plan. After all, it is a spy's job to infiltrate. It would be wrong if BIN is granted the authority to arrest. It would also be wrong if the police arrest someone just purely based on intelligence reports, without committing a crime. But planting a secret agent is part of a greater means to provide security. And it part of the reason why we need a government.
But one thing is obviously wrong. An agency like BIN is not supposed to be blabbermouth; it should keep their job secret. That's why they are called 'secret agents.' Telling the public what they are going to do is stupid.
But again, there's always something funny with Indonesian intel. They like to show-off and make their presence obvious. Remember the old activist jokes about intels: when they 'infiltrate,' they do it with their crew-cut hair, military boots or ... handy talkies! Or they would even declare themselves, "Don't mess with me... I'm and intel..!!!"
This adds an irony about our government. Their role is to reduce information gaps. But not in this way, off course!