]>
git.proxmox.com Git - ceph.git/blob - ceph/src/auth/AuthSessionHandler.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2004-2009 Sage Weil <sage@newdream.net>
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.
16 #ifndef CEPH_AUTHSESSIONHANDLER_H
17 #define CEPH_AUTHSESSIONHANDLER_H
19 #include "include/common_fwd.h"
20 #include "include/types.h"
23 #define SESSION_SIGNATURE_FAILURE -1
25 // Defines the security applied to ongoing messages in a session, once the session is established. PLR
29 struct AuthSessionHandler
{
30 virtual ~AuthSessionHandler() = default;
31 virtual int sign_message(Message
*message
) = 0;
32 virtual int check_message_signature(Message
*message
) = 0;
35 struct DummyAuthSessionHandler
: AuthSessionHandler
{
36 int sign_message(Message
*) final
{
39 int check_message_signature(Message
*) final
{
44 struct DecryptionError
: public std::exception
{};
46 extern AuthSessionHandler
*get_auth_session_handler(
47 CephContext
*cct
, int protocol
,