OAS endpoints does not support Auth0 JWT integration

Hello Tyk community,

How can we modify the API definition of a previously created / imported OAS using this endpoint “/tyk/apis/oas/import” ?

I am currently managing Tyk CE with OAS definition and its OAS Tyk endpoints, everything works fine, But while i am trying to integrate it with Auth0 JWT it seems like only the native Tyk APIs PUT endpoint which is “/tyk/apis/{apiID}” only is supporting the JWT related schema as described here Tyk Gateway API so that we can update our APIs like below :

{
  "name": "Awesome API",
  "use_keyless": true,
  "active": true,
  "enable_jwt": true,
  "enable_signature_checking": true,
  "jwt_signing_method": "RS256",
  "jwt_source": "https://awesome-api.eu.auth0.com/.well-known/jwks.json",
  "jwt_identity_base_field": "sub",
  "jwt_policy_field_name": "pol"
}

Or may be i am missing something in the documentation which may guide me for integrating my OAS APIs with Auth0 like native way of Tyk APIs ?

Thanks in advance.

Hi Aly,

It should be possible to update (PUT) your API using Tyk OAS, as described in Update an OAS API.

An example Petstore PUT Payload would looks something like

{
    "info": {
        "title": "Petstore",
        "version": "1.0.0"
    },
    "openapi": "3.0.3",
    "paths": {
        "/pet": {
            "post": {
                "operationId": "addPet",
                "responses": {
                    "405": {
                        "description": "Invalid input"
                    }
                },
                "summary": "Add a new pet to the store",
                "tags": [
                    "pet"
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "jwt_auth": {
                "bearerFormat": "JWT",
                "scheme": "bearer",
                "type": "http"
            }
        }
    },
    "security": [
        {
            "jwt_auth": []
        }
    ],
    "servers": [
        {
            "url": "http://127.0.0.1:8080/"
        },
        {
            "url": "https://petstore.swagger.io/v2"
        }
    ],
    "x-tyk-api-gateway": {
        "info": {
            "id": "ff70c9eb17644ba9895d9f2521637ff7",
            "name": "Petstore",
            "state": {
                "active": true
            }
        },
        "upstream": {
            "url": "https://petstore.swagger.io/v2"
        },
        "server": {
            "listenPath": {
                "value": "/",
                "strip": true
            },
            "authentication": {
                "enabled": true,
                "securitySchemes": {
                    "jwt_auth": {
                        "enabled": true,
                        "header": {
                            "enabled": true,
                            "name": "Authorization"
                        },
                        "identityBaseField": "cid",
                        "policyFieldName": "pol",
                        "signingMethod": "rsa",
                        "source": "aHR0cDovL2p3a3MudXJp"
                    }
                }
            }
        }
    }
}