President of the Commission said that the EU is moving to having a single defence force. To avoid UK forces being committed to such a military force under EU law, Brexit agreement should contain clear legal drafting that excludes any such possibility.
You may be interested in these active petitions
http://www.bbc.co.uk/news/world-europe-31796337 contains a report on the Presidents' policy by the BBC. The joint statement between the President and the Prime Minister of 16th October mentions security co-operation between the UK and the EU in the context of what happens after Brexit.