-
Notifications
You must be signed in to change notification settings - Fork 338
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
Conversation
67172e5
to
ee00b2c
Compare
ee00b2c
to
4b0a080
Compare
b2b698e
to
5e61d76
Compare
@@ -22,6 +22,7 @@ class MockSystemInfo: SystemInfo { | |||
finishTransactions: Bool, | |||
customEntitlementsComputation: Bool = false, | |||
storeKitVersion: StoreKitVersion = .default, | |||
responseVerificationMode: Signing.ResponseVerificationMode = .disabled, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😅
There was a problem hiding this 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, |
There was a problem hiding this comment.
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.
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.