Draft — written for COOP-1389. Replace x.y.z with the version that ships the COOP-1389 fix before publishing.
Symptoms
When you click Test connection on a URL datasource, or when an Elements Connect field connected to this datasource is displayed or edited, you get the following error:
Datasource connection test failed : 'The access to the URL is forbidden because it is not allowed on this server.'
The datasource worked with Elements Connect 8.0.1 or earlier and stopped working after an upgrade to 8.0.2 or later.
Cause
Since Elements Connect 8.0.2, URL datasources are protected against Server-Side Request Forgery (SSRF): Elements Connect refuses to call a URL whose host name resolves to an internal address. This prevents a datasource from being used to reach services that are only exposed inside your network.
The following addresses are considered internal:
|
Range |
Description |
|---|---|
|
|
Loopback ( |
|
|
Private networks |
|
|
Link-local |
The check is applied to the URL of the datasource and to every HTTP redirect it follows.
Cloud provider metadata endpoints (169.254.169.254, 100.100.100.200, fd00:ec2::254) are always refused, as they can expose the credentials of the server hosting Jira.
Resolution
Elements Connect 8.0.4 or later
If the remote service is a trusted internal service, allow its URL in Jira's allowlist:
-
Go to Jira administration › System › Allowlist.
-
Add a rule matching the URL of your datasource, for example the wildcard expression
https://myserver.mycompany.com/*. The rule must match the full URL called by Elements Connect, which is the datasource URL followed by the field query. -
If the remote service redirects to another internal host, add a rule for the redirect target as well.
-
Go back to the datasource and click Test connection.
See Atlassian's documentation: Configuring the allowlist.
Cloud provider metadata endpoints cannot be allowed, even with an allowlist rule.
Elements Connect 8.0.2 or 8.0.3
These versions do not support Jira's allowlist: an internal URL cannot be allowed. Upgrade Elements Connect to 8.0.4 or later, then follow the steps above.
Related problem: the remote service rejects the request (401 / 403) once the URL is allowed
If your datasource sends credentials in custom Request headers (for example an API key header), note that Elements Connect 8.0.2 to x.y.z (excluded) only sent the Accept, Content-Type and Authorization request headers and silently dropped the others. Upgrade Elements Connect to x.y.z or later to have all your request headers sent again.
See Configure a URL datasource for the headers that are never sent.