-
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
: new Signature format
#2679
Trusted Entitlements
: new Signature format
#2679
Conversation
af640da
to
76c0c54
Compare
Trusted Entitlements
: new Signature formatTrusted Entitlements
: new Signature format
@@ -216,6 +216,8 @@ final class InformationalSignatureVerificationHTTPClientTests: BaseSignatureVeri | |||
} | |||
|
|||
func testValidSignatureWithETagResponse() throws { | |||
XCTExpectFailure("Not yet implemented") |
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.
The fix for this is quite long so it's coming in a separate PR.
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.
Should we hold off merging this to main until everything is ready so we don't break things in main? This looks good though!
Sources/Security/Signing.swift
Outdated
@@ -103,9 +120,8 @@ enum Signing: SigningType { | |||
|
|||
// MARK: - | |||
|
|||
private static let publicKey = "UC1upXWg5QVmyOSwozp755xLqquBKjjU+di6U8QhMlM=" | |||
private static let publicKey = "nVoKJjLhhTNo19Mkjr5DEmgMf361HWxxMyctC10Ob7c=" |
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.
So this will be the key used to verify the intermediate key correct? Should we rename it to make it clearer?
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 still need to figure out that part.
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 left this here so tests pass, but in the last PR this will be reverted, since the actual public key hasn't changed.
) | ||
} | ||
|
||
} | ||
|
||
// MARK: - Private | ||
|
||
extension Signing { | ||
|
||
enum SignatureComponent: CaseIterable, Comparable { |
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.
This is nice! ❤️
Yeah for sure 👍🏻 |
250270c
to
b0782ab
Compare
b0782ab
to
a11ae88
Compare
62010bf
to
e654254
Compare
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.
Looks good!
return false | ||
} | ||
|
||
// Fixme: verify public key |
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.
Is this still needed?
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.
That's done in #2715 :)
9d3ee66
to
92b1d1c
Compare
@@ -25,6 +25,8 @@ class BaseSignatureVerificationIntegrationTests: BaseStoreKitIntegrationTests { | |||
fileprivate var invalidSignature: Bool = false | |||
|
|||
override func setUp() async throws { | |||
throw XCTSkip("Tests disabled until backend deploys new signature format") |
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.
return .enforced(Signing.loadPublicKey()) | ||
// Disabled until the backend deploys the new signature format | ||
// return .enforced(Signing.loadPublicKey()) | ||
return .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.
be175cc
to
6d66630
Compare
6d66630
to
4d8fd34
Compare
New format:
This also adds support for optional nonces for "static" signatures, which is required for #2667.