Wiremock docker add OAUTH2

Viewed 284

I am using WireMock docker image to mock an endpoint. I am using the below yaml to create a deployment on kubernetes and it's working fine, I have added __files and mappings to add the endpoints and responses. Now I need to add OAUTH2 to test authentication in my application. could this be done? and what properties should I add:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: wiremock-helper
  labels:
    app: wiremock-helper
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wiremock-helper
  template:
    metadata:
      labels:
        app: wiremock-helper
    spec:
      containers:
      - name: wiremock-helper
        image: rodolpheche/wiremock:latest
        ports:
          - containerPort: 8080
        volumeMounts:
          - name: wiremock-volume
            mountPath: /home/wiremock
      volumes:
        - name: wiremock-volume
          nfs:
            server: 10.0.0.0
            path: /home/wiremock
1 Answers

I'm not certain I understand your question, but if I do, the deployment won't handle Authentication or Authorization. You can have your application handle those directly, use an API gateway/proxy solution (envoy, emissary-ingress, traefik, ory oathkeeper, etc.), or use a service mesh solution (Istio with Auth Policy).

Related