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

Failing tests due to missing setup #35

Open
purplepangolin opened this issue Feb 24, 2020 · 0 comments
Open

Failing tests due to missing setup #35

purplepangolin opened this issue Feb 24, 2020 · 0 comments

Comments

@purplepangolin
Copy link

Hello,

I have followed the steps in the installation guide to create an instance of the SPEKE Reference Server using the hosted template and pre-built binaries.

When I run the manual test for the lambda Server, I get a successful response, but the encoded value in the <pskc:PlainValue element does not match that given in the Readme:

<pskc:PlainValue>IakD9BOe/LWABBMy43GXZw==</pskc:PlainValue>

rather than:

<pskc:PlainValue>ALzP1aOTJvzfqg9I12k2Vw==</pskc:PlainValue>

Similarly, if I run the automated tests, the assertions for the server tests fail:

======================================================================
FAIL: test_server (__main__.TestSPEKELambdas)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lambda_tests.py", line 107, in test_server
    self.assertEqual(EXPECTED_SERVER_KEY, base64.b64decode(key.text))
AssertionError: b'\x00\xbc\xcf\xd5\xa3\x93&\xfc\xdf\xaa\x0fH\xd7i6W' != b'!\xa9\x03\xf4\x13\x9e\xfc\xb5\x80\x04\x132\xe3q\x97g'

Looking at the code in key_generator.py, it seems that the keys are generated as a function of a secret per contentId and the keyId itself. The secret values are randomly generated rather than set to a known value by the test setup which I think accounts for the different results. I presume that these tests must have either been added/amended after the secrets had been generated in the original environment so will work fine there, but not in a new environment with different generated secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant