OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
130 stars 169 forks source link

Sample_settings.xml authentication query should better match the Basic Security Configuration wiki page #2392

Closed amarsan closed 4 weeks ago

amarsan commented 2 months ago

This a companion issue to https://github.com/OHDSI/webapi-wiki/issues/10

Expected behavior

The security.db.datasource.schema and authentication query should match the schema, table, and column names that are recommended in the Basic Security Configuration wiki page.

<security.db.datasource.schema>atlas-security</security.db.datasource.schema>
<security.db.datasource.authenticationQuery>select password,firstName,middleName,lastName from ${security.db.datasource.schema}.users where username = ?</security.db.datasource.authenticationQuery>

The wiki page recommends that we do not put the security table in the webapi schema, so the security.db.datasource.schema node should be updated accordingly.

The wiki page recommends naming the table demo_security, but I noted in the referenced webapi-wiki issue that the name users makes more sense, so I think we should continue to use that here.

The wiki page recommends having a column called username, rather than email, so that should be fixed.

Actual behavior

<security.db.datasource.schema>${datasource.ohdsi.schema}</security.db.datasource.schema>
<security.db.datasource.authenticationQuery>select password from ${security.db.datasource.schema}.users where lower(email) = lower(?)</security.db.datasource.authenticationQuery>

Steps to reproduce behavior

N/A

chrisknoll commented 2 months ago

Agreed, we shouldn't put an example settings that conflicts with the documentation recommendation.