On Fri, 2018-07-13 at 01:43 -0700, ujjawal sharma wrote:
> Thanks a lot for the wonderful info, can you please also let me know
> what i am doing wrong with the query for enabling the authorization
> plugin:
>
> docker run --publish=80:8042 --publish=104:4242 --env
> AUTHZ_ENABLED=true osimis/orthanc
>
> It seems it should enable the authorization but the log that continue
> the command says:
>
> No section "Authorization" in the configuration file, the
> authorization plugin is disabled"
Yes, I encourage you to read the notes below the reference
documentation linked previously to understand why that is. We're
struggling to explain these behaviors more helpfully while still being
correct and complete, so feel free to ask more specific questions and
provide feedback on the text.
The short story is: X_ENABLED settings merely *force* the plugins to
run even without a configuration file (useful only if you're providing
configuration yourself *and* you're not using the default configuration
file name). If you want to generate a configuration file (here, you
do), specify any setting or use AUTHZ_BUNDLE_DEFAULTS to use default
values for all settings (in this case the latter is impossible since
there is at least one mandatory setting with no default value).
So, to summarize, in your scenario, you need only specify the
AUTHZ_WEBSERVICE setting at a minimum (because it is mandatory, as
described in the reference documentation). The AUTHZ setup procedure
will then generate the appropriate configuration file for you and
Orthanc will pick it up.
docker run --publish=80:8042 --publish=104:4242 --env AUTHZ_WEBSERVICE=
http://my.authz.service.example/ osimis/orthanc
It's likely you'll want to specify other settings (e.g. to pass tokens
to the authorization service and/or to refine the access control
policy).