Details
-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
-
Not defined
Description
What/Where is the issue ?
Since Optimize is now SpringBoot based, we try to enrich it with OAuth2 authentication by providing a spring bean that configures http security accordingly. In order to provide environment specific values, we use spring profiles. Our own settings we make in profiles with other names, i.e. not "platform". With this setting, Camunda still correctly recongnizes that it's running in a Camunda 7 environment. However, ERROR is displayed while loading UI (see below). A quick look into the class org.camunda.optimize.service.UIConfigurationService, method
determineOptimizeProfile reveals that the class requires the profile "platform" to be the only profile used. This makes using of multiple profiles impossible.
Environment: C7
Optimize version : 3.10.5
ES version :
OS + Browser version :
Steps to reproduce:
Include the SpringSecurity-lib and configure it in an appropriate way. (Thus gaining the SSO.)
Observed behavior:
While loading Optimize UI following ERROR is displayed:
10:06:54.270 [qtp1189317672-264] ERROR o.c.o.r.p.GenericExceptionMapper - Mapping generic REST error org.camunda.optimize.service.exceptions.OptimizeConfigurationException: Cannot configure more than one profile for Optimize at org.camunda.optimize.service.UIConfigurationService.determineOptimizeProfile(UIConfigurationService.java:104) at org.camunda.optimize.service.UIConfigurationService.getUIConfiguration(UIConfigurationService.java:54) at org.camunda.optimize.rest.UIConfigurationRestService.getUIConfiguration(UIConfigurationRestService.java:30) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
Expected behavior:
Application accepts multiple Spring profiles.
Additional Information:
Testing Notes:
- Using multiple Optimize profiles (any combination of "cloud", "ccsm", "platform") should NOT start Optimize
- Using any Optimize profile (any one of "cloud", "ccsm", "platform" or no profile) with any other profile (any string you want) SHOULD start Optimize