Senior Labor frontbencher Anthony Albanese raised strong concerns within shadow cabinet about the government’s mandatory data retention scheme, Guardian Australia has learned.

The Labor opposition last week reached a deal with the Coalition government to pass the legislation after an amendment forcing police and security agencies to obtain a warrant if they wished to access journalists’ metadata to track down a confidential source.

The opposition leader, Bill Shorten, said last week he was “conscious of getting the balance right” but the Greens have been highly critical of Labor’s decision to endorse laws requiring telcos and internet service providers to store millions of customers’ metadata for two years.

Guardian Australia understands Albanese told his colleagues at shadow cabinet meetings he held strong concerns about the legislation, including its impacts on journalists and unintended consequences.

Albanese, who is a senior Labor left figure, and others within the party remain unsatisfied with the adequacy of the compromise deal relating to journalists.

Under the proposed legislation, police and security agencies would have to seek a warrant before accessing journalists’ metadata, such as call logs or email recipients, if the purpose was to identify a source.

Asio would apply to the attorney general, whereas other agencies would apply to a judge, magistrate or member of the administrative appeals tribunal.

Journalists will not be notified so they will not be able to contest the attempt to access their metadata, but the decision maker will have to take into account submissions from public interest advocate appointed by the prime minister. Warrants will not be required to access metadata of suspected sources.

Albanese, Labor’s transport spokesman and the other contender for the leadership after the 2013 election, spoke out in October last year about a previous tranche of security legislation that passed the parliament with bipartisan support.

In a Sky News interview at the time, Albanese said Labor and the Coalition needed to apply greater scrutiny to proposals put forward by security agencies and there may be a need to rethink “draconian” new laws that would allow the jailing of journalists for five to 10 years for exposing an error by intelligence operatives.

Shorten has repeatedly emphasised his desire for bipartisanship efforts to counter terrorism, but said Labor sought to strike the right balance between liberty and security.

Numerous Labor backbenchers spoke up at a caucus meeting last week to air their concerns at the data retention legislation, including privacy implications, effectiveness, cost and impact on press freedom.

Shorten defended his party’s approach to the data retention bill. “Because of what Labor was able to do we’ve looked at the initial government legislation and made north of 30 significant changes which go to some of the concerns which people legitimately raise – greater oversight, greater resources for the ombudsman and we’ve drawn a line in the sand over press freedom,” he told the ABC last week.

The Labor senator Jacinta Collins told the senate on Tuesday the opposition’s efforts had achieved “much stronger protections for journalists and their sources, certainly much stronger than what [communications minister] Malcolm Turnbull originally proposed”.

Labor members of the parliamentary joint committee on intelligence and security had also secured strong safeguards, she said, arguing the government had done “an exceptionally poor job of explaining why these laws are necessary and how they will work”.

“The Labor party has found itself stuck between a rock and a hard place on this legislation: stuck between the failure of the government to take the people with it on the one hand and a hysterical campaign of misinformation by Senator [Scott] Ludlam and the Greens party on the other,” Collins said.

“Nobody in the Labor party is happy about once again being forced to rescue this government from its own incompetence.”

The Greens have been highlighting Labor’s role as part of a social media campaign against data retention. Ludlam said the phrase “national security” was “all it takes for the Australian Labor party to flop into defeated bipartisanship because they are terrified the Daily Telegraph will say mean things about them”.

Ludlam said the legislation provided for “the mass collection of private information of 23m people who are neither suspected nor accused of having committed a crime”.

“It entrenches the ability of dozens of government agencies to access these private records hundreds of thousands of times a year without a warrant and it normalises the fiction that this information is nothing more than billing records or the envelope that surrounds substantive communications,” he told the senate.

Independent senator Nick Xenophon was among crossbench senators who raised strong concerns about the bill as debate continued in the upper house on Tuesday evening.

Xenophon said he was disappointed with the Labor-Coalition compromise, raising fears that the warrant process to access journalists’ metadata would be “issued as a formality”.

Liberal Democratic senator David Leyonhjelm said everyone had something to hide and something to fear from mandatory data retention.

“It is one thing to require monitoring of certain individuals where there is reasonable cause; but the idea that the government needs to store everyone’s metadata without cause, including my 84-year-old mother’s, should not be countenanced,” Leyonhjelm said.

The independent senator Jacqui Lambie said the government had “used the threat of a terrorist attack from Islamic State to grossly invade the privacy of every Australian”.

The attorney general, George Brandis, said the bill would provide protections to journalists concerning access to metadata, when there were no such protections at present.

“The only change that this bill makes to the relationship between the state and the citizen is to introduce safeguards in relation to the access of law enforcement agencies to metadata which were not there before,” Brandis said.

“Far from expanding the power and the reach of the state, this bill very significantly reduces the power and reach of the state by reducing by three-quarters the number of bodies which can access metadata without a warrant.”