By: Christian Garcia user 04 Jul 2018 at 9:33 a.m. CDT

5 Responses
Christian Garcia gravatar
Hello, Trying to test our API created using Konga UI, we are getting following error as response. We added header "Authorization: Bearer ..." Response: 401 Unauthorized { "message": "Unauthorized! gluu-oauth2-client-auth cache is not found" } Could you guide us to understand what is happening? Is it a configuration API problem? or an installation problem with GG?. We know this a problem found in gluu-oauth2-client-auth Plugin code, but we have no idea how to fix it. Thanks! Regards, Christian

By Michael Schwartz Account Admin 04 Jul 2018 at 12:58 p.m. CDT

Michael Schwartz gravatar
Meg, please suggest.

By Meghna Joshi staff 04 Jul 2018 at 9:21 p.m. CDT

Meghna Joshi gravatar
Hello Christian, 1) I think, you forgot one step in plugin configuration i:e `Enable gluu-oauth2-client-auth protection`. Please follow the step in docs. [https://gluu.org/docs/gg/3.1.3/plugin/gui/#enable-gluu-oauth2-client-auth-protection](https://gluu.org/docs/gg/3.1.3/plugin/gui/#enable-gluu-oauth2-client-auth-protection). This is happens when you only enable gluu-oauth2-rs plugin. gluu-oauth2-rs plugin depends on gluu-oauth2-client-auth. You need to configure both plugin, [gluu-oauth2-client-auth](https://gluu.org/docs/gg/3.1.3/plugin/gui/#gluu-oauth-20-client-credential-authentication) and [gluu-oauth-rs](https://gluu.org/docs/gg/3.1.3/plugin/gui/#gluu-oauth-20-uma-rs-plugin). 2) If you already enabled gluu-oauth2-client-auth plugin, please send [kong log file](https://gluu.org/docs/gg/3.1.3/logs/). /usr/local/kong/logs/error.log Thanks, Meg

By Christian Garcia user 05 Jul 2018 at 5:26 p.m. CDT

Christian Garcia gravatar
Hello Meg, Thank you for your response, this solve problem described. I have another question: I'm adding Security ("OAuth Scope Security") to my API, but I can't find a way to protect a Path that has dynamic URL. For instance, if I want to make a PUT to a table in my DB, I need to send with url the ID of row that I want to update, something like: https://../person/CipB3LxU2M. This ID is completely random, so there is no way to create exact match path to protect it. I know I can protect https://../person but for those dynamic urls relative to this path, I can't find a way to accomplish this. I found in documentation: https://gluu.org/docs/gg/plugin/gui/ - OAuth Scope Expression --path - a relative path to protect **(exact match)** --httpMethods - GET, HEAD, POST, PUT, DELETE --scope - the OAuth scope required to access the given path According to this, path must be exact. So, could you help us to find a solution for this scenario? Regards, Christian

By Michael Schwartz Account Admin 06 Jul 2018 at 9:34 a.m. CDT

Michael Schwartz gravatar
Christian, Thank you for trying the obvious. Somehow this was missed in the development and QA process. We're going to push a fix next week. - Mike

By Christian Garcia user 06 Jul 2018 at 9:53 a.m. CDT

Christian Garcia gravatar
Mike, Excellent, thank you! Regards, Christian