Australia and Indonesia are ready to patch up their relationship with a code of conduct that should ensure last year's damaging spy scandal is not repeated.
Foreign ministers Julie Bishop and Marty Natalegawa are expected to sign the code in Nusa Dua, Bali, about noon local time today.
The document, reportedly called the "joint understanding of a code of conduct", asks both nations not to use their intelligence to harm the other's interests.
The simple document - apparently no more than one page - was demanded after revelations in November that Australian intelligence intercepted the phone calls of Indonesian President Susilo Bambang Yudhoyono, his wife, and political allies in 2009.
Outraged, Yudhoyono suspended co-operation with Australian military, security and people-smuggling efforts.
In February there were more leaks from former US contractor Edward Snowden, this time revealing Australia spied on Jakarta as it was in trade disputes with the US.
Then in May, Prime Minister Tony Abbott cancelled at the last minute a meeting with Dr Yudhoyono, apparently because his visit would have coincided with a mission to push asylum seekers back to Indonesia, a policy Jakarta stridently opposes.
However the outgoing president, likely considering his legacy, was conciliatory, and the pair managed a friendly meeting in June.