We have an CA API Management deployment on several datacenters around the globe and have a few application that want to use our available global traffic management, thus traffic being redirected to closest datacenter depending on user's location.
We then have development environment, staging, and production, on each datacenter. Portal is also deployed on each environment (thus an overall 9 portals).
What we want is to have an application being deployed on each datacenter (with associated backends, etc), but for this we need to have obviously the same API key.
Is there a solution ?
If you haven't gotten any responses from other customers or Support people yet, then this may be because of the complexity and overhead involved in getting that scenario to work. I suspect it's quite possible, but it would be a very involved discussion with many details and would likely require some environmental configuration changes outside of the officially supported (QA'd) use-cases.
At this point, given the complexity of the project and uniqueness to this scenario, I recommend getting in touch with your CA Account Executive or CA Sales and inquire with them about hiring CA Services for this type of project work, as these types of projects are what CA Services specializes in.
But at an extremely high level, my initial thoughts are that this may be possible with the right use of both database replication and file system replication, and likely some environmental configurations outside of the Portal and Gateway nodes. I'm sure there is a lot more to it than just those three items though, and this is where CA Services can come in and assist.
I hope that helps at least point you in the right direction, even if it's not all that useful.
Sr Support Engineer, Global Customer Success
Phone: +1 800 225 5224 ,48385
Phone if outside North America - https://tinyurl.com/CAContactSupport
CA API Management Community: https://tinyurl.com/CAAPIMCommunity
Thx for the initial feedback.
We contacted our Account Exec in order to check what can be done.
Our initial findings is that Portal is only aware of apiKeys through Portal integration and use of CA Gateway API api/keys internal service.
apiKeys are indeed stored into the CA Gateway ssg database under table "generic_entity".
Relevant entry for Portal's published application: DengueApp2016Android.
in red the apiKey, in green the apiId, this app only consume one api, in purple the Service Id of the Policy.
Our assumption would be if modifying this field in database could do the trick.
<?xml version="1.0" encoding="UTF-8"?><java version="1.8.0_51" class="java.beans.XMLDecoder"> <object class="com.l7tech.external.assertions.apiportalintegration.server.apikey.manager.ApiKey" id="ApiKey0"> <void property="accountPlanMappingId"> <string>79</string> </void> <void property="customMetaData"> <string>
</string> </void> <void property="id"> <string>494ce6aaf2258b7e4a2bc4714f713c03</string> </void> <void property="label"> <string>DengueApp2016Android</string> </void> <void property="lastUpdate"> <object class="java.util.Date"> <long>1480414506923</long> </object> </void> <void property="name"> <string>l7xx6119f0dd88594c15aa4e41196a662229</string> </void> <void property="oauthCallbackUrl"> <string></string> </void> <void property="oauthScope"> <string></string> </void> <void property="oauthType"> <string></string> </void> <void property="platform"> <string>642e895c-1ca1-4929-886c-8e48b339c119</string> </void> <void property="secret"> <string>af30a9c70be048bd8642a7984826f7b5</string> </void> <void property="serviceIds"> <void method="put"> <string>f6062a71-9a67-4ec3-ad5d-9383351ba707</string> <string>1db2437af8b34992f57aedbb22fe27838f42d019</string> </void> </void> <void property="status"> <string>active</string> </void> <void property="valueXml"> <string></string> </void> <void property="version"> <int>4</int> </void> </object></java>
Ok it would seems in fact modification has to be done on Portal, database 'lrs'.
UPDATE lrsapplication SET appKey='l7xxwhatever', keySecret='eewhatever' WHERE title = 'myApplicationName';
then using admin panel, click on "Sync apiKeys from portal to gateway".
A simple script can then be written in order to grab apiKey/secret pairs from "reference" Portal to others.
Pending question: how to "Sync apiKeys" from within an external script. Is there a Portal API reference available somewhere or does a simple "curl" call would do the trick ?