我们安装了一个旋转门以确保安全。
We installed a single turnstile to feel secure

原始链接: https://idiallo.com/blog/installed-single-turnstile-for-security-theater

公司收购后,一次全面的安全升级优先考虑了可见措施,而非基础修复。 门禁卡系统被广泛实施——停车场、门、电梯——立即造成混乱。 出现长队,员工经常被锁在门外,依赖同事绕过系统。 同时,昂贵的旋转闸机被安装在建筑物大堂,预计会造成瓶颈。 旋转闸机被证明是灾难性的,导致从停车场到办公桌的通勤时间长达一小时。 甚至优步送客也陷入僵局。 混乱持续三天后,旋转闸机和电梯门禁卡读卡器被禁用。 讽刺的是,一个更重要的安全漏洞存在:Jira 凭据以不安全的方式存储在 cookie 中。 尽管多次请求和充分的理由,修复此漏洞需要花费一个月的时间,而旋转闸机这种可见的“安全秀”却立即实施并收到了庆祝邮件。 这一经历凸显了一个关键的区别:真正的安全是不可见的,内置于系统中,而可见的措施往往优先考虑外观而非真正的保护。

一个黑客新闻的讨论围绕着一家公司出于安全目的安装转门。发帖者质疑转门是否只是“安全作秀”,但评论者提供了细致的观点。 虽然承认可能存在表演性质的安全措施,但一些用户认为转门可以通过建立访问的基本信任水平、简化风险评估以及减少对小安全事件(如丢失的钥匙卡)的过度反应来真正提高安全性。其他人指出转门带来的实际好处,例如更高效的电梯使用。 一个关键点是,人们对可见的安全措施(如转门)和不太明显但可能更关键的漏洞的关注程度不同——在这种情况下,存储在cookie中的Jira凭据,尽管风险更大,但解决起来却更加困难。这场讨论凸显了安全实施的复杂性以及优先有效措施的挑战。
相关文章

原文

After the acquisition by a much larger company, security became a top priority. Our company occupied three tall buildings, each at least 13 stories high. Key card readers were installed next to every entrance, every elevator car, and even at the parking lot entrance, which itself was eight stories tall.

The parking lot system was activated first. If you wanted to park your car, you needed to scan your pass. It didn't take long for lines to start forming, but they were still manageable.

Then the doors were activated. I would often forget my key card on my desk and get stuck in the stairwell. After lunch, I'd climb the stairs all the way to the 11th floor, only to find myself locked out at the door. Fortunately, the buildings were full of people, and there was always someone to open the door for me. I'd slip in suspiciously while they contemplated the email that clearly said not to let anyone in with your own card.

While we were battling to get used to the key cards, the company was installing turnstiles on the ground floor of every building. They looked futuristic, but I was already anticipating a problem the designers hadn't considered. Each building had 13 floors. Each floor was full of employees. Hundreds of employees per building would each have to scan their card to get in.

I'm a software engineer. I understand that security isn't an optional feature you build on top of your application. Instead, you need to implement safeguards at the foundation. In fact, one of the most important applications I was working on was a tool to manage how different teams retrieved their tasks from Jira. If you've read this blog before, you know I always complain about Jira.

Anyway, the original designer of this application must have been pressed for time. Each action in the app required a call to the Jira endpoint, which needed authentication. He never saved the auth token returned by the API. Instead, each call had to re-authenticate and then perform its task.

Did he ask the user to reenter the password every single time? No, he was smarter than that. Did he save the credentials in the database in plain text? He might have been an intern, but he wasn't crazy. No! Instead, he saved the username and password in the cookies. But for good measures, it was base64 encoded.

Eventually, we received the email. All turnstiles were going to be activated. The following Monday, they would run in mock mode, where the turnstiles would remain open, but we'd have to scan and wait for the beep and green light before entering.

I arrived at 8:30am. I met my colleagues and hundreds of other employees in the lobby. When the first person scanned their card, the machine beeped and turned green. We all clapped in celebration. We took turns making our way to the machine. Beep, turn green, next. But it grumbled for some employees and turned red. That was fine though, it was mock day. We all went about our day.

The next day, when I came to work, I remained in my car, stuck in line for the parking lot for at least 10 minutes. Looking outside, I saw long lines of people circling each building.

I managed to park my car and discovered that the line of people extended all the way down to the parking level. I waited in line for at least 30 minutes just to make it to the lobby. I texted my manager that I'd be late for the daily standup because I was stuck in line. She didn't text back. Instead, she waved at me from the front of the line. Scanning was already slow, you had to wait to be approved. But once you passed the turnstile, there was another line for the elevators. The elevator key card readers were also active.

Imagine a couple dozen people all trying to squeeze into crowded elevators, each going to a different floor, and each trying to scan their key card to access their floor because someone who wasn't authorized for that floor couldn't scan it for them. Some elevator doors opened with a few people already inside because they couldn't scan their cards in the crowd, so they'd gone back down for a second attempt. In other words, it was complete chaos.

It took more than an hour to go from the parking lot to my desk on the 11th floor.

The next day, I decided to save time and take an Uber to work. Those were the days when an Uber ride cost only $3. I thought I was being smart, but another hundred people or so had the same idea. We had a pile of Uber rides lining up outside, each trying to drop off their riders and blocking the way to the parking lot, causing yet another traffic jam. Inside the building, it was still the same chaos. I only saved a few minutes.

On the third day, they shut down the turnstiles. They clearly weren't working. They also disabled the key card readers in the elevators. It was a relief.

Security was supposedly a priority, yet nobody ever talked about the Jira credentials saved in cookies. I received significant pushback when I requested we install a Redis service to store the generated auth tokens. I had to write entire documents to justify using it and request enterprise support from a vendor. After a month, the security issue was fixed to no fanfare.

We did, however, receive an email celebrating the installation of three new turnstiles in the lobby. They never turned the elevator key card readers back on. They remained dormant, a reminder of the mess we'd gone through.


The turnstiles were visible. They were expensive. They disrupted everyone's day and made headlines in company-wide emails. Management could point to them and say that we're taking security seriously. Meanwhile, thousands of employees had their Jira credentials stored in cookies. A vulnerability that could expose our entire project management system. But that fix required documentation, vendor approval, a month of convincing people it mattered. A whole lot of begging.

Security theater checks a box. It makes people feel like something is being done. Real security is invisible. It's reviewing code, implementing proper authentication, storing tokens correctly. It doesn't come with a ribbon-cutting ceremony or a celebratory email. It's just good engineering that nobody notices when it's done right. But security theater is impossible to miss.


联系我们 contact @ memedata.com