We have two connected apps that are part of a managed package that is up for review. One app is used for API access to Salesforce from an external web platform, and the other is used as a CanvasApp to embed the external web platform directly into Salesforce.

Our security review failed because we didn't follow Insecure Storage of Sensitive Data security measures on the consumerKey of the Connected App.

The connected app XML had the consumerKey in it (where "WholeLongExposedConsumerKey" had the actual key):

<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <contactEmail>[email protected]</contactEmail>
    <label>Connected App 1</label>

...and they noted:

In both ConnectedApp1 and ConnectedApp2, the consumerKey is stored insecurely


  1. As far as I know, you can't hide the consumerKey from the connected app metadata, nor can you change it (i.e. try encrypting it, etc) as it is read-only. Could this be a potential false positive? Our connected app settings demand the external platform to also provide the secret key, which is not exposed at all.

  2. If it's not a false-positive, how would I securely store this consumerKey considering that I have no control over it?

  3. Do I have to come onto a whole different authentication approach just to have this pass the security review?

I'm hoping (3) isn't the only option, as we already have a stable working package as is.

2 Answers 2


We use Connected Apps as you describe them, but we don't actually include them in the package (they don't need to be included for a customer to be able to utilize them in my experience) and our apps passed without issue. So that might be an option - just remove them from the actual package.

But it also sounds like a false positive, because the Consumer Key isn't considered sensitive in my experience - we use it in URLs for oauth flows. so I would also suggest scheduling Office Hours with the SR team to see what they suggest, or try posting in the Security Review group in the Partner Community

  • Thanks! For our Canvas App, I doubt we'd be able to leave that out of the package, since it's core to the whole package. I'll post on the Security Review group and see what they say Aug 14, 2019 at 16:05

The Security Review team got back to us. The consumerKey that's being stored in the Connected App metadata is a false-positive and they disregarded it in the re-submission.

It's worthwhile to just document that you're aware of the exposed consumerKey and that it's not sensitive data that needs to be hidden.

  • 1
    Be sure to mark this as the answer!
    – Mark Pond
    Aug 28, 2019 at 23:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .