AzureAD / microsoft-authentication-library-for-dotnet

Microsoft Authentication Library (MSAL) for .NET
https://aka.ms/msal-net
MIT License
1.36k stars 333 forks source link

Missing PrivacyInfo.xcprivacy (Apple Privacy Manifest file) for use of NSUserDefaults #4682

Open Cybrosys opened 3 months ago

Cybrosys commented 3 months ago

MSAL client type

Public

Problem statement

As of May 1, 2024, it will be mandatory for iOS, iPadOS, and tvOS apps to include a privacy manifest files. It is possible for libraries to include one as well, otherwise the app developer has to go through the code from third-party libraries/SDKs in order to make sure the file provided with the app is correct.

From what I can see, the code in IntuneEnrollmentIdHelper.se accesses NSUserDefaults which requires an entry in a PrivacyInfo.xcprivacy file indicating how it is used.

https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401

Proposed solution

Add a privacy manifest file to the Microsoft.Identity.Client NuGet package for iOS that declares its usage of NSUserDefaults.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>...</string>
            </array>
        </dict>
    </array>
</dict>
</plist>

Alternatives

No response

Cybrosys commented 2 months ago

Is there a status update regarding this? Maybe someone could update the documentation with the values that are needed in the PrivacyInfo.xcprivacy when using the package?

localden commented 2 months ago

Assigning to myself to investigate and have a resolution.