Adyen / adyen-cse-web

[DEPRECATED] Client-side encryption on JavaScript
MIT License
15 stars 39 forks source link

Switching to Secured Fields - Cut-off Date #84

Open e-bacho opened 5 years ago

e-bacho commented 5 years ago

Can you please update the README file to include information regarding support and cut-off dates for existing customers using the CSE WEB library?

What are the implications if we continue using the now deprecated library?

felquis commented 5 years ago

I attended to this case today at the office, here are my final thoughts

I'm already integrated with Adyen on a web application for 12+ months but in a dumb way, because only now I understand that the JS Context that handles my customer credit card number must be separated from the JS Context that handles my JavaScript application itself. Imagine, any malicious script won't ever have access to the data in the JS Context. A comparison is how the codepen.io website works, that runs your code sample and the codepen.io UI on different JS Contexts using iframes to avoid any unintentional influence on each other. We want the same with our credit card data, we don't want any unknown JS running in the same context of our precious sensitive data.

Screen Shot 2019-03-16 at 01 09 56

Adyen library will replace your inputs with iframes, which sounds scary but is awesome!

So, if you use the "dumb way" you should strongly consider moving to the secured iframe integration, it is that simple:

   var csfSetupObj = {
      rootNode: '.cards-div',
      configObject : {
        originKey : "[ORIGIN KEY]",
        },
      allowedDOMAccess : true // I don't really understand this flag, default is true
   };
   var securedFields = csf(csfSetupObj);

Now explore securedFields and check the onSomething functions, for each credit card form state, like card brand, validation of each field, valid card it will trigger those functions https://docs.adyen.com/developers/checkout/api-integration/configure-secured-fields/secured-fields-callbacks

Trigalti commented 5 years ago

@e-bacho : @felquis explained the benefits really well. There is no real implication when you keep using CSE, be aware though: Our default product is secured Fields, which is also the product we will push our updates to.

There is no cut off date in place (we will not just stop processing your payments).

@felquis on the allowedDOMAccess flag: By default Secured fields is allowed to add the encrypted element to the DOM - user of CSF must explicitly 'opt-out' to prevent this happening. Thus, there is no need to set it yourself.