# Key Registry
In Enterprise Edition GCeasy, FastThread, HeapHero, ycrash APIs are invoked with one global api key. If you are planning to roll-out our service enterprise-wide, you might want to give unique api key for each organization in the enterprise. This approach will provide you with more granular control. If you decide to grant access or revoke an organization from accessing the service, then this granular control will be of help.
# File Location
You need to define key-registry.xml and drop it in the upload directory OR if you are using AWS S3 storage, then you can drop key-registry.xml in the yCrash AWS S3 bucket's root directory.
# Configuration
key-registry.xml file structure look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="f094a38e-c3eb-4c9a-8254-f0dd198245cc">org-1</entry>
<entry key="a094a38e-bd22-4c28-9698-819e3dvb1ea7">org-2</entry>
<entry key="b13a7988-824a-4177-823b-f0b97cre3920">org-3</entry>
</properties>
2
3
4
5
6
7
In this file, in the 'key' attribute, you can define your own unique api key and assign it to each organization. We recommend the api key to be a UUID, but it's up to you to choose the format. Make sure assigned keys are unique across the organizations.
If you would like to grant access to a new organization, then you will need to add a new 'entry' element to the key-registry.xml. If you decide to revoke permissions to any particular organization, then you need to remove that organization's 'entry' from the key-registry.xml file.
Note: This strategy can be used to avoid cross-pollination of data between data centers. Say your application is deployed on two data centers (San Francisco & London). You have deployed our tool in both the data centers. You don't want your servers in San Francisco data center to invoke our service running in London data center similarly vice versa. Then the above solution can be put in use. You can configure different key-registry.xml for each data center.
San Francisco datacenter key-registry.xml might look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="f094a38e-c3eb-4c9a-8254-f0dd198245cc">dc-1</entry>
</properties>
2
3
4
5
London datacenter key-registry.xml might look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="a094a38e-bd22-4c28-9698-819e3dvb1ea7">dc-2</entry>
</properties>
2
3
4
5
You need to configure all the servers in the San Francisco will invoke our service with api key "f094a38e-c3eb-4c9a-8254-f0dd198245cc". Similarly all servers in London datacenter to invoke our service with api key "a094a38e-bd22-4c28-9698-819e3dvb1ea7". Accidently if a server from San Francisco tries to invoke our service running in London then it's request will be rejected.