Does the client key and secret share with 2 different org

Hi,

We are on-prem apigee 4.16.09. We have one infrastructure setup. And we have 2 org created.

It seems the clientID and clientSecret are shared across different orgs

For example, in Org A we have an app with client Key=KeyA and ClienSecret=Secret, in org B we found we cannot create an app with the same key/seret.

Is this right?

Thanks

Solved Solved
0 8 410
1 ACCEPTED SOLUTION

Hello @hanzhang Yes. Client ID & Secret are unique and associated to a Org. However if you have a requirement to create an App in Org-B with same keys, you could follow these steps.

View solution in original post

8 REPLIES 8

Hello @hanzhang Yes. Client ID & Secret are unique and associated to a Org. However if you have a requirement to create an App in Org-B with same keys, you could follow these steps.

Hi, @sudheendra1

What is the parent Org? We tried, but it doesn't work.

So this is how we do:

1.In OrgA, we create an app: APP-A which has client ID & Secret: ID1, Secret1

2. In orgB, we create an app :APP-B which client ID & Secret ID1, Secret.

When we try to update the APP-B with the client ID and Secret, we got ConsumerKey already exists error

I know they are in totally seperated Organization, why they are shared?

Thanks

I meant they are associated to a single Org. What API did you use to update App-B with Client ID & Secret?

Thats what I think too. each app should tie to its own organization. But its not.

You can do a quick test

1. In org A create an app and generate id=1and secret=1

2. In org B create an app.. then use below API to add the id=1 and secret=1 from the app in org A

https://api.enterprise.apigee.com/v1/organizations/{organization}/developers/{developer_email_or_id}...

This is what i got

{ "code": "keymanagement.service.ConsumerKeyAlreadyExists", "message": "ConsumerKey already exists", "contexts": [] }

So we are using on-prem installation 4.16.09

Thanks

I was able to import new keys with this API. Can you share your entire CURL command, including HTTP method and payload? You can mask the key/secret values.

Hi, @sudheendra1

What do you mean new keys?

You should import the keys from an app that in a different organization.

In above senario, once we create the app in org B, we tried to impor the ke/secret that comes from the app in org A.

Thanks

Sorry, I miss-understood your question. Yes, Client-ID & Secret are unique in an Edge installation across Orgs. That means, if you have two Orgs, then you can share API keys across Apps. If you install Edge separately, then you can import keys using the above API.

So client-id and secret will be unique in one Edge installation.

How about OAuth tokens? are they shared as well in one edge installation?

Thanks