Response status 403 forbidden python plugin ,and advanced authentification

Hi ,everyone,
I was unable to access the endpoint declared in my python script with this configuration.
[
“get”,
“^/tools/api/testing$”,
“all|download”
]

{
“roles” : {
“admin-role”: {
“permissions”: [“all”],
“authorized_labels”: [““]
},
“doctor-role”: {
“permissions”:[“all”],
“authorized_labels”: [”
”]
},
“external-role”: {
“permissions”:[“view”, “download”],
“authorized_labels”: [“external”]
}
}
}
this admin account has admin-role

what’s the prob here please ?!

Hi,

We won’t be able to help you without a minimal working example. I recommend you to start from this sample setup.

Best regards,

Alain

Sorry for the lack of understanding, I can’t send any more pics :).
I can’t access new endpoints created with a python script in postman, even if I add the ‘Bearer token’ to headers obtained from the keycloak, but it works in stone web viewer.
the permissions are correctly defined for orthanc auth plugin and orthanc auth service as mentioned before
For example, this route:
def OnRest(output, uri, **request):
pprint.pprint(request)
print(‘Accessing uri : %s’ % uri)
output.AnswerBuffer(‘ok\n’, ‘text/plain’)

orthanc.RegisterRestCallback(‘/(to)(t)o’, OnRest)

gives a request with status 403 forbidden

Thank you ,

Hello,

As explained by Alain, you’ll have to provide a minimal working example if you expect support.

Regards,
Sébastien-