Getting "Bad credentials" when signing in using Active Directory LDAP

Our researchers are suddenly getting “Bad credentials” when signing into Atlas using Active Directory LDAP in our test environment.

Not sure based on that, but possibly some cookie corruption in your browser, would you mind seeing if you could clear your cookies?


I get the same error message in Incognito…
Snapshots are from last Friday.

The hint is the error about ‘listener indiated an asynchronous response…’, but I haven’t seen that before. I did a google search on it:

Is it possible you have certain browser extensions that might be conflicting?

Is there anyone else in the community using Active Directory auth that can provide any hints if you’ve seen this error?

It isn’t the extensions, as omop PROD Atlas sign on works.
It also fails in firefox.
Might it be a problem with NPM in test ?

ATLAS Version 2.13.1 DEV Release Notes
WebAPI Version 2.13.0 Release Notes

We seem to be missing %CATALINA_HOME%\webapps\atlas\js\config-gis.js .
Is that important ?

No that is an optional extension that it is checking for. The message that it is not found is an unavoidable message.

So they also mention that is has to do with CORS request, which ensures that traffic to the server comes from a trusted source.

https://github.com/OHDSI/WebAPI/blob/master/pom.xml#L83 shows the paramater security.origin which should be set to the host name that matches the same domain as the host being requested by atlas. Is it possible that when you deployed to your non-prod env, you may have copied the prod configuration and didn’t change this option?

We build test using ldap://adpdc01.urmc-sh.rochester.edu:3268 as security.ad.url, while production uses ldap://ldap.urmc-sh.rochester.edu:3268 . It appears that adpdc01 no longer pings, so I’ve changed settings.xml to use the production value.

However, mvn clean package -DskipTests -s WebAPIConfig/settings.xml -P webapi-postgresql now fails to build.

Error reported:

Test set: org.ohdsi.webapi.service.CohortResultsServiceTest

Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.344 sec <<< FAILURE! - in org.ohdsi.webapi.service.CohortResultsServiceTest
prepareGetTimeToEventDrilldown(org.ohdsi.webapi.service.CohortResultsServiceTest) Time elapsed: 0.046 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<…ion_id,cast(casewhen[isnumeric(stratum_2)=1thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1805groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_2)=1thenstratum_2elsenullendasint))t0wherecast(casewhenisnumeric(stratum_1)=1thenstratum_1elsenullendasint)<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1unionselectt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_id,30t1.stratum_1asduration,total.count_value-sum(t1.count_value)over(partitionbyt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_idorderby30t1.stratum_1asc)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1,max(count_value)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,row_number()over(orderbyanalysis_id)asstratum_1,0ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806unionselectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_2)=1thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_2)=1thenstratum_2elsenullendasint))t0wherecast(casewhenisnumeric(stratum_1)=1thenstratum_1elsenullendasint)<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1innerjoin(selectexposure_cohort_definition_id,outcome_cohort_definition_id,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1groupbyexposure_cohort_definition_id,outcome_cohort_definition_id)totalont1.exposure_cohort_definition_id=total.exposure_cohort_definition_idandt1.outcome_cohort_definition_id=total.outcome_cohort_definition_id),numerator_firstas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_1)=1thenstratum_1elsenullendasint)30asduration,count_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=12),numerator_allas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_1)=1]thenstratum_1elsenul…> but was:<…ion_id,cast(casewhen[analysis_id=1805thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1805groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=1805thenstratum_2elsenullendasint))t0wherestratum_1<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1unionselectt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_id,30t1.stratum_1asduration,total.count_value-sum(t1.count_value)over(partitionbyt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_idorderby30*t1.stratum_1asc)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1,max(count_value)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,row_number()over(orderbyanalysis_id)asstratum_1,0ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806unionselectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=1806thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=1806thenstratum_2elsenullendasint))t0wherestratum_1<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1innerjoin(selectexposure_cohort_definition_id,outcome_cohort_definition_id,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1groupbyexposure_cohort_definition_id,outcome_cohort_definition_id)totalont1.exposure_cohort_definition_id=total.exposure_cohort_definition_idandt1.outcome_cohort_definition_id=total.outcome_cohort_definition_id),numerator_firstas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=12thenstratum_1elsenullendasint)*30asduration,count_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=12),numerator_allas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=13]thenstratum_1elsenul…>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at org.ohdsi.webapi.service.AbstractServiceTest.assertSqlEquals(AbstractServiceTest.java:33)
at org.ohdsi.webapi.service.CohortResultsServiceTest.prepareGetTimeToEventDrilldown(CohortResultsServiceTest.java:89)

Any suggestions ?

The version of mvn is 3.8.4
The last time we built WebAPI 2.10.1 was 2/23/2022 .

2024-06-20 09:41:01.007 INFO Thread-8 org.springframework.context.support.AbstractApplicationContext - [] - Closing org.springframework.web.context.support.GenericWebApplicationContext@367f0121: startup date [Thu Jun 20 13:37:24 UTC 2024]; root of context hierarchy
2024-06-20 09:41:01.007 INFO Thread-8 org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup - [] - Stopping beans in phase 2147483647
2024-06-20 09:41:01.007 INFO Thread-8 org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup - [] - Stopping beans in phase 0
2024-06-20 09:41:01.007 INFO Thread-5 org.ohdsi.webapi.PostgresSingletonRule - [] - Shutdown singleton Postgres instance…
2024-06-20 09:41:01.007 INFO Thread-8 org.springframework.integration.endpoint.EventDrivenConsumer - [] - Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the ‘errorChannel’ channel
2024-06-20 09:41:01.007 INFO Thread-8 org.springframework.integration.channel.AbstractSubscribableChannel - [] - Channel ‘application:default:-1.errorChannel’ has 0 subscriber(s).
2024-06-20 09:41:01.007 INFO Thread-8 org.springframework.integration.endpoint.AbstractEndpoint - [] - stopped _org.springframework.integration.errorLogger
2024-06-20 09:41:01.023 INFO Thread-8 org.springframework.jmx.export.MBeanExporter - [] - Unregistering JMX-exposed beans on shutdown
2024-06-20 09:41:01.023 INFO Thread-8 org.springframework.jmx.support.MBeanRegistrationSupport - [] - Unregistering JMX-exposed beans
2024-06-20 09:41:01.023 INFO Thread-8 org.springframework.scheduling.concurrent.ExecutorConfigurationSupport - [] - Shutting down ExecutorService ‘taskScheduler’
2024-06-20 09:41:01.038 INFO Thread-8 org.springframework.scheduling.concurrent.ExecutorConfigurationSupport - [] - Shutting down ExecutorService ‘taskExecutor’
2024-06-20 09:41:01.882 INFO log:java.lang.ProcessImpl@770b8b05 java.util.Optional - [] - waiting for server to shut down… done
2024-06-20 09:41:01.882 INFO postgres-27bf77e5-49f0-477d-ba61-f1f82f6a76dd-closer com.opentable.db.postgres.embedded.EmbeddedPostgres - [] - 27bf77e5-49f0-477d-ba61-f1f82f6a76dd shut down postmaster in 00:00:00.867

Results :

Failed tests:
CohortResultsServiceTest.prepareGetTimeToEventDrilldown:89->AbstractServiceTest.assertSqlEquals:33 expected:<…ion_id,cast(casewhen[isnumeric(stratum_2)=1thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1805groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_2)=1thenstratum_2elsenullendasint))t0wherecast(casewhenisnumeric(stratum_1)=1thenstratum_1elsenullendasint)<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1unionselectt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_id,30t1.stratum_1asduration,total.count_value-sum(t1.count_value)over(partitionbyt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_idorderby30t1.stratum_1asc)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1,max(count_value)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,row_number()over(orderbyanalysis_id)asstratum_1,0ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806unionselectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_2)=1thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_2)=1thenstratum_2elsenullendasint))t0wherecast(casewhenisnumeric(stratum_1)=1thenstratum_1elsenullendasint)<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1innerjoin(selectexposure_cohort_definition_id,outcome_cohort_definition_id,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1groupbyexposure_cohort_definition_id,outcome_cohort_definition_id)totalont1.exposure_cohort_definition_id=total.exposure_cohort_definition_idandt1.outcome_cohort_definition_id=total.outcome_cohort_definition_id),numerator_firstas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_1)=1thenstratum_1elsenullendasint)30asduration,count_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=12),numerator_allas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenisnumeric(stratum_1)=1]thenstratum_1elsenul…> but was:<…ion_id,cast(casewhen[analysis_id=1805thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1805groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=1805thenstratum_2elsenullendasint))t0wherestratum_1<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1unionselectt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_id,30t1.stratum_1asduration,total.count_value-sum(t1.count_value)over(partitionbyt1.exposure_cohort_definition_id,t1.outcome_cohort_definition_idorderby30*t1.stratum_1asc)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1,max(count_value)ascount_valuefrom(selectexposure_cohort_definition_id,outcome_cohort_definition_id,row_number()over(orderbyanalysis_id)asstratum_1,0ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806unionselectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=1806thenstratum_2elsenullendasint)asstratum_1,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1806groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=1806thenstratum_2elsenullendasint))t0wherestratum_1<=10orcount_value>0groupbyexposure_cohort_definition_id,outcome_cohort_definition_id,stratum_1)t1innerjoin(selectexposure_cohort_definition_id,outcome_cohort_definition_id,sum(count_value)ascount_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=1groupbyexposure_cohort_definition_id,outcome_cohort_definition_id)totalont1.exposure_cohort_definition_id=total.exposure_cohort_definition_idandt1.outcome_cohort_definition_id=total.outcome_cohort_definition_id),numerator_firstas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=12thenstratum_1elsenullendasint)*30asduration,count_valuefromresult_schema.penelope_resultswhereexposure_cohort_definition_id=?andoutcome_cohort_definition_id=?andanalysis_id=12),numerator_allas(selectexposure_cohort_definition_id,outcome_cohort_definition_id,cast(casewhenanalysis_id=13]thenstratum_1elsenul…>

Tests run: 216, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:15 min
[INFO] Finished at: 2024-06-20T09:41:02-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project WebAPI: There are test failures.
[ERROR]
[ERROR] Please refer to E:\Git\OHDSI\WebAPI\target\surefire-reports for the individual test results.
[ERROR] → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

It’s supposed to be WebAPI 2.13.0 and Atlas 2.13.1 .

It’s running tests on your build, you can disable tests.

Add this to your settings xml when you build:

        <skipUnitTests>true</skipUnitTests>
        <skipITtests>true</skipITtests>

There is also a way to do this at the command line, but this is how I configure it in my own env.

Thankyou, we have it working now.