Code cylinder

"The self-styled commander looks every bit an officer, and he used code cylinders to requisition the fuel cells."

- Moff Wilhuff Tarkin

Code cylinders, also referred to as coded rank cylinders and coded key cylinders, were security devices in the shape of short cylinders that were used by the Galactic Empire and, decades later, by the First Order. They contained coded information about their bearers and granted them access to secure areas.

Galactic Empire
The Imperial code cylinders had at least two functions: they contained coded information about the bearer, and granted them varying levels of access to secure areas and terminals. New code cylinders were issued with every upgrading of the clearance level, or new assignment. Because the replacement forms and procedures were notoriously complex, bearers of code cylinders were careful not to lose them.

The Galactic Empire used at least four physically distinct forms of code cylinder. The first kind, worn by such officers as Grand Moff Wilhuff Tarkin, Admiral Kendal Ozzel, and General Maximillian Veers, had a blue bulbous surface at its tip and a small pocket clip. The second kind, used by ISB Agent Kallus, was identical in structure but instead featured a red tip. The third type, which General Cassio Tagge and Chief Moradmin Bast carried, was, again, identical in structure, the only difference being that it lacked a colored tip. The fourth kind, worn by Admiral Conan Antonio Motti, was somewhat thicker, lacked a pocket clip, and was topped by a spiral drill bulb.

First Order
In imitation of the Galactic Empire, the First Order made use of code cylinders, then referred to as "rank cylinders" or "access cylinders." As was also the case in the Empire, the cylinders governed access to command systems and certain areas of First Order vessels and installations. The officers wore their cylinders not in pockets, but in loops fastened on either sides of the breastbone. The First order lieutenants Dopheld Mitaka and Rodinon both carried access cylinders, but the non-commissioned officers did not, and neither did the higher ranking officers like Colonels Datoo and Kaplan or even General Armitage Hux.