ves-io-schema-authentication-API-Replace

Examples of replacing authentication

Usecase:

Replace apigw-config-1

Request using vesctl:

vesctl configuration replace authentication -i authentication.yaml

where file authentication.yaml has following contents (authentication.ReplaceRequest):

metadata:
  name: apigw-1
  namespace: documentation
spec:
  cookieParams:
    cookieExpiry: 5600
    cookieRefreshInterval: 5000
    sessionExpiry: 6600
  oidcAuth:
    clientSecret:
      clearSecretInfo:
        url: string://<base64>
    oidcClientId: oidc-google-clientid
    oidcWellKnownConfigUrl: https://www.google.com/well_known/config

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"apigw-1","namespace":"documentation"},"spec":{"oidcAuth":{"oidcWellKnownConfigUrl":"https://www.google.com/well_known/config","oidcClientId":"oidc-google-clientid","clientSecret":{"clearSecretInfo":{"url":"string://\u003cbase64\u003e"}}},"cookieParams":{"cookieRefreshInterval":5000,"cookieExpiry":5600,"sessionExpiry":6600}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/authentications/apigw-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:06:44 GMT
Vary: Accept-Encoding

{

}