Skip to content
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

[Trusted Entitlements] Enable Trusted Entitlements by default #4672

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Jan 15, 2025

Description

This enables Trusted Entitlements by default. Behavior won't change for devs not check the verification result, but this will make it much easier to use in the future, as all SDK versions have it enabled.

This should be merged after #4671.

@tonidero tonidero force-pushed the enable-trusted-entitlements-default branch from 67172e5 to ee00b2c Compare January 15, 2025 13:02
@tonidero tonidero force-pushed the enable-trusted-entitlements-default branch from ee00b2c to 4b0a080 Compare January 15, 2025 13:07
@tonidero tonidero force-pushed the enable-trusted-entitlements-default branch from b2b698e to 5e61d76 Compare January 15, 2025 15:29
@@ -22,6 +22,7 @@ class MockSystemInfo: SystemInfo {
finishTransactions: Bool,
customEntitlementsComputation: Bool = false,
storeKitVersion: StoreKitVersion = .default,
responseVerificationMode: Signing.ResponseVerificationMode = .disabled,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've disabled this during tests by default... Reason being that a bunch of tests started failing because we had not mocked some things. I could fix those tests to cover that, but we already have tests specifically for having this enabled, so seemed easier to disable it by default during tests. I'm not sure if I should just take the effort to fix those tests... Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the fix be to mock the verification behavior? Because if so I agree to keeping it .disabled. If we can "automatically" cover more ground by enabling this in tests, however, we could consider that. Can also be in a separate PR as far as I'm concerned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the fix be to mock the verification behavior?

That's correct. Yeah, I don't think it would be too difficult to do this mocking... But probably worth doing separately.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're mocking the verification behavior, that's equivalent to just disabling the verification altogether right? Or am I missing something? So in that case I would just leave it disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it would mostly be mocking the "Signing" object, so it doesn't run the actual verification, so yeah it wouldn't run the actual signing behavior itself in most cases... We could try to not mock it and have it actually run with real data but that would be much much trickier 😅

@tonidero tonidero marked this pull request as ready for review January 15, 2025 15:59
@tonidero tonidero requested a review from a team January 15, 2025 15:59
Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -22,6 +22,7 @@ class MockSystemInfo: SystemInfo {
finishTransactions: Bool,
customEntitlementsComputation: Bool = false,
storeKitVersion: StoreKitVersion = .default,
responseVerificationMode: Signing.ResponseVerificationMode = .disabled,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the fix be to mock the verification behavior? Because if so I agree to keeping it .disabled. If we can "automatically" cover more ground by enabling this in tests, however, we could consider that. Can also be in a separate PR as far as I'm concerned.

@tonidero tonidero merged commit 0a5e2aa into main Jan 16, 2025
10 checks passed
@tonidero tonidero deleted the enable-trusted-entitlements-default branch January 16, 2025 15:49
This was referenced Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants