Alain,
I have gotten a little further, but the POST instances/ is still responding with 403.
- I changed my docker image from
jodogne/orthanc-plugins
to orthancteam/orthanc:25.2.0
which is used the in the examples you provided.
- I updated my orthanc.json to
"AuthenticationEnabled": false,
"RegisteredUsers": {
"user1": "user1",
"user2": "user2",
"admin": "admin"
},
"Authorization" : {
"WebServiceUserProfileUrl" : "http://my-auth-server:3000/api/auth/user/get-profile",
"WebServiceTokenValidationUrl" : "http://my-auth-server:3000/api/auth/verify-access",
"TokenHttpHeaders" : [ "token" ],
"TokenGetArguments" : [ "token" ],
"StandardConfigurations": [
"orthanc-explorer-2",
"stone-webviewer",
"dicom-web",
"ohif"
],
"CheckedLevel" : "studies"
},
"OrthancExplorer2": {
"Tokens": {
// experimental, set it to false when using basic-auth together with the auth-plugin (https://discourse.orthanc-server.org/t/user-based-access-control-with-label-based-resource-access/5454)
"RequiredForLinks": false
}
},
NOTE: the sample at orthanc-setup-samples/docker/access-control-user-profiles/docker-compose.yml at master · orthanc-server/orthanc-setup-samples · GitHub shows “AuthenticationEnabled”: true. But if I set this in my config I see errors on starting container and it keeps rebooting
3. I attempted to implement all the auth paths, not just ‘user/get-profile’ and ‘tokens/validate’, but that did no seem to help.
If I call GET instances/ I can see my user/get-profile
route being hit. But If I call POST instance. I just see this message in the orthanc logs, it does not attempt to hit my ‘user/get-profile’ route.
HTTP-1 PluginsManager.cpp:162] (plugins) Testing whether anonymous user has any of the required permissions ‘all|upload’
Here is the JSON I am currently returning from my user/get-profile
route.
const response = {
name: 'test',
'authorized-labels': ['*'],
permissions: ['all', 'view', 'upload'],
validity: 60
}
It seems as if I am missing some configuration that is needed so the POST uses my auth webhooks.
Also, now in my app, when I attempt to view a file http://viewer.test.localhost/ohif/viewer?StudyInstanceUIDs=1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.6&token=xxxx
I get the following response, which I assume is because I changed container images. The jodogne/orthanc-plugins
seems to have OHIF plugin configured but does not have the good logging I see in orthancteam/orthanc:25.2.0
(but the orthancteamc does not come configured with OHIF plugin). I was using the same orthanc.json file for both images.
{
"HttpError" : "Not Found",
"HttpStatus" : 404,
"Message" : "Unknown resource",
"Method" : "GET",
"OrthancError" : "Unknown resource",
"OrthancStatus" : 17,
"Uri" : "/ohif/viewer"
}
CONCLUSION
I just found my issue. The POST /instances did not like the token
as a param. I added the token
to my headers and it worked.
Testing with Postman, now I will move it into the application code and see if I can get all scenarios to work.
With all the information I have provided, can you suggest if I am using Orthanc and OHIF the best way possible. For example, the OHIF viewer took a good amount of reverse proxy custom configration to handle all the network traffic.
Any suggestion or recommendations are appreciated.