I can only give my opinion as I don't think there are any set rules. I would say that if you did the majority of the work after your supervisor's idea then you should get first author and they get second on a resulting paper. After all, you probably know the ins and outs better anyway and you did most if not all the work, BUT it was their idea and so the work would never have been done if they didn't think of it, so they get second author on the papers.
I think older sups who have nothing to prove would be more likely to say that the student can take credit, whereas a younger supervisor may still want to be making their own mark in the field and so will want to keep a lot of the credit for themselves. Obviously this is a massive generalisation.