auth_x.h 905 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef _FS_CEPH_AUTH_X_H
  2. #define _FS_CEPH_AUTH_X_H
  3. #include <linux/rbtree.h>
  4. #include <linux/ceph/auth.h>
  5. #include "crypto.h"
  6. #include "auth_x_protocol.h"
  7. /*
  8. * Handle ticket for a single service.
  9. */
  10. struct ceph_x_ticket_handler {
  11. struct rb_node node;
  12. unsigned int service;
  13. struct ceph_crypto_key session_key;
  14. struct ceph_timespec validity;
  15. u64 secret_id;
  16. struct ceph_buffer *ticket_blob;
  17. unsigned long renew_after, expires;
  18. };
  19. struct ceph_x_authorizer {
  20. struct ceph_crypto_key session_key;
  21. struct ceph_buffer *buf;
  22. unsigned int service;
  23. u64 nonce;
  24. u64 secret_id;
  25. char reply_buf[128]; /* big enough for encrypted blob */
  26. };
  27. struct ceph_x_info {
  28. struct ceph_crypto_key secret;
  29. bool starting;
  30. u64 server_challenge;
  31. unsigned int have_keys;
  32. struct rb_root ticket_handlers;
  33. struct ceph_x_authorizer auth_authorizer;
  34. };
  35. int ceph_x_init(struct ceph_auth_client *ac);
  36. #endif