diff --git a/signer/core/signed_data_test.go b/signer/core/signed_data_test.go index 4a36e8005e..a7678186bd 100644 --- a/signer/core/signed_data_test.go +++ b/signer/core/signed_data_test.go @@ -1062,21 +1062,24 @@ func TestEncodeDataRecursiveBytes(t *testing.T) { } } -func TestSignInWithEtherium(t *testing.T) { +func TestSignInWithEtheriumValid(t *testing.T) { t.Parallel() testFiles, err := os.ReadDir(filepath.Join("testdata", "siwe")) require.NoError(t, err) var messages map[string]string + var expectingWarning bool for _, fInfo := range testFiles { if !strings.HasSuffix(fInfo.Name(), "json") { continue } - if !strings.HasPrefix(fInfo.Name(), "valid") { + if fInfo.Name() != "warning_uris.json" { continue } + expectingWarning = strings.HasPrefix(fInfo.Name(), "warning") + jsonFile, err := os.ReadFile(filepath.Join("testdata", "siwe", fInfo.Name())) require.NoError(t, err) @@ -1099,16 +1102,12 @@ func TestSignInWithEtherium(t *testing.T) { control.inputCh <- "a_long_password" signature, err := api.SignData(context.Background(), apitypes.TextPlain.Mime, a, hexutil.Encode([]byte(message))) - require.NoError(t, err) - // if expectedFailure { - // require.Error(t, err) - // return - // } else { - // require.NoError(t, err) - // } - // if expectedWarning { - // // todo: monitor for warning - // } + if expectingWarning { + // todo: check UI for warning message + } else { + require.NoError(t, err) + } + if signature == nil || len(signature) != 65 { t.Errorf("Expected 65 byte signature (got %d bytes)", len(signature)) } diff --git a/signer/core/testdata/siwe/parsing_negative.json b/signer/core/testdata/siwe/parsing_negative.json deleted file mode 100644 index 8fd22cfc3a..0000000000 --- a/signer/core/testdata/siwe/parsing_negative.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "missing domain": " wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "missing address": "service.org wants you to sign in with your Ethereum account:\n\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "missing uri": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\n\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "missing version": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\n\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "missing chainId": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\n\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "missing nonce": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\n\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "missing issuedAt": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\n\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order uri": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nVersion: 1\nURI: https://service.org/login\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order version": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nChain ID: 1\nVersion: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order chainId": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nNonce: 12341234Chain ID: 1\n\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order nonce": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nIssued At: 2022-03-17T12:45:13.610Z\nNonce: 12341234\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order issuedAt": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nExpiration Time: 2023-03-17T12:45:13.610Z\nIssued At: 2022-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order expirationTime": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "out of order notBefore": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nRequest ID: some_id\nNot Before: 2022-03-17T12:45:13.610Z\nResources:\n- https://service.org/login", - "out of order requestId": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nResources:\n- https://service.org/login\nRequest ID: some_id", - "out of order resources": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nResources:\n- https://service.org/login\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id", - "domain not RFC4501 authority": "#notrfc4501 wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "address not EIP-55": "service.org wants you to sign in with your Ethereum account:\n0xe5a12547fe4e872d192e3ececb76f2ce1aea4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "statement has line break": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: \nhttps://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "uri is non-RFC 3986": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: :not_a_rfc3986_valid_uri_\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "version not 1": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 3\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "not a valid chainId": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: ?\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "nonce with less then 8 chars": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 1234567\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "non-ISO 8601 issuedAt": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: Wed Oct 05 2011 16:48:00 GMT+0200 (CEST)\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "non-ISO 8601 expirationTime": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: Wed Oct 05 2011 16:48:00 GMT+0200 (CEST)\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "non-ISO 8601 notBefore": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: Wed Oct 05 2011 16:48:00 GMT+0200 (CEST)\nRequest ID: some_id\nResources:\n- https://service.org/login", - "resources not separated by line break": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login - https://service.org/login/2", - "first resource not-RFC 3986": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- :not_a_rfc3986_valid_uri_\n- https://service.org/login", - "second resource is not-RFC3986": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login\n- :not_a_rfc3986_valid_uri_" -} diff --git a/signer/core/testdata/siwe/parsing_positive.json b/signer/core/testdata/siwe/parsing_positive.json deleted file mode 100644 index 95ca7540c5..0000000000 --- a/signer/core/testdata/siwe/parsing_positive.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "couple of optional fields": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nResources:\n- ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu\n- https://example.com/my-web2-claim.json", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z", - "resources": [ - "ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu", - "https://example.com/my-web2-claim.json" - ] - } - }, - "no optional field": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "timestamp without microseconds": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24Z" - } - }, - "timezone not utc": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24-02:00", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24-02:00" - } - }, - "domain is RFC 3986 authority with IP": { - "message": "127.0.0.1 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "127.0.0.1", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "domain is RFC 3986 authority with userinfo": { - "message": "test@127.0.0.1 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "test@127.0.0.1", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "domain is RFC 3986 authority with port": { - "message": "127.0.0.1:8080 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "127.0.0.1:8080", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "domain is localhost authority with port": { - "message": "localhost:8080 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "localhost:8080", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "domain is RFC 3986 authority with userinfo and port": { - "message": "test@127.0.0.1:8080 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "test@127.0.0.1:8080", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "no statement": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "domain ipv6": { - "message": "[::cafe] wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "[::cafe]", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "uri ipv6": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://[::cafe]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://[::cafe]", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "uri ipv4": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://127.0.0.1\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://127.0.0.1", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "uri with port": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://127.0.0.1:4361\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://127.0.0.1:4361", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "uri ipv4 query params and fragment": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://127.0.0.1/?query=one#begin\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://127.0.0.1/?query=one#begin", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "chainId not 1": { - "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 4\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "service.org", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "uri": "https://service.org/login", - "version": "1", - "chainId": 4, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, - "recovery byte starting at 0": { - "message": "www.tally.xyz wants you to sign in with your Ethereum account:\n0xc95EB884FE852e241D409234bfC7045CB9E31BD7\n\nSign in with Ethereum to Tally\n\nURI: https://tally.xyz\nVersion: 1\nChain ID: 1\nNonce: 15050747\nIssued At: 2022-06-30T14:08:51.382Z", - "fields": { - "domain": "www.tally.xyz", - "address": "0xc95EB884FE852e241D409234bfC7045CB9E31BD7", - "statement": "Sign in with Ethereum to Tally", - "uri": "https://tally.xyz", - "version": "1", - "chainId": 1, - "nonce": "15050747", - "issuedAt": "2022-06-30T14:08:51.382Z" - } - }, - "domain contains optional scheme": { - "message": "https://example.com wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ExampleOrg Terms of Service: https://example.com/tos\n\nURI: https://example.com/login\nVersion: 1\nChain ID: 1\nNonce: 32891756\nIssued At: 2021-09-30T16:25:24Z", - "fields": { - "scheme": "https", - "domain": "example.com", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ExampleOrg Terms of Service: https://example.com/tos", - "uri": "https://example.com/login", - "version": "1", - "chainId": 1, - "nonce": "32891756", - "issuedAt": "2021-09-30T16:25:24Z" - } - }, - "scheme is not parsed from elsehwere in message": { - "message": "localhost:3030 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ExampleOrg Terms of Service: http://localhost:3030/tos\n\nURI: http://localhost:3030/login\nVersion: 1\nChain ID: 1\nNonce: 32891756\nIssued At: 2021-09-30T16:25:24Z", - "fields": { - "scheme": null, - "domain": "localhost:3030", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ExampleOrg Terms of Service: http://localhost:3030/tos", - "uri": "http://localhost:3030/login", - "version": "1", - "chainId": 1, - "nonce": "32891756", - "issuedAt": "2021-09-30T16:25:24Z" - } - } -} diff --git a/signer/core/testdata/siwe/tmp_valid_specification.json b/signer/core/testdata/siwe/tmp_valid_specification.json deleted file mode 100644 index 812cedfa58..0000000000 --- a/signer/core/testdata/siwe/tmp_valid_specification.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "resources present": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nResources:\n- uri:", - "items": { - "statement": null, - "requestId": null, - "resources": ["uri:"] - } - }, - "resources empty": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nResources:", - "items": { - "statement": null, - "requestId": null, - "resources": [] - } - }, - "resources missing": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "items": { - "statement": null, - "requestId": null, - "resources": null - } - }, - "request-id present": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nRequest ID: request123", - "items": { - "statement": null, - "requestId": "request123", - "resources": null - } - }, - "request-id empty": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nRequest ID: ", - "items": { - "statement": null, - "requestId": "", - "resources": null - } - }, - "request-id missing": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "items": { - "statement": null, - "requestId": null, - "resources": null - } - }, - "statement present": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nhave statement\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "items": { - "statement": "have statement", - "requestId": null, - "resources": null - } - }, - "statement empty": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "items": { - "statement": "", - "requestId": null, - "resources": null - } - }, - "statement missing": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "items": { - "statement": null, - "requestId": null, - "resources": null - } - } -} diff --git a/signer/core/testdata/siwe/tmp_valid_uris.json b/signer/core/testdata/siwe/tmp_valid_uris.json deleted file mode 100644 index eda7a51412..0000000000 --- a/signer/core/testdata/siwe/tmp_valid_uris.json +++ /dev/null @@ -1,308 +0,0 @@ -{ - "uri-js scheme: uri:": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": null, - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js userinfo: uri://@": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://@\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": "", - "host": "", - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js empty host: uri://@:": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://@:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": "", - "host": "", - "port": "", - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js host: uri://": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "", - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js port: uri://:": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "", - "port": "", - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js query: uri:?": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:?\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": null, - "port": null, - "path": "", - "query": "", - "fragment": null - } - }, - "uri-js fragment: uri:#": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:#\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": null, - "port": null, - "path": "", - "query": null, - "fragment": "" - } - }, - "uri-js all: uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": "user:pass", - "host": "example.com", - "port": 123, - "path": "/one/two.three", - "query": "q1=a1&q2=a2", - "fragment": "body" - } - }, - "uri-js IPv4address: uri://10.10.10.10": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://10.10.10.10\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "10.10.10.10", - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js IPv6address: uri://[2001:db8::7]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[2001:db8::7]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "2001:db8::7", - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js mixed IPv6address & IPv4address: uri://[::ffff:129.144.52.38]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::ffff:129.144.52.38]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "::ffff:129.144.52.38", - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js mixed IPv4address & reg-name: uri://10.10.10.10.example.com/en/process": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://10.10.10.10.example.com/en/process\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "10.10.10.10.example.com", - "port": null, - "path": "/en/process", - "query": null, - "fragment": null - } - }, - "uri-js IPv6address, example from bkw: uri://[2606:2800:220:1:248:1893:25c8:1946]/test": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[2606:2800:220:1:248:1893:25c8:1946]/test\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "2606:2800:220:1:248:1893:25c8:1946", - "port": null, - "path": "/test", - "query": null, - "fragment": null - } - }, - "uri-js IPv6address, example from RFC 5952: uri://[2001:db8::1]:80": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[2001:db8::1]:80\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": "2001:db8::1", - "port": 80, - "path": "", - "query": null, - "fragment": null - } - }, - "uri-js end test: uri:": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "scheme": "uri", - "userinfo": null, - "host": null, - "port": null, - "path": "", - "query": null, - "fragment": null - } - }, - "IPv4address: uri://[::10.10.10.10]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::10.10.10.10]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::10.10.10.10" - } - }, - "IPv4address leading zeros: uri://[::000.000.010.001]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::000.000.010.001]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::000.000.010.001" - } - }, - "IPv4address max value: uri://[::001.099.200.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::001.099.200.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::001.099.200.255" - } - }, - "IPv6address no :: : uri://[ffff:abcd:0:10:200:3000:f8a:1]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:abcd:0:10:200:3000:f8a:1]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "ffff:abcd:0:10:200:3000:f8a:1" - } - }, - "IPv6address no :: & IPv4: uri://[ffff:abcd:0:10:200:3000:255.255.255.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:abcd:0:10:200:3000:255.255.255.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "ffff:abcd:0:10:200:3000:255.255.255.255" - } - }, - "IPv6address leading :: no IPv4: uri://[::]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::" - } - }, - "IPv6address leading :: no IPv4: uri://[::ffff]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::ffff]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::ffff" - } - }, - "IPv6address leading :: no IPv4: uri://[::1:2:3:4:5:6:7]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::1:2:3:4:5:6:7]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::1:2:3:4:5:6:7" - } - }, - "IPv6address leading :: with IPv4: uri://[::198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::198.162.10.255" - } - }, - "IPv6address leading :: with IPv4: uri://[::ffff:198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::ffff:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::ffff:198.162.10.255" - } - }, - "IPv6address leading :: with IPv4: uri://[::1:2:3:4:5:198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::1:2:3:4:5:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "::1:2:3:4:5:198.162.10.255" - } - }, - "IPv6address trailing :: no IPv4: uri://[1::]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1::" - } - }, - "IPv6address trailing :: no IPv4: uri://[1:2:3:4:5:6:7::]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4:5:6:7::]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1:2:3:4:5:6:7::" - } - }, - "IPv6address trailing :: with IPv4: uri://[1::198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1::198.162.10.255" - } - }, - "IPv6address trailing :: with IPv4: uri://[1:2:3:4:5::198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4:5::198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1:2:3:4:5::198.162.10.255" - } - }, - "IPv6address leading & trailing :: no IPv4: uri://[1::2]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::2]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1::2" - } - }, - "IPv6address leading & trailing :: no IPv4: uri://[1:2:3:4:5:6::7]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4:5:6::7]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1:2:3:4:5:6::7" - } - }, - "IPv6address leading & trailing :: no IPv4: uri://[ffff:aaaa:bbbb::cccc:dddd:eeee:9999]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:aaaa:bbbb::cccc:dddd:eeee:9999]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "ffff:aaaa:bbbb::cccc:dddd:eeee:9999" - } - }, - "IPv6address leading & trailing :: with IPv4: uri://[1::2:198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::2:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1::2:198.162.10.255" - } - }, - "IPv6address leading & trailing :: with IPv4: uri://[1:2:3:4::7:198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4::7:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "1:2:3:4::7:198.162.10.255" - } - }, - "IPv6address leading & trailing :: with IPv4: uri://[ffff:aaaa:bbbb::cccc:dddd:198.162.10.255]": { - "msg": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:aaaa:bbbb::cccc:dddd:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "uri": { - "host": "ffff:aaaa:bbbb::cccc:dddd:198.162.10.255" - } - } -} diff --git a/signer/core/testdata/siwe/valid_specification.json b/signer/core/testdata/siwe/valid_specification.json new file mode 100644 index 0000000000..ef9df5ebb6 --- /dev/null +++ b/signer/core/testdata/siwe/valid_specification.json @@ -0,0 +1,11 @@ +{ + "resources present": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nResources:\n- uri:", + "resources empty": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nResources:", + "resources missing": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "request-id present": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nRequest ID: request123", + "request-id empty": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z\nRequest ID: ", + "request-id missing": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "statement present": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nhave statement\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "statement empty": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "statement missing": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z" +} diff --git a/signer/core/testdata/siwe/valid_uris.json b/signer/core/testdata/siwe/valid_uris.json new file mode 100644 index 0000000000..d5acd817aa --- /dev/null +++ b/signer/core/testdata/siwe/valid_uris.json @@ -0,0 +1,38 @@ +{ + "uri-js scheme: uri:": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js userinfo: uri://@": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://@\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js empty host: uri://@:": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://@:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js host: uri://": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js port: uri://:": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js query: uri:?": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:?\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js fragment: uri:#": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:#\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js all: uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js IPv4address: uri://10.10.10.10": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://10.10.10.10\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js IPv6address: uri://[2001:db8::7]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[2001:db8::7]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js mixed IPv6address & IPv4address: uri://[::ffff:129.144.52.38]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::ffff:129.144.52.38]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js mixed IPv4address & reg-name: uri://10.10.10.10.example.com/en/process": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://10.10.10.10.example.com/en/process\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js IPv6address, example from bkw: uri://[2606:2800:220:1:248:1893:25c8:1946]/test": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[2606:2800:220:1:248:1893:25c8:1946]/test\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js IPv6address, example from RFC 5952: uri://[2001:db8::1]:80": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[2001:db8::1]:80\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "uri-js end test: uri:": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri:\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv4address: uri://[::10.10.10.10]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::10.10.10.10]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv4address leading zeros: uri://[::000.000.010.001]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::000.000.010.001]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv4address max value: uri://[::001.099.200.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::001.099.200.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address no :: : uri://[ffff:abcd:0:10:200:3000:f8a:1]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:abcd:0:10:200:3000:f8a:1]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address no :: & IPv4: uri://[ffff:abcd:0:10:200:3000:255.255.255.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:abcd:0:10:200:3000:255.255.255.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading :: no IPv4: uri://[::]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading :: no IPv4: uri://[::ffff]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::ffff]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading :: no IPv4: uri://[::1:2:3:4:5:6:7]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::1:2:3:4:5:6:7]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading :: with IPv4: uri://[::198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading :: with IPv4: uri://[::ffff:198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::ffff:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading :: with IPv4: uri://[::1:2:3:4:5:198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[::1:2:3:4:5:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address trailing :: no IPv4: uri://[1::]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address trailing :: no IPv4: uri://[1:2:3:4:5:6:7::]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4:5:6:7::]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address trailing :: with IPv4: uri://[1::198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address trailing :: with IPv4: uri://[1:2:3:4:5::198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4:5::198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading & trailing :: no IPv4: uri://[1::2]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::2]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading & trailing :: no IPv4: uri://[1:2:3:4:5:6::7]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4:5:6::7]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading & trailing :: no IPv4: uri://[ffff:aaaa:bbbb::cccc:dddd:eeee:9999]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:aaaa:bbbb::cccc:dddd:eeee:9999]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading & trailing :: with IPv4: uri://[1::2:198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1::2:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading & trailing :: with IPv4: uri://[1:2:3:4::7:198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[1:2:3:4::7:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "IPv6address leading & trailing :: with IPv4: uri://[ffff:aaaa:bbbb::cccc:dddd:198.162.10.255]": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: uri://[ffff:aaaa:bbbb::cccc:dddd:198.162.10.255]\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z" +} diff --git a/signer/core/testdata/siwe/invalid_resources.json b/signer/core/testdata/siwe/warning_resources.json similarity index 100% rename from signer/core/testdata/siwe/invalid_resources.json rename to signer/core/testdata/siwe/warning_resources.json diff --git a/signer/core/testdata/siwe/invalid_uris.json b/signer/core/testdata/siwe/warning_uris.json similarity index 100% rename from signer/core/testdata/siwe/invalid_uris.json rename to signer/core/testdata/siwe/warning_uris.json