Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extauth plugin and api_product_list check in oauth plugin #149

Open
bingqiao opened this issue Oct 3, 2019 · 0 comments
Open

extauth plugin and api_product_list check in oauth plugin #149

bingqiao opened this issue Oct 3, 2019 · 0 comments

Comments

@bingqiao
Copy link

bingqiao commented Oct 3, 2019

I'm trying to config microgateway to accept a third party JWT via plugin extauth.

The request passes extauth plugin without issue but fails in oauth plugin with 403 error below:

  plugin:extauth plugin onrequest +17s
  plugin:extauth Found jwt kid: thejwtkid +1ms
  plugin:extauth Found JWK +0ms
  plugin:extauth JWT Expiry enabled +6ms
  plugin:extauth JWT is valid +45ms
  plugin:oauth validating jwt +0ms
  plugin:oauth product only: false +23ms
  plugin:oauth no api product list +0ms
  plugin:oauth** auth failure 403 access_denied  { host: 'host.domain.name',..}

What failed is the following check in oauth.checkIfAuthorized;

    if (!decodedToken.api_product_list) {
        debug('no api product list');
        return false;
    }

The oauth plugin is looking for api_product_list property in decoded JWT. Well, doesn't this defeat the purpose of using extauth plugin unless there is something wrong in my setup? That property won't exist in third party JWT.

Any suggestions?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant