By: luke meyers user 27 Jun 2017 at 2:01 p.m. CDT

2 Responses
luke meyers gravatar
Hey there I have oxd server up and running on the same server as Kong, after enabling the kong-uma-rs plugin in config file in etc, I tried to activate the plugin via the following curl command ```bash curl -i -X POST \ --url http://localhost:8001/apis/redacted_id/plugins/ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data 'name=kong-uma-rs' \ --data "config.oxd_host=localhost" \ --data "config.oxd_port=8099" \ --data "config.uma_server_host=https://auth.my_redacted_url.com" \ --data "config.protection_document={\"resources\":[ { \"path\":\"/\", \"conditions\":[ { \"httpMethods\":[\"POST\"], \"scopes\":[ \"https://my_redacted_url.com\" ] }]}]}" ``` At first, the lua runtime was giving me missing library modules related exceptions. After fixing those it is now complaining of the following: ```bash *21203 lua coroutine: runtime error: /usr/local/share/lua/5.1/kong/dao/schemas_validation.lua:62: attempt to index local 'schema' (a userdata value) stack traceback: coroutine 0: /usr/local/share/lua/5.1/kong/dao/schemas_validation.lua: in function 'validate_entity' /usr/local/share/lua/5.1/kong/dao/schemas_validation.lua:186: in function 'validate' /usr/local/share/lua/5.1/kong/dao/model_factory.lua:27: in function 'validate' /usr/local/share/lua/5.1/kong/dao/dao.lua:118: in function 'insert' /usr/local/share/lua/5.1/kong/api/crud_helpers.lua:167: in function 'post' /usr/local/share/lua/5.1/kong/api/routes/apis.lua:48: in function </usr/local/share/lua/5.1/kong/api/routes/apis.lua:47> coroutine 1: ``` I was wondering if you guys had any insight as to what is causing this?

By William Lowe user 27 Jun 2017 at 2:08 p.m. CDT

William Lowe gravatar
Meg, Can you try and replicate this issue and then report your findings, as well as any improvements that need to be made to the docs / plugin ? Thank you, Will

By Meghna Joshi staff 29 Jun 2017 at 7:06 a.m. CDT

Meghna Joshi gravatar
Hello luke, I think you don't need to pass header for configured kong-uma-rs. For example, you can see the kong-uma-rs configuration. https://github.com/GluuFederation/kong-plugins/tree/master/kong-uma-rs#enable-kong-uma-rs-protection Request should be like this: ``` curl -i -X POST \ --url http://localhost:8001/apis/redacted_id/plugins/ --data 'name=kong-uma-rs' \ --data "config.oxd_host=localhost" \ --data "config.oxd_port=8099" \ --data "config.uma_server_host=https://auth.my_redacted_url.com" \ --data "config.protection_document={\"resources\":[ { \"path\":\"/\", \"conditions\":[ { \"httpMethods\":[\"POST\"], \"scopes\":[ \"https://my_redacted_url.com\" ] }]}]}" ``` Let me know if you still face any issue. Thanks, Meghna