vaultwarden icon indicating copy to clipboard operation
vaultwarden copied to clipboard

Not possible to disable admin token

Open davidfrickert opened this issue 9 months ago • 2 comments

Trying to use this chart to replace another old one that i was using but running into issues...

The docs recommend setting adminToken=null to disable admin token but this does not work because because the secrets.yaml template tries to read .Values.adminToken.existingSecret which doesn't work because adminToken is null.

Setting adminToken.value to null also does not work as the chart tries to use the existing secret which i also do not want to use in the _podSec.tpl.

davidfrickert avatar Apr 25 '24 21:04 davidfrickert

I faced the same problem and managed to work around it by creating a secret where the key referenced is empty.

# Not sure if it's necessary, so watch out for empty space at the end
kubectl -n vaultwarden create secret generic vaultwarden-disable-admin --from-literal=token= 
adminToken:
  existingSecret: "vaultwarden-disable-admin"
  existingSecretKey: "token"

JoaoSangue avatar Jun 29 '24 23:06 JoaoSangue

@JoaoSangue but does that not result in

[WARNING] `ADMIN_TOKEN` is enabled but has an empty value, so the admin page will be disabled.
[WARNING] To enable the admin page without a token, use `DISABLE_ADMIN_TOKEN`.

icyphox avatar Jul 26 '24 08:07 icyphox

@icyphox, sorry for the late response. Just found out my notifications were turned off.

The warning does happen unfortunately, but i believe that's just a consequence for disabling the admin page and the same would have happened if setting the token to null worked.

I believe the only problem here was that there was no easier way to set the token to a blank value, if I remember it correctly.

JoaoSangue avatar Jan 16 '25 18:01 JoaoSangue