a new thread for any (not specifically code-related) PCI compliance discussion.
the current issue under discussion, as i see it, is this:
the current 7.x-1.x-dev has support for both Stripe Checkout and a direct-post implementation of Stripe.js. We all seem to agree that the Stripe Checkout implementation should meet the requirements for SAQ-A under PCI v3. The question is whether the direct-post method would fall under SAQ A or SAQ A-EP. It seems pretty clear from the language in PCI v3 that the direct-post method would qualify for SAQ A-EP and not SAQ A. However, one community member is reporting (https://www.drupal.org/node/2433257#comment-9981601) that representatives of Stripe have told him that our direct-post implementation should in fact qualify for SAQ A. This seems to directly contradict everyone's understanding of the requirements for SAQ A, so we are hoping to get some clarity from someone with deeper knowledge on the subject.
I reached out to Stipe support via my company (paying customer) account on 6/1, and am waiting to hear back from them. In the meantime, others may be able to shed light on the situation.
Comments
Comment #1
mesch commentedAdding reference to #2502109: Prevent Add/Update Card Functionality From User Tab with Stripe Checkout
Comment #2
Adam Wood commentedStripe have provided further information by email following their comment that I posted mentioned in the summary. They did mention that they've sent this information to other Drupal developers in the last few days.
Comment #3
aviindub commentedthey sent me the same email (word for word). this really doesnt explain anything, and i am still not convinced that our direct-post implementation qualifies for SAQ A, even if it uses an iframe to do the direct-posting.
Comment #4
bigjim commentedWe received a similar, though differently worded e-mail, form Stripe when we inquired about this.
Here's what we were told:
@aviindub what questions are you looking to get answered?
Comment #5
aviindub commented@bigjim -- that at least gives us a more clear explanation of why they think this is ok for SAQ A. I still think the language from PCI v3 is pretty clear, and this still seems to go very clearly against that language, so i am withholding judgment.
specifically, here is the part that concerns me (source: https://www.pcisecuritystandards.org/documents/Understanding_SAQs_PCI_DS...):
our direct-post setup is pretty much exactly described in the second bullet point.
so basically what this comes down to is that Stripe is telling us they have found an implementation of direct-post that their auditors say is OK for SAQ A, even though this directly contradicts publications coming from PCI. i dont know how to resolve that short of getting an answer from someone with authority. barring that, i am going to err on the side of caution and assume the publications from PCI are correct.
Comment #6
aviindub commented@bigjim -- actually, heres a specific question.
in the email you received, they say:
can we get a citation for that? that might clear it all up.
Comment #7
bigjim commentedI don't have any more info from Stripe, but I found a reference to this doc (https://www.pcisecuritystandards.org/documents/Understanding_SAQs_PCI_DS...) on the Braintree web site claiming the a similar feature (https://developers.braintreepayments.com/javascript+ruby/guides/hosted-f...).
Page 4 of the PCI DSS doc mention iframes and redirect keep you in SAQ A Scope.
Comment #8
aviindub commentedI do not see the text you are referring to. perhaps you mean page 5? in either case, everything mentioned in that document, which i have read and re-read several times at this point, supports our understanding that the direct-post implementation cannot possibly qualify for SAQ A, in spite of what Stripe seems to be saying.
the description on the Braintree site also supports our prior & current understanding of SAQ A:
in other words, you fall under SAQ A-EP if any of the fields where CC data are entered originate from your own domain, and there is no mention of an exception if you use an iframe to tokenize the data.
TL/DR: the sources you cited reinforce our prior understanding, which is that only Stripe Checkout (the fully-iframe solution) can qualify for SAQ-A.
Comment #9
torgospizzaI agree with @aviindub, I think what this means is, "Stripe Checkout is fully SAQ-A compliant because it lives in an iFrame hosted by Stripe, but Stripe.js is SAQ A-EP compliant on Drupal Commerce because the actual form fields are created within a Drupal Form API implementation, and whose POST action URL is back to Drupal itself." (This isn't just a Drupal thing, this is literally any Credit Card form that is generated by a page that isn't hosted by Stripe [or any other PCI Compliant payment services provider].)
The way I understand it, we'll never be SAQ-A compliant with Stripe.js usage, only SAQ A-EP, simply due to the fact that Drupal handles the submission of a form which includes credit card field when Stripe.js integration is used.
I do think the person at Stripe was missing the nuance of SAQ-A vs. A-EP. "Never transmitting the data to your server" is only one part of the equation; the other part is where the form fields are generated. If someone gained access to YOUR Drupal site, they could change the form action or other element on the Checkout page where user information is collected, thereby creating a man-in-the-middle type of attack. (I think they thought "A" and "A-EP" are the same thing, since they both have "A" in them.)
This actually seems pretty straightforward to me, the real problem is that the Stripe representative may have been misinterpreting the SAQ documentation. I will try to get someone at a bank who deals in PCI compliance to verify my hunch, and will post again if I glean anything.
Comment #10
torgospizzaI spoke with the PCI department at Wells Fargo and they basically copy-pasted what others have already posted, so I'm pretty sure this issue is nearing its conclusion. The real problem seems to be that Stripe uses "Stripe.js" interchangeably when talking about their Javascript File hosted on their servers (stripe.js), and their direct-post implementation Stripe.js.
Even on their "What about PCI v3" page they lay this out plainly but then muddy it up again:
I've emailed Stripe to try and get them to clarify the documentation, because it is confusing and misleading.
Comment #11
hosais commentedHi,
I have read PCI standards and according to the discussion here, it seems direct post should NOT be in SAQ-A. However, Stripe says on their web site that stripe.js have been modified (using iFrame) so that it meet the new security requirement and that make the drupal possibly eligible for SAQ-A.
On the web site of Stripe https://support.stripe.com/questions/what-about-pci-dss-3-1 <-- PCI version 3.1
To my understanding, if this module using Stripe as it should be (using stripe.js) for the payment form, this module could be at SAQ-A. Am I wrong?
I have not yet checked the detail implementation of this module. If this module have to be in SAQ A-EP, then which functionality for the payment process make it be. It is very likely that some webs do not need that part. May I know what it is and could that part become optional? Thanks.
Comment #12
torgospizzaHi there,
As I mentioned, I'm pretty sure that the documentation on Stripe isn't 100% accurate. They use "Stripe.js" (the inline form method) interchangeably with the actual Javascript file "stripe.js". So your hunch is correct. Direct post is eligible to be SAQ A-EP compliant, not SAQ A.
According to the actual PCI documentation, any inline form that is created by a website other than a payment processor (which is the Stripe.js method, as opposed to the Stripe Checkout method) is automatically not qualified for SAQ A but may be eligible for SAQ A-EP. The reason is because, with many e-commerce sites including those created by Drupal Commerce, the payment forms are generated by YOUR site and not THEIRS, it is possible that those forms could be hijacked by a malicious user.
The only way your site would be SAQ A compliant is if you use the Checkout option, which in Stripe for Drupal Commerce, still has some issues to be worked out. But Stripe Checkout only uses a form that is provided by Stripe through an iFrame, meaning none of the forms are generated by Drupal, which in turn makes your site eligible for SAQ A.
Please see my above comments - especially #9 - as I have done a fairly thorough job of explaining where the problem is - mainly, the Stripe documentation being confusing.
Comment #13
bigjim commentedI agree, though i have to admit I want to take them at face value. Regardless, I do think an separate effort to offer a SAQ A compliant version would be prudent. Attaining SAQ A-EP compliance is still a high hurdle, though obviously not as high as SAQ D, with close to 110 compliance points to meet in the self reporting form.
Comment #14
hosais commentedHi, torgosPizza
Thank you for your clarification. I understand and agree with you. I also checked the detail implementation in the module today. The main reason is (for a site builder) to make sure/maintain Stripe.js is clean/correct is more complicated than just a link to a payment processor. Also, with checkout, the way of input sensitive info (drupal form) is NOT depends on the drupal site at all.
On the other hand, I just need to clarify one thing briefly (hope I am not silly about what I have read): We would like to do the PCI compliance to prevent loss of the company due to the security breach; therefore, there is no doubt that we must do the right process. We want to be under SAQ A because it cost much less. Some thing I am NOT clear is about how execute the SAQ or say PCI compliance.
In my mind right now, to be PCI compliance is execute the right SAQ. That is the merchant (drupal site) needs to finish required documents and create evidence (to ensure the ogranization/company to be prepared, evaluated, improved and trained to against security threats). Does the merchant need to have some kind of certification by a professional party (means more $$$) or JUST follow the process and provide the related documents to the related entities (such as bank, ...) according to the SAQ document?
I would really appreciate your brief clarification. Many thanks.
Comment #15
torgospizza#13:
The issue is that, if your payment form is being generated by Drupal Commerce - which it will be, unless you use Stripe Checkout integration - you will never be eligible for SAQ A. That's what the PCI documentation pretty much says in a nutshell.
#14:
In my experience you don't need to hire a 3rd party; if you use a major bank that has given you a merchant banking account they will most likely have a representative there who can guide you through the Questionnaire process. From my understanding and limited experience though there is no real "certification" and the only steps involved are filling out and submitting the questionnaire to your merchant's representative when and if they ask for it. We had Bank of America behind our merchant account and this is what they did when we were with them; with our new bank however I have yet to go through this process.
Hope this helps!
Comment #16
hosais commentedHello torgosPizza,
Thank you very much for your sharing. It helps a lot.
hosais
Comment #17
wizonesolutionsFor what it's worth, with version 1.1, as long as the integration type is
checkout(which hosts the payment form in an iframe served from Stripe, not on the site), I believe that Commerce can be used as a solution only requiring SAQ A compliance.It'd be great to get more opinions/advice on this because the project page doesn't even mention the option (it's new in 1.1, it seems). It works great, too! It should be made the default, I think!
Comment #18
torgospizza@wizonesolution: You are correct! As I had mentioned in #12 and #15, using the Checkout integration is the only way to get SAQ A compliance; using stripe.js will only get you as far as SAQ A-EP. It breaks down like this regarding the checkout form - that is, the actual text field input where the card data is entered by the customer:
- Is the form created by the site? If so, it qualifies for SAQ A-EP.
- Is the form hosted offsite such as with Stripe Checkout (a popup widget served through an iframe), or a 3rd-party "Hosted Checkout Pages" (or forms)? That qualifies for SAQ A.
I'm 99.99999% confident that this is the answer. In fact after doing some research I even found out that Braintree is now offering Hosted Fields which sounds like an interesting mix of the best of both worlds, as it actually gets you SAQ A compliance while keeping the payment form "on your site" 1. Might be worth checking out - and hopefully Stripe will add something like this to their toolbox.
I agree that having this clarified on the project page, while also mentioning new Checkout integration, will probably be very helpful for site merchants.
1 Note that the form for Hosted Fields would not literally be on your site, it would just appear to be.
Comment #19
ahillio commentedI appreciate this discussion, it helped me have confidence in using Stripe's "Checkout with Drupal Commerce and to understand these PCI compliance details more thoroughly.
Is Stripe.js not doing the same thing as Braintree's "hosted fields"?
That's what it sounds like according to https://support.stripe.com/questions/what-about-pci-dss-3-1 (which was linked to in comment #11). They explicitly say they reworked stripe.js so that people using it don't have to comply to SAQ A-EP:
As acknowledged here, "transmission of data" is just part of the issue... but are not the other factors covered by the credit card data being served via the iframe? Maybe they just should have written that sentence better?
If Stripe.js falls under SAQ A-EP then it seems to me that:
- we're saying their Qualified Security Assessor is wrong and ill-advised them, or that..
- stripe.js is SAQ A-EP when implemented **in Drupal** because the Form API creates the credit card fields instead of allowing stripe.js to create them in an iFrame.
Back in #9 it was said that "this is not a Drupal thing" and that any credit card form that's not 100% outsourced is A-EP... but Stripe makes it sound like their stripe.js does outsource the card form 100%.
Could someone clarify that?
I don't understand the code well enough to suss this out myself, I'm just trying to reason around what's being said.
Thanks for all the discussion so far,
Alec
Comment #20
torgospizza@ahillio: You know what, I think you're totally right.
Braintree has also updated their documentation to explain that these are "small, transparent iFrames that replace the sensitive credit card inputs in your checkout flow". This makes my own understanding even clearer, and I think negates what I had said previously about SAQ A-EP only being available if we are using the "stripe.js" method at Checkout.
That being said I'm satisfied that using stripe.js allows a site to be SAQ A compliant without having to resort to Checkout, which is excellent. Maybe we can finally put this issue to bed!
EDIT: Or not.
The way Braintree's transparent iFrames work is you need to modify your form's markup, replacing input fields with div tags instead. So we'll probably need to update Commerce Stripe to not use input fields for its forms in order to be SAQ-A compliant using stripe.js - I'll try to dig in a bit to see if that's the case. (Their documentation is somewhat lacking in a few areas.) I've also sent them an email for a clarification on this point.
Comment #21
wizonesolutionsYeah, the thing with Stripe.js and SAQ A-EP seems to be visual as well. If the site appears to be providing payment forms, even if it technically doesn't, then it seems like they want you to use SAQ A-EP.
I noticed that I forgot to share a FAQ from the PCI Council itself that I managed to find a while ago and which made me feel confident using Stripe Checkout. It is the clearest answer I have seen:
https://pcissc.secure.force.com/faq/articles/Frequently_Asked_Question/W...
It does seem like if Stripe.js can somehow provide a solution that fully uses an iFrame to provide the entire payment form such that no data is posted from the merchant website to Stripe, then it could be SAQ A. Otherwise, A-EP. That has been my reading.
And FWIW, I've also read articles saying that Braintree's Hosted Fields would fall under A-EP -- unless they are replacing the
<div>outright with an iFrame, I guess.Comment #22
torgospizzaThat's exactly what they require you to do before you can use Hosted Fields in an SAQ-A compliant scenario. (See my link above.) Removing the input fields so they are not generated "by your site" still appears to be a requirement in order to reach that level of compliance, so that's what Braintree's system requires. Then (I assume) the div tags are essentially taken over by their javascript which injects an iFrame containing input fields of their own.
This differs from what Commerce Stripe does, which is essentially nothing in the form of modifying our own site-generated form markup. I'm still waiting to hear back from them to see if that's a step one actually needs to take to become SAQ-A compliant.
Comment #23
torgospizzaResponse from Stripe. It's literally the same form letter as what Adam Wood posted in #2 with a few additions based on comments I had about specific aspects of their system:
I guess this does clear things up. With Hosted Fields from Braintree, they have you change the markup to regular div instead of input fields, whereas Stripe does not have this requirement. That's the part that still concerns me, since the PCI documentation does make mention of the fields themselves being key; I would love to get an unbiased opinion from a 3rd party, but so far this is the best I can do. If I can get some additional color like that from someone who is not actually paid by Stripe I'll post that here.
Comment #24
ahillio commented@torgosPizza thanks so much for continuing to investigate this!
Comment #25
wizonesolutions@torgosPizza: From a rickmanelius blog post:
I'm pretty sure Stripe.js does not enclose the form within an iFrame, correct? But Stripe Checkout does.
Comment #26
torgospizza@wizonesolutions: Right, exactly. Stripe's response was basically "We 'transfer all data' through an iFrame that is appended to the end of the JS file." I still don't quite understand how that gets you anything more than SAQ A-EP but there you go.
Comment #27
midix commentedYes, this is what makes me concerned, too. It's mostly for technical reasons. Leaving serious hacking aside (phishing sites etc.), let's take a look at standard Javascript & iframe security as implemented by well-behaved browsers.
In case of Braintree, if the input elements are created inside iframes which are being created by Braintree.js, then there is no way for any Javascript code originating from your web domain to access the values in the input elements (unless the iframe itself implements a backdoor - JSONP, iframe proxying - which gives access to its contents from the domain of your website, and I'm somewhat sure that Braintree iframe does not do that because that would defeat the purpose).
I don't have experience with Stripe's Direct-Post, but if I understand it correctly, it is using input elements created by *your* website (Drupal or whatever) and then sends the values through iframes. But technically it means that the input values entered by the end-user are available to Javascript code (at least for some time period) on your website and you can harvest them without user's consent! This is what makes me highly doubt SAQ A compliance of Stripe's Direct-Post solution.
But PCI specification has an ambiguity. Quoting:
What do they mean by "any element"? This could be interpreted as not only "input element", but also as labels, icons etc., which means that Braintree's solution with Hosted fields might also be out of SAQ A. Even worse - why "payment page" and not just "payment form"? This makes it impossible even embedding iframe into your custom payment page because, well, that's still a page coming from your server.
And, of course, the following quotes also lead to ambiguity:
PCI specification does not say that if their SAQ A-EP examples are modified to send data through iframes, they suddenly become SAQ A compliant. Even in Braintree's Hosted Fields there is still that Javascript running and creating the iframes inside the form and managing how the data is transmitted to the payment processor.
What's worse - even if the full iframe with all inputs originating from the payment processor is created by a Javascript code on a merchant's website, this is still ambiguous.
So, which approach does count for "Merchant website creates the payment form" and which does not? Confusing and prone to interpretations. PCI specification should be more specific about it.
I'd say, that currently the only way covered by SAQ A is the good old iframe (and the best way to create it directly in HTML without involving any Javascript) with all form fields, labels and icons coming from fully PCI DSS 3.2 compliant payment processor. Yeah, this is so old-fashioned, but considering all those PCI documentation ambiguities, this is the safest way.
Comment #28
torgospizzaI'm not sure why this popped up as "new" but I suppose it's time to close this out.
From what I understand:
Stripe claims that they do transfer all sensitive information via an iFrame in Stripe.JS, which allows for SAQ-A. However, I don't know how that's possible, since Drupal is (in this case) the creator of the credit card form fields, which automatically relegates us to SAQ A-EP according to the PCI DSS v.3 spec. For true SAQ-A support I would recommend using our module's Stripe Checkout integration, which provides a pop-up widget that is hosted by Stripe. That allows shop owners to have the highest security without requiring users to leave the site.
Ideally, Stripe will introduce something similar to Braintree's Hosted Fields solution, which essentially replaces card form fields with iFrames styled to look like fields, resulting in a truly SAQ-A compliant credit card form.
In this case, though, I would say we can definitely guarantee SAQ A-EP with Commerce Stripe by default, but it is possible to achieve SAQ-A with Checkout.
If anything changes or anyone has anything else to add, please feel free to create a new issue.
Comment #30
jonathanshawAs this is linked from the module home page, it would be helpful to have a comment or link explaining what the D8 situation with this is.
Comment #31
colan#30: You may want to open a new issue for that as this one is closed.