Relationship between cloud id and client key

Hi,

We’re wondering what the relationship is between client key in Connect and the cloud id? Cloud id being the id you get for your OAuth accessible Jira Cloud resource through https://api.atlassian.com/oauth/token/accessible-resources

We know that client key will never change for a given instance so we use this to key off details about a tenant. We’re hoping to store cloud id against a tenant’s client key when a user wants to use 3LO authorization to make calls to their Jira Cloud instance.

We were wondering if there were any circumstances where cloud id would change? Is it safe to combine client key and cloud id to reference the same Jira instance?

Thanks,
Adam

3 Likes

Hi @adam.markham,

There’s no formal relationship per se. The concept of cloudId came out a long time after clientKey. The cloudId identifies a bundle of product hosts whilst clientKey identifies a single product tenant. I’m using the term “host” to refer to a virtual server, the URL of which can mutate. A tenant logically mutates when a data import occurs and so does the associated clientKey. If you commission a new cloud bundle at http://go.atlassian.com/cloud-dev, then each of the product tenants within that bundle will have different clientKeys. Connect doesn’t include cloudId in its API since apps are installed against a single tenant rather than a set of tenants. You should use clientKey as the identifier of a single product tenant.

Regards,
Dugald

2 Likes

Hi Dugald,

Thanks for the clarification. In the end we did not make any link between cloudId and clientKey as it seems have no formal relationship.

Thanks,
Adam

1 Like

Following on from this @dmorrow - has any progress been made within Atlassian regarding apps receiving new clientkeys for a “host” whenever an import is made into that “host”?

In reality, given that both the URL can change, and the clientKey can change, we have no uniquely identifiable value to use as a key when storing data for a customer…

1 Like

Hi @jbevan ,

Are you referring to https://ecosystem.atlassian.net/browse/AC-1528? If not or if you believe it requires a discussion, then maybe you could start a new topic?

Regards,
Dugald

1 Like

Yes thanks, I hadn’t seen that