mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-29 00:08:09 +00:00
![]() this adds a new endpoint for requesting tickets. instead of returning the ticket in the responses body, the ticket is set as a HttpOnly cookie. this has a couple of advantages: - the cookie cannot be stolen if an attacker downgrades the connection to http and injects malicious javascript (`HttpOnly`) - we don't need to rely on the client to make sure that the cookie is only send in the appropriate context and only over https connections (`Secure`, `SameSite`). - the cookie cannot be overwritten by other subdomains, insecure connections etc. (the default is to prefix them with `__Host-`) this follows the best practice guide for secure cookies from MDN [1]. we also set the cookies to expire when the ticket would so that the browser removes the cookie once the ticket isn't valid anymore. the endpoint still returns a ticket that only contains the informational portions of the ticket but not a valid signature. this is helpful to let clients know when to refresh the ticket by querying this endpoint again. it still protects the cookie, though, as it isn't a valid ticket by itself. [1]: https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Cookies Signed-off-by: Shannon Sterz <s.sterz@proxmox.com> |
||
---|---|---|
.. | ||
debian | ||
examples | ||
src | ||
Cargo.toml |