mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
38 lines
1011 B
C++
38 lines
1011 B
C++
/*
|
|
* Copyright (C) 2026-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.1 and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "auth/default_authorizer.hh"
|
|
#include "auth/permission.hh"
|
|
|
|
namespace auth {
|
|
|
|
// maintenance_socket_authorizer is used for clients connecting to the
|
|
// maintenance socket. It grants all permissions unconditionally (like
|
|
// AllowAllAuthorizer) while still supporting grant/revoke operations
|
|
// (delegated to the underlying CassandraAuthorizer / default_authorizer).
|
|
class maintenance_socket_authorizer : public default_authorizer {
|
|
public:
|
|
using default_authorizer::default_authorizer;
|
|
|
|
~maintenance_socket_authorizer() override = default;
|
|
|
|
future<> start() override {
|
|
return make_ready_future<>();
|
|
}
|
|
|
|
future<permission_set> authorize(const role_or_anonymous&, const resource&) const override {
|
|
return make_ready_future<permission_set>(permissions::ALL);
|
|
}
|
|
};
|
|
|
|
} // namespace auth
|