Conversation

Fahim Farook

For work, I'm working on a custom macOS installer at the moment …

"Why an installer when installing a macOS app is as simple as dragging and dropping into a folder”, you ask? Well, because this is for a macOS login/authorization plugin …

At this point, most people will probably go “Huh?” and I don’t blame you, because this is a dark corner of macOS coding that most probably don’t venture into 😛

A macOS login plugin allows you to customise the macOS login flow so that you can add your own layer of authorization/security or carry out some specific tasks that need to happen during the login process.

Unofrtunately, none of that is very well documented. In fact, I spent months scouring the Internet and going through documentation to get our implementation of a macOS login plugin working correctly.

In fact, somebody at work said that I was one of possibly 10 people in the world who understood this stuff. Honestly, I don’t believe that since I think that if I could figure it out, anybody else could too since the information is all out there 🙂

Whatever the case, our login plugin requires particular authorization rules to be set and what most people seem to do is to use a shell script to do this since that’s fairly widely documented. But in our case, while that’s the option we are using now, I want to actually do this via code because it simplifies a few logistical issues.

So here I am, exploring the macOS documentation again to see how you can do what I want to do in Swift and finding that this is not very well documented at all 😛

I do wish that the Apple documentation was excellent throughout instead of being very informative for the areas that everybody is interested in and then getting rather opaque, terse, or downright non-existent for the areas that people don’t venture into often. But I guess that’s how it works out — afterall, why bother spending the time on documenting something that not many people will use?

#Coding #Apple #macOS #Authorization #Documentation #Security #Login #Swift
1
1
3

@f I would craft a nice post on the apple develper forums. The other good place to ask around is slack.

1
0
0
@trode I’ve actually figured out what I needed to do, thanks 🙂 This was more of a reflection (after the fact) on how difficult it is to find info about certain areas of macOS development ….
2
0
0

@f Ah well done. that is a dark corner!

0
0
0

@f @trode His advice is still good advice, though

Many of the tools that exist in this space (Crypt2, NoMAD Login, etc) were built by Mac admins

Swapping out/adding authorization mechanisms isn't something 99.999+% of macOS developers would ever want to know how to do - but it's very relevant in edu/gov/enterprise

Many of the programming admins in that Slack are more familiar with these edges of the OS than most 😄

2
0
0

@f @trode That being said - would highly suggest investigating Platform SSO (especially with the v2 capabilities added in Sonoma) in this space, if anyone was going to be diving fresh into this territory

0
0
0
@mikeymikey Wasn’t my intention to imply that @trode's advice wasn't good, by any means. My apologies if it came across that way, Blake 🙂

I didn’t know of the #macadmin Slack before now but will probably lurk there now 🙂
1
0
1

@f @mikeymikey No worries Fahim! The slack is a good one with channels on specific topic. Excellent community for sure! @mikeymikey is always good for some practical advice as well!

1
0
1

@trode @f In this space, specifically, I'd defer to @mactroll, @macshome, and @tperfitt as friends most familiar on this very topic though 😄

But yes - check out the Slack. Even if nobody is actively talking about what you're looking for (though at 58k+ members - that's increasingly unlikely), there's a good chance you may hit gold in the search history.

(And we always love a challenge!)

1
0
0
@mikeymikey Just joined the Slack — took me a minute to figure out that I had to go to the site first and then get to the Slack instead of trying to create an account for the Slack directly 😛 @trode

The particular issue I was working on is solved now — it wasn’t that hard of an issue to begin with, just that most of the documentation I could find pointed to the “security” tool rather than how to do it in Swift 🙂

But the Slack looks like a great resource! And of course, as you suggested, search history is almost always a great place to find an answer since somebody probably has run into the same issue previously — generally the issue is finding the right place to search and it looks as if the Slack will be the right place for my particular needs …
0
0
1