14 lines
815 B
JSON
14 lines
815 B
JSON
{
|
|
"description": "Shared test vectors for the HMAC authentication of the internal game-server -> main-server endpoints. Both test suites (main-server/spec/services/internal_signature_service_spec.rb and game-server/internal/mainserver/reporter_test.go) read this file, so it is the single source of truth for the wire format. Signature algorithm: hex(HMAC-SHA256(secret, \"<timestamp>.<path>.<body>\")), where path is the request path without the query string.",
|
|
"vectors": [
|
|
{
|
|
"name": "player1_won report",
|
|
"secret": "test-secret-key-base",
|
|
"timestamp": 1700000000,
|
|
"path": "/api/internal/matches/abc/result",
|
|
"body": "{\"status\":\"player1_won\",\"duration_seconds\":42}",
|
|
"signature_hex": "e0a7f8b5508639b1afe604b41f00070dd282d02b6444db5b4856959f175e8361"
|
|
}
|
|
]
|
|
}
|