]> git.proxmox.com Git - ceph.git/blame - ceph/src/auth/AuthAuthorizeHandler.h
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / auth / AuthAuthorizeHandler.h
CommitLineData
7c673cae
FG
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3/*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2004-2009 Sage Weil <sage@newdream.net>
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15#ifndef CEPH_AUTHAUTHORIZEHANDLER_H
16#define CEPH_AUTHAUTHORIZEHANDLER_H
17
18#include "Auth.h"
9f95a23c 19#include "include/common_fwd.h"
7c673cae 20#include "include/types.h"
11fdf7f2 21#include "common/ceph_mutex.h"
7c673cae
FG
22// Different classes of session crypto handling
23
24#define SESSION_CRYPTO_NONE 0
25#define SESSION_SYMMETRIC_AUTHENTICATE 1
26#define SESSION_SYMMETRIC_ENCRYPT 2
27
7c673cae 28class KeyRing;
7c673cae
FG
29
30struct AuthAuthorizeHandler {
31 virtual ~AuthAuthorizeHandler() {}
11fdf7f2
TL
32 virtual bool verify_authorizer(
33 CephContext *cct,
9f95a23c
TL
34 const KeyStore& keys,
35 const ceph::buffer::list& authorizer_data,
11fdf7f2 36 size_t connection_secret_required_len,
9f95a23c 37 ceph::buffer::list *authorizer_reply,
11fdf7f2
TL
38 EntityName *entity_name,
39 uint64_t *global_id,
40 AuthCapsInfo *caps_info,
41 CryptoKey *session_key,
42 std::string *connection_secret,
43 std::unique_ptr<AuthAuthorizerChallenge> *challenge) = 0;
7c673cae
FG
44 virtual int authorizer_session_crypto() = 0;
45};
46
7c673cae 47#endif