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: 1956120152841I 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 7kkiyVwzgISlOTO2LozsjtVTDPHG71lvqHEtYeSRQf0but 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.maxTokenValidityin 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.tomlif you use XOA
-
Thanks guys! Absolut Legends

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login