DEV Community

Cover image for Day 90: A Mask in the Way and a Policy Pointing at Nothing

Day 90: A Mask in the Way and a Policy Pointing at Nothing

Nnamdi Felix Ibe on November 22, 2026

Day 90 of DevOps, Day 40 of Azure. Both tasks today were about a permission that exists, reads back correctly, and grants nothing. On Linux, that ...
Collapse
 
star123 profile image
Sᴛᴀʀ⭐ •

Hi @ndcodes bro, I hope everything is going great with you.😀 Just a gentle reminder that you haven't joined Necoz yet.😀 We would really appreciate it if you could join us when you're free. Looking forward to seeing you there!❤️🥰

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe • • Edited

@star123 Thank you for the nudge, Star, and apologies for being slow off the mark. 😄

Yes, please, I'd love to join. Send the invitation whenever suits you, and I'll be right in.

Small, simple and useful, built together, sounds exactly like my sort of thing. Looking forward to seeing what everyone's working on. ❤️

Collapse
 
star123 profile image
Sᴛᴀʀ⭐ •

@nyaomaru bro Now it's your turn! :D

Thread Thread
 
nyaomaru profile image
nyaomaru •

It's my turn! 😹💚

Invitation sent, @ndcodes! 🐈✨

Really happy to have you joining us.
“Small. Simple. Useful. Built together.” is exactly the spirit. Looking forward to seeing what you build, share, or just casually jump into with us!

And thanks for the nudge, @star123! 😸⭐

Collapse
 
aheadkit profile image
AheadKit •

The mask detail is the one I'll actually remember, ls -l showing rw- in the group field while the owning group only has r--, and the only hint is that little + at the end. Same story on the Azure side, ARM happily accepting the app ID for a policy that then authorises nobody, and Forbidden pointing everywhere except the wrong GUID. Your token oid trick is worth stealing for any lab where Graph is closed, though I'd love a note on what to do when even the token route is locked down. Which of the two caught you longer, the mask or the GUID?

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe •

The GUID, by a long way. The mask I only spotted afterwards, reading getfacl next to ls -l and seeing the two disagree, so it cost me nothing at the time. The GUID was most of the task, because a policy that reads back correctly gives you nothing to debug.

On the token route, it's harder to close than it looks. oid isn't a separate privilege, it rides in the token that authorises every other call, so if you can reach ARM you already have it. What usually breaks is the decode .

The claims reference says claims are only present if there's a value to fill them, and for users you need the profile scope to get oid. A service principal made that moot here, but I wouldn't assume it for a user-delegated token.

And outside a lab, the real answer is not to discover it at all. Whatever created the principal had the object ID in its create output, so it belongs in the pipeline as a parameter.

Collapse
 
technogamerz profile image
𝐓𝐡𝐞 𝐋𝐚𝐳𝐲 𝐆𝐢𝐫𝐥 •

90 days is such a long time and it takes so much patience! I truly admire your dedication. Huge congratulations! 👏🏻🎉

Image deption

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe • • Edited

Thank you so much, Divya, that's very kind of you. 🙏

Honestly, the labs vary. Some I finish in minutes, others take a whole hour, and sometimes I fail the task and have to give it another go. The writing is the hard but exciting part. It takes one to three hours, and those hours are where I find out I didn't properly understand what I'd just done. But then I'll get to unlearn and learn new things.

Ten to go. Thank you for being here for so many of them.

Collapse
 
xulingfeng profile image
xulingfeng • • Edited

At nine-tenths now! Hahaha. Good thing I finished the 36 Stratagems first, or this series might have caught up with me! 😄

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe •

Ha, you were never in danger at all. You finished at 36, and I've still got ten to go, so you win on timing, and I only win on volume. 😄

The two series did keep leaning on each other, though. I've quoted Mark's line about hashes in my own write-ups more than once, which is a strange thing to be able to say about a coffee shop.

I love the Coffee idea, I am honoured to be a member alongside great minds.

Thank you @xulingfeng

Collapse
 
xulingfeng profile image
xulingfeng •

Hahaha, volume counts too! I guess we're both winners then. 🎉

But hearing that Mark's line about hashes has made its way into your own write-ups is something else. I never expected one of my fictional café regulars to start showing up in someone else's technical writing. That's a pretty nice surprise.

And hey, you're one of us now. No need to feel honoured. Just pull up a chair, bring your stories.😂

Really glad to have you at The Third Cup, Nnamdi. ☕

Collapse
 
technogamerz profile image
𝐓𝐡𝐞 𝐋𝐚𝐳𝐲 𝐆𝐢𝐫𝐥 •

Same! 😮

Collapse
 
sarvesh_3bcf0f427a27e1849 profile image
Sarvesh •

Really well explained!!

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe •

Thank you, Sarvesh. I appreciate that. 🙏

Collapse
 
xulingfeng profile image
xulingfeng •


🍻hahaha

Collapse
 
ndcodes profile image
Nnamdi Felix Ibe •

😀😀😀

Your café sitting directly above my ACL masks in the feed. Chinese philosophy over coffee, then a man complaining about GUIDs. The feed got the running order right. 😄 Five Elements is open in the next tab.

Collapse
 
xulingfeng profile image
xulingfeng •

Nice feed sequence! Enjoy the Five Elements read 😆

Collapse
 
fattakhov profile image
Mansur Fattakhov •

Re-running the encrypt/decrypt check after removing the temporary create permission is a particularly useful detail. It makes the verification describe the configuration actually left behind, which is easy to miss when the setup itself finally starts working.

Collapse
 
dafili profile image
Renhua Wei •

Two checks I would add, because both of these read back fine: for the ACL, prove it as the principal rather than reading the listing — sudo -u steve cat /path plus getfacl -p /path | grep -E '^(mask|group)' — since the mask gets recomputed every time setfacl touches a group entry, so a listing you took two commands ago can already be stale. For the Azure side, the id to assign is the service principal object id, not the app registration's: az ad sp show --id --query id -o tsv prints the one ARM will actually authorise, and the other one is accepted silently, which is exactly the failure you described.

Collapse
 
alexshev profile image
Alex Shev •

The durable takeaway from troubleshooting policy issues is to record the effective configuration, not only the intended one. A small before-and-after check that prints the resolved policy and identity can prevent the same invisible mismatch on the next deployment.

Collapse
 
star123 profile image
Sᴛᴀʀ⭐ •

🥰