Files
scylladb/cql3/role_options.hh
Dawid Mędrek b984488552 cql3: Rename SALTED HASH to HASHED PASSWORD
Cassandra 4.1 announced a new option to create a role with:
`HASHED PASSWORD`. Example:

```
CREATE ROLE bob WITH HASHED PASSWORD = 'hashed_password';
```

We've already introduced another option following the same
semantics: `SALTED HASH`; example:

```
CREATE ROLE bob WITH SALTED HASH = 'salted_hash';
```

The change hasn't made it to any release yet, so in this commit
we rename it to `HASHED PASSWORD` to be compatible with Cassandra.

Additionally, we adjust existing tests to work against Cassandra too.

Fixes scylladb/scylladb#21350

Closes scylladb/scylladb#21352
2024-10-30 14:07:58 +02:00

23 lines
448 B
C++

#pragma once
#include <map>
#include <optional>
#include <seastar/core/sstring.hh>
#include "seastarx.hh"
namespace cql3 {
struct role_options final {
std::optional<bool> is_superuser{};
std::optional<bool> can_login{};
std::optional<sstring> password{};
std::optional<sstring> hashed_password{};
// The parser makes a `std::map`, not a `std::unordered_map`.
std::optional<std::map<sstring, sstring>> options{};
};
}