Issue
-
Facing following error while authorizing analytics data source for liferay instance.
Redirect URL https://super7-uat.cloud.coolfurnace.net/web/super7/super7-login?p_p_id=com_liferay_oauth2_provider_web_internal_portlet_OAuth2AuthorizePortlet&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1 is not allowed
2020-01-08 09:37:02.059 WARN [https-jsse-nio-443-exec-9][PortalImpl:1004] Redirect URL https://super7-uat.cloud.coolfurnace.net/o/oauth2/authorize/decision is not allowed
Environment
- Liferay 7.1
- Analytic Cloud
Resolution
-
These warning messages are being shown due to the fact that some of the IPs in use to generate some redirect URLs (mainly for back buttons) were not configured in the portal property
redirect.url.ips.allowedwhenredirect.url.security.modeis set to ip or, alternatively, some domains were not configured in the portal propertyredirect.url.domains.allowedwhenredirect.url.security.modeis set to domain
From a functional point of view, this might cause that some back buttons are not properly working.
In order to prevent these warning messages you should configure those properties taking into account the following article Errors-and-Redirect-Issues-While-Using-the-Control-Panel
If you decide to configure allowed redirect URLs by IP, you should include the IPs of all node balancers. In case you decide to configure this by domain, you should include all domains that could be subject to a redirection. -
Even after setting the above properties there may be errors at next step saying "Authentication Failed" and "a server error occurred while connecting to your datasource". To resolve this check ifthe following Scopes checked under the scopes tab?
- analytics.read (alternatively everything.read)
- analytics.write (alternatively everything.write)
- Check mark "create/update/delete data on your behalf"
- Check Mark "download documents and images"
- Save changes