We don't have our Kube API exposed and all of mana...
# general
l
We don't have our Kube API exposed and all of management traffic is proxied through Rancher. I thought there was a URL that allowed serviceaccount tokens through, but can't find it. Is my only option to create a service account in Rancher and replace the API key every 90 days?
h
In global settings you can change
auth-token-max-ttl-minutes
to whatever you want... Then any new token will have that age limit https://ranchermanager.docs.rancher.com/api/api-tokens#auth-token-max-ttl-minutes
m
l
Thank you!
I was starting to set up ingress and nginx to proxy to kube-api. I failed when nginx failed to load haproxy.cfg and that's when I realized I was way off track.
f
is this code documentation up-to-date and accurate ? I tried setting token to <0 and it instantly expires. What am i doing wrong.
1
perhaps i have been reading it wrong. is it stating that
auth-token-max-ttl-minutes
value should be
<0
to enable non-expiring tokens ? (edit: it indeed is)
c
https://github.com/rancher/rancher/blob/main/pkg/apis/ext.cattle.io/v1/types.go#L66-L69
``` // This default is provided by the
auth-token-max-ttl-minutes
setting.
// Note that this default is also the maximum specifiable TTL.
// A value <= 0 there enables non-expiring tokens.```
👍 1
🙏 1
f
yup. just confirmed testing on local rancher instance.