The TUC in Brighton this week has pledged to resist the national ID card scheme "with all means at its disposal", including industrial and legal action.
The motion, tabled by pilots' union BALPA, was carried overwhelmingly by TUC delegates.
The government plans to introduce national ID cards for airside workers from next year, but BALPA said that carrying a national ID should not be obligatory for employees.
The TUC motion puts unions on a collision course with the government over civil liberties.
Guy Herbert, general secretary of the NO2ID pressure group, told a TUC fringe meeting that the Identity Cards Act 2006 made those taking part in industrial action that might interfere with the operation of the ID database liable to up to 10 years' imprisonment.
Herbert said, "Unions certainly did not approve that, even if 304 Labour MPs saw fit to vote for it. The Tolpuddle Martyrs got shorter sentences, and that was a public outrage in an era when you could be hanged for stealing goods worth a shilling."
Nationals from outside the EU will be issued with ID cards from this November.