{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Microgateway /
avatar image
0
Question by Siddharth Barahalikar · Jun 15, 2017 at 08:01 AM · 310 Views oauth 2.0microgatewayjwt

Microgateway OAuth & Apikey plugin Query

Hi guys, I have few queries on OAuth & Apikey in MG,

1. After passing the OAuth Header in cURL I am getting 403 Forbidden

curl -i -H "Authorization: Bearer JWT" http://localhost:8000/hello/echo

HTTP/1.1 403 Forbidden
content-type: application/json
Date: Thu, 15 Jun 2017 06:44:15 GMT
Connection: keep-alive
Content-Length: 25


{"error":"access_denied"}

2. I re-generated the access_token(JWT),

curl -i -H "Authorization: Bearer newJWT" http://localhost:8000/hello/echo

HTTP/1.1 401 Unauthorized
content-type: application/json
Date: Thu, 15 Jun 2017 07:51:54 GMT
Connection: keep-alive
Content-Length: 25


{"error":"invalid_token"}

2. In the doc for implementing OAuth & Api we are adding same oauth plugin is to the plugins:sequence element. So by doing this when I call,

curl -i http://localhost:8000/hello/echo -H 'x-api-key: apikey12345'

HTTP/1.1 401 Unauthorized
content-type: application/json
Date: Thu, 15 Jun 2017 07:38:21 GMT
Connection: keep-alive
Content-Length: 84


{"error":"invalid_token"}

I am using the correct consumer key from App and have also added MG auth & hello proxies to a product. Am I missing something?

Without the oauth sequence I get 200OK and spike arrest plugin sequence works normally.

@Srinandan Sridhar

Primary use cases of MG
..
..
Continue processing messages if internet connection is temporarily lost.

Can someone explain about this?

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0
Best Answer

Answer by srinandans · Jun 15, 2017 at 03:30 PM

@Barahalikar Siddharth

Item #1: The very likely cause for this failure is an incorrectly created API Product. A microgateway API Product must have:

  1. edgemicro_* proxy
  2. edgemicro-auth proxy
  3. If you are adding resource paths, then be sure to include /** (for sub resources) and / (to access the base path itself).

Item #2: The invalid_token message appears when the JWT token is badly formatted.

Item #3: In this case, it appears the API Key was invalid.

Microgateway is designed to continue processing API traffic even if it looses connection to Apigee Edge (hosted on cloud or on prem).

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

58 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Calling health check endpoints with MG 3 Answers

MicroEdge, JWT and custom claims 3 Answers

There is a delay between generating a edgemicro token and using it. 1 Answer

Apigee Microgateway oauth password grant type authentication claims 1 Answer

Edge Microgateway support for multiple token verification keys 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges