Middleware basic auth secret format


I am planning to add a basic auth middleware to traefik in k8s and as such I am following the guide at https://doc.traefik.io/traefik/middlewares/basicauth/. In here the example secret for storing the username:password is as such

apiVersion: v1
kind: Secret
  name: authsecret
  namespace: default

  users: |2

I can get the base64 encoded part and I can see that 2 usernames and passwords are defined. But what is the "2" for?


the 2 is the indentation indicator: https://yaml.org/spec/1.2/spec.html#id2793979

Ah of course. The fact that the encoded secret had 2 username passwords threw me off. Thanks a lot for the quick reply!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.