Beyond commonsense and physical access controls, is the system password the oldest still in active use security feature? By physical access, I mean for example leaving the system within a secure space.
In ant colonies, specialized ants act as guards and prevent other ants from entering some areas unless they "present" the appropriate, colony-specific pheromone. This is the password model, and ants have been doing that since (at least) mid-Cretaceous, 110 million years ago. So I daresay that the "password" is an ancient security system.
In the realm of human endeavors and technology, cars have featured keys (as security features, i.e. controlling whether the car can be operated at all) since the 1920s.
If you were to consider electronic or electro-mechanical systems, I doubt it would be the password. Instead it would be ciphers, which were in military use.
If you have to go farther back in history and consider non-electronic systems, there is of course, the concept of the security seal, the first being the bulla, whose modern equivalent is the digital certificate. And there is bookkeeping which might have come in around the same time, which ostensibly did not exist without the bulla.
You'll find all of this discussed in Security Engineering, by Ross Anderson. The book, however, carries far more useful knowledge than trivia.
"Security" is traditionally defined to include the CIA triad: confidentiality, integrity and availability.
Long before computer users had to worry about confidentiality, beyond locking the room that held the computer, they had to make a mechanism that provided integrity and availability - the bloody thing had to work.
Getting an astrolabe, Antikythera mechanism (thanks for the reminder, @blunders), adding machine or difference engine to actually function reliably, or relays and vacuum tubes to last in the face of bugs, involved a lot of security engineering in that sense.
In terms of a specific "security feature" still in use:
- for data storage and transmission integrity, a "parity track" was present on the first magnetic tape data storage in 1951.
Perhaps some would want to describe the ability for computers to modify their own instructions (Von Neumann architecture) as the oldest "anti-security feature"? It was theorized in 1936 (the Turing machine), and designed in 1944 (EDVAC).
If you buy that, then the use of the Harvard architecture for separation of data and instructions, named after the 1944 Harvard Mark 1, but in use since the beginning of computers, would also be an early "security feature".
Update: taking a cue from @thomas, we can look back before the fabulous ant world to lots of much older mechanisms:
- semi-permeable cell membranes that actively manage what can come in and out
- immune systems in plants and animals, including antibodies which recognize and neutralize attackers (Bacteria provide example of one of nature's first immune systems, research shows)
- the genetic code for DNA, with redundancy built in, and replication machinery with self-repair built in.
I'd agree with @Vineet and say it would be ciphers. Specifically I'd be inclined to point out the Caeser Cipher, so called as it was used by the Roman military to protect messages. May not be the oldest cipher in use but it's the oldest one I'm aware of.