I sometimes have to support freelancers working in some of our Wordpress websites. Their first instinct when something is wrong on their end is asking me to run a chmod or chown command they found on Google on the whole directory. Not that it matters – we're using Docker.
Security seems to be secondary when the priority is to just deliver.
Security is always an afterthought to those who don't actually understand it.
That’s different from saying “security should be an afterthought”. Security is something you should consider consciously and prioritize against your other goals.
Putting security first is kind of weird if you think about it. Imagine building a house and prioritizing the locks.
This reminds me of how React has a dangerouslySetInnerHTML[1] API - sometimes it's the hammer you need, but the name should (hopefully?) cause pause.
[1]: https://reactjs.org/docs/dom-elements.html#dangerouslysetinn...
It'll still blow your head off.
Don't be overly discouraged :-)
I have a reliable (if a bit ugly) implementation in under 3kb of sparse PHP OOP code. Yes it took a few hours to iron out the last kinks, and one extra refactor to free up a mistakenly bound variable. It might have helped that it was the first version I implemented, thus no need to match impedance of older interface.
On the plus side, the signing is designed as self-contained, and neither implementation nor API calls spill to too many parts of request handling.
>you have to read the doc a dozen times before you can successfully implement it
Very much so - it does require a small 'eureka' moment. It's hard to put your finger on what exactly makes it hard to get right the first time around. At the very least it is written from a somewhat peculiar viewpoint.
Fortunately the primitives used are common enough to be available in typical standard libraries.
Put another way, if you look at your service's API and it's complicated, you probably don't have the abstraction right.