APN service private keys - dealing with the 2-key limit

In my organization we limit the ability for any production-use private credentials from being used in a developer environment. This creates a challenge with APNs keys due to their apparent intended use being a single key across all apps of the org, with the 2nd allowed key being only for the key rotation use case.

One idea I have to satisfy all concerns is to take advantage of the two key limit in a slightly different way:

  • Generate the maximum two keys, and use one for dev environments and one for prod environments (with the key being secured according to our policies so that developers never get to see it).
  • If we need to revoke the prod key at any point, we revoke the dev key, regenerate it and make that one the new prod key. Likewise, once that key is deployed in prod, revoke the old prod key and make that the new dev key.

Does this seem like a viable approach? Are there any better ways to achieve a fully isolated setup where the production APNs key doesn't appear on a developer environment?

So, the idea I propose above isn't particularly viable, since we'd still be left with a key in the dev environment that can be used to send production pushes.

So, what are the options here for isolating production keys? This seems like a very odd decision by Apple to not provide the ability to create a key that can only be used for sandbox pushes, unless I'm missing something.

APN service private keys - dealing with the 2-key limit
 
 
Q