Story #8857
D1Client.getCN() always get the production cn on the CN Tomcat context
Start date:
2019-12-13
Due date:
% Done:
0%
Story Points:
Sprint:
Description
Today Val from ess-dive reported an issue that in the cn-stage environment, the rest call cn/v2/diag/subject
didn't return any group information for a user even though the cn/v2/accounts
call proves the user is in some groups.
After looking at the code, it seems suspicious that the cn/v2/diag/subject
uses the method D1Client.getCN().getSubjectInfo(subject)
to get the suer information. I guess it aways uses the production cn rather than the cn-stage. I put the property D1Client.CN_URL=https://cn-stage.test.dataone.org/cn
on the file /var/lib/tomcat8/webapps/cn/WEB-INF/classes/org/dataone/configuration/portal.properties
, then it works.
So we need to set up the property during our package building process.