external-auth-server icon indicating copy to clipboard operation
external-auth-server copied to clipboard

Fetch config_token like a Kubernetes Secret from Vault

Open AnirudhGargUC opened this issue 2 years ago • 1 comments
trafficstars

Is it possible to fetch and populate this config_token created, as a kubernetes secret from Vault using External Secrets Operator?

Currently in my solution, I have hard-coded the token in the auth_url of ambassador Auth Service, has anyone fetched and used this as a variable somehow? Need help populating this __token__ variable.

Current config :

apiVersion: getambassador.io/v3alpha1
kind: AuthService
metadata:
  name: authentication
spec:
  auth_service: external-auth-operator-dev-external-auth-server.external-auth-operator:80
  path_prefix: /ambassador/verify-params-url/%7B%22config_token%22%3A%22__token__22%7D
  allowed_request_headers:
  - "x-qotm-session"
  - "authorization"
  include_body:
    max_bytes: 4096
    allow_partial: true
  status_on_error:
    code: 503

AnirudhGargUC avatar Aug 08 '23 03:08 AnirudhGargUC

You can use server-side tokens: https://github.com/travisghansen/external-auth-server/blob/master/CONFIG_TOKENS.md#server-side-tokens

I think it would be pretty easy to add additional store types/adapters for either or both of k8s secrets and vault.

travisghansen avatar Aug 08 '23 16:08 travisghansen