New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jamf JSON Schema #106
Comments
I am working on a Jamf JSON Schema, will do a PR when I am finished (will be a couple of days) |
Ok, hit a roadblock: |
Oh that's an interesting problem to have. JSON doesn't support date fields, so if you look at the json it's a string. The underlying Swift code converts it to a date. However the MDM config is a date since plists do support dates. That reminds me. I should document this in the wiki. |
Glad to see someone working on a Jamf manifest for this! The project Jamf has incorporated to add this functionality to Jamf Pro is this one, I believe. https://github.com/json-editor/json-editor And that endeavors to follow the JSON Schema spec as much as possible. As @erikng mentioned, JSON itself doesn't support a date/time datatype. The general consensus is to store those values as strings. |
Will try it out and report back! |
Strings do not work as currently coded. I played around with this and came up with: 0781b54 however I will be very honest here in that I'm torn. Nudge supports JSON format to manage it and it is already being coerced into a Date format, but this is a built-in feature of Swift
The format we should expect for a plist(mobileconfig) should be a If more jamf users want support for this, then we can discuss it. |
I've decided to merge #144. I would love @talkingmoose to help spearhead how to support the entire MDM spec within jamf's JSON schema, but I think the only way I can potentially get movement on that is to help make it easier for jamf admins to use my tool. |
@fridomac or anyone else, please work on the JSON Schema.
|
Ok, will take it up again... |
@fridomac or whomever; I started this but it may need some tweaking... |
@fjprz Thank you! I sent you a first pull request, am trying to structure it a little more (with headers for "OS Version Requirements" and "User Experience" and "User Interface". |
I tried the profile that is generated by Jamf, but Nudge does not seem to pick up the Configuration. |
So, JSON Schema is unlikely to support a However, would an effective workaround be something like this? If an ISO 8601 compliant date/time string is detected, then replace It might be beneficial to add Nudge to the Jamf Marketplace where it can get additional exposure and generate more awareness of it at Jamf. There's a specific section for "Configuration" where I think it may fit best. |
@fridomac https://github.com/fridomac/nudge-jamf-json-schema/blob/main/Nudge%20Preferences-Unsigned.mobileconfig#L48-L53 these lines should be under the |
I like the idea around ISO compliant strings as I believe that's exactly what apple does with JSON strings within Swift. I'll try and work on getting into Jamf Marketplace. |
Yes, there are not all keys there yet. I reworked the Schema to put the preferences in the right keys, and updated the Repo. I suspect that Nudge does not like it when the keys are wrapped into an before the , therefore it thinks the "optionalFeatures" and "userInterface" keys are empty. Will do more testing around this and report back, have a nice weekend! |
There is not a way to see every key in debug or info mode but it does say in that screenshot that keys are empty so that's a key indicator that profile is not configured correctly. It's interesting that the resulting profile is MCX Forced. That's actually the old style of profiles. The style of profile I create is essentially the same and backwards compatible. That might be a great enhancement for Jamf to resolve but for now makes it incredibly hard for you to compare my profile to yours. :/ |
Ok, thank you Erik. I noticed that the profiles generated by the JSON Schema are always "MCX Forced". (always reminds me of Profile Manager and the "golden Triangle" with AD and OD). |
Following up on this. While JSON Schema doesn't support the "date" datatype, it does support a "date" format option that can be added to a property. Its intended use is to validate an ISO 8601 compliant "string" datatype. In the JSON Schema, it would look something like this:
I've proposed a change internally at Jamf that if this Development decisions for implementing a new feature or change to an existing feature aren't always made on the basis of completeness or "that's a good idea". (Time, money, quality: pick any two.) I don't currently see a feature request on Jamf Nation for anything like this. Someone from the community should create one and then recruit others to vote it up. Feel free to use the suggestion I've proposed here, if you think it's the best way to implement the feature. |
Jamf users on this thread. Please do what @talkingmoose is suggesting. I think his idea is great. |
I created a Feature Request on Jamf Nation for this: Please vote it up, if you care about this! |
(crossposted from Slack #nudge): |
@fridomac @fjprz I have created my own initial version of the jamf json schema for Nudge. Before I go into setting defaults and adding more items, I'd like someone else to check it. It looks good on my end. https://github.com/macadmins/nudge/blob/development/Schema/jamf/com.github.macadmins.Nudge.json |
Will do so first thing tomorrow morning!
Bye, Frido.
… Am 23.03.2021 um 16:12 schrieb Erik Gomez ***@***.***>:
@fridomac @fjprz I have created my own initial version of the jamf json schema for Nudge. Before I go into setting defaults and adding more items, I'd like someone else to check it. It looks good on my end.
53255ee
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Looks good so far; the osVersionRequirements are coming up empty at the moment, but I assume that's because you are still adding stuff. |
Try now. :) |
Confirmed with a few users that it's working as expected and I'm also happy with it looking at my jamf instance. If any other have issues come up, please file a new github ticket. |
@erikng Does your latest update workaround @fridomac's Jamf Feature Request Suppport "Date" Key in Jamf Custom JSON Schema ? |
Indeed it does, but as soon as Jamf works on that, I'm reverting that code. |
Thank you @erikng, works here, too. Now I just have to find out what I did wrong in my Version! |
https://docs.jamf.com/technical-papers/jamf-pro/json-schema/10.26.0/Understanding_the_Structure_of_a_JSON_Schema_Manifest.html
https://www.jamf.com/jamf-nation/discussions/34839/custom-schemas-for-application-configuration-profiles
The text was updated successfully, but these errors were encountered: