apk icon indicating copy to clipboard operation
apk copied to clipboard

JWT support

Open tharindu1st opened this issue 1 year ago • 0 comments

Description: In APK,apis can't authenticate with the JWT token that comes as a non-oauth header. This leads to users having to send Non Oauth2 headers in Oauth2 way to authenticate from the gateway.

Solution

Implement a JWT authentication mechanism in the gateway.

proposed cr definition.

apiVersion: dp.wso2.com/v1alpha2
kind: Authentication
metadata:
  name: authentication-api
  namespace: apk-integration-test
spec:
  override:
    authTypes:
      jwt:
        disabled: false
        header :  "X-JWT-Assertion"
        sendTokenToUpstream: true
        audiences:
          - "wso2-apk-oauth-ds"
        tokenIssuers:
          - "https://localhost:9443/oauth2/token"
        additionalClaims:
          - name: "http://wso2.org/claims/sub"
            value: "admin"
  targetRef:
    group: ""
    kind: API
    name: apk-test-setup-wso2-apk-oauth-api
    namespace: apk-integration-test

tharindu1st avatar Dec 15 '23 08:12 tharindu1st