xoa token expire date - how can i set it to an later date?
-
Hi Team,
i want to use the xoa api to monitor if i have old or too many snapshots connected to an VM, thank you for implementing the feature to your API that it is possible now. I check it via icinga and need an token which expires in 5 years or something and not after a month. when I try to create a user in the webfrontend admin user with a date 5 years or 11 month from now, it logs an error with:too high expiresIn duration: 1956120152841
I also tried to create the user via cli:
#create timestamp for 5 years from now: date +%s -d "5 year" 1831359954 #create user token xo-cli --createToken --allowUnauthorized --expiresIn 1831359954 localhost admin@admin.net Authentication token created 7kkiyVwzgISlOTO2LozsjtVTDPHG71lvqHEtYeSRQf0
but the expiration date of the token is only 30 days from now.
I dont want to create a new token every 30 days and reconfigure our icinga monitoring system to work with a new token, so can you please tell me how I can create a tekoen with higher age and maybe put it into the documentation, i was able to find the "--expiresIn" parameter but no info what you should put in there
cheers guys! Ringo
-
That's a question for @julien-f
-
@vmpr You need to update
authentication.maxTokenValidity
in your xo-server's config. -
@julien-f thanks for the answer! this will get overwritten with every xo source update right? how about a licensed xoa? cheers Ringo
-
@vmpr Yes, you need to write your settings in your own config file, see https://github.com/vatesfr/xen-orchestra/blob/3c7d316b3cb3e949316e4a93f74da954df81a65f/packages/xo-server/sample.config.toml#L4-L5
-
Which is
/etc/xo-server/config.toml
if you use XOA -
Thanks guys! Absolut Legends