Skip to content

Conversation

marcidy
Copy link
Contributor

@marcidy marcidy commented Aug 4, 2019

added the following:

  1. creating of a 32character nonce
  2. store to database object (WARNING: this needs a db migrate. I'll do it, just pointing it out)
  3. in the main page view, a nonce is created and stored in the database
  4. The page is then served
  5. in the served page, there is now javascript (from static/js/helper.js) which makes an async request
    at a new "/nonce/" reout
  6. If there is a nonce with value <nonce_value> in the database AND it's less than 60s old, then the stripe public key is served and subsequenctly set by a call back.

So the key is only available in a 60s window from request initiation to the client.

I suspect this will form only one part of a larger solution, but it is one part, and it is working.

further efforts to obfuscate the key will occur after implementing this, then rolling the key.

noncing the thing with xhr and stuff...still not really that obfuscated

cleanup of logging and debug stuff
@marcidy
Copy link
Contributor Author

marcidy commented Aug 5, 2019

Hi, I'm going to refactor this so it's in a single file.

@marcidy marcidy mentioned this pull request Aug 5, 2019
@marcidy
Copy link
Contributor Author

marcidy commented Aug 5, 2019

replaced with #35

@marcidy marcidy closed this Aug 5, 2019
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

Successfully merging this pull request may close these issues.

1 participant