'application authentication using wso2 in kubernetes ingress

I am trying to use wso2 as an authorization server with ouath2. I referred to the below links

Link

As mentioned in the link Google authenticator is used but can I use wso2 instead of google?

I have created a service provider in wso2 -> then select oauth/opendID connect configuration -> used the client ID and secret to create oauth2 image. But I am not sure what provider name I have to give.

spec:
  containers:
  - args:
    - --provider=wso2
    - --email-domain=*
    - --upstream=file:///dev/null
    - --http-address=0.0.0.0:4180

    env:
    - name: OAUTH2_PROXY_CLIENT_ID
      value: 0UnfZFZDb
    - name: OAUTH2_PROXY_CLIENT_SECRET
      value: rZroDX6uOsySSt4eN
    # docker run -ti --rm python:3-alpine python -c 'import secrets,base64; print(base64.b64encode(base64.b64encode(secrets.token_bytes(16))));'
    - name: OAUTH2_PROXY_COOKIE_SECRET
      value: b'cFF0enRMdEJrUGlaU3NSTlkyVkxuQT09'
    image: quay.io/pusher/oauth2_proxy:v4.1.0-amd64

and in the ingress, I have added the following annotations

    nginx.ingress.kubernetes.io/auth-url: "http://oauth2-proxy.auth.svc.cluster.local:4180/oauth2/auth"
 nginx.ingress.kubernetes.io/auth-signin: "https://identity.wso2.com:443/commonauth?rd=/"

but I am getting an authentication error. enter image description here

  1. Can use I wso2 as a authorization server similar the github or google?
  2. for wso2, do I need to create an oauth2 image?
  3. my k8s ingress annotations are correct (tried multiple values like start?rd=$escaped_request_uri etc)?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source