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

4 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 Sign up - Try Atlassian Cloud | Atlassian, 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

4 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 [AC-1528] - Ecosystem Jira? 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

Just starting to look at this, so I might be making a naive request here.

I currently have a Connect app and am building a second app on Forge. Since we’ve written both ourselves, they have shared secrets and can trust each other.

I need a way for my Connect app to tell my Forge app “Hey I have an event pertaining to {JIRA instance}” and visa versa. I think I need some kind of translation between clientKey and cloudID.

Is that possible currently? Is there a better way for a Connect app and a Forge app to communicate about a shared customer?

It’s available via:

Note, get the cloudId for a Jira instance by calling https://your-domain.atlassian.net/_edge/tenant_info.

From https://developer.atlassian.com/cloud/jira/software/rest/intro/#introduction

3 Likes