Commit Graph

273 Commits

Author SHA1 Message Date
Stefan Miklosovic b9f614f7e5
Remove deprecated properties in CompressionParams
This patch removes deprecated chunk_length_kb and sstable_compression in favor of
chunk_length_in_kb and class parameters.

The only deprecated compression parameter left, crc_check_chance (which is configurable outside
of compression parameters as a standalone table parameter) is meant to be treated separately.

patch by Stefan Miklosovic; reviewed by Maxim Muzafarov and Brandon Williams for CASSANDRA-18742
2023-09-29 15:19:12 +02:00
Shailaja Koppu 933137fb14 CIDR filtering authorizer
Patch by Shailaja Koppu, Yifan Cai; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRA-18592

Co-Authored-By: Yifan Cai <ycai@apache.org>
2023-07-28 20:10:02 -07:00
Andrés de la Peña 2e2a49fcdc CEP-20: Dynamic Data Masking
Allows to attach the native masking functions and UDFs to the definitions of
table columns in the schema, as defined by CEP-20.

The functions masking a column can be specified on CREATE TABLE queries, right
at the end of the column definition. The mask of a column can also be changed
or dropped with an ALTER TABLE query. Once a column is masked, SELECT queries
will always return the masked value of the column. That masking is done on the
coordinator, at the end of the query execution. Thus, masking won't affect any
filters or ordering, which would be based on the clear values of the masked
columns. Column masks are stored on the table system_schema.column_masks.

A new UNMASK permission allows to see the clear data of columns with an
attached mask. Also, a new SELECT_MASKED permission allows to run SELECT
queries restricting the clear values of masked columns. Superusers have both
permissions by default, whereas regular users don't have them.

Dynamic data masking can be enabled/disabled with the config property
dynamic_data_masking_enabled in cassandra.yaml. It is disabled by default.

This is the combination of multiple tickets:

 * Add masking functions to column metadata (CASSANDRA-18068)
 * Add UNMASK permission (CASSANDRA-18069)
 * Add SELECT_MASKED permission (CASSANDRA-18070)
 * Add support for using UDFs as masking functions (CASSANDRA-18071)
 * Add feature flag for dynamic data masking (CASSANDRA-18316)

patch by Andrés de la Peña; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-17940
2023-03-24 13:57:18 +00:00
Stefan Miklosovic 58a3b12508
Remove DateTieredCompactionStrategy
patch by Stefan Miklosovic; reviewed by Jacek Lewandowski for CASSANDRA-18043
2023-03-16 09:38:10 +01:00
maxwellguo ee8b66da8c Make incremental backup configurable per table
patch by Maxwell Guo; reviewed by Stefan Miklosovic and Benjamin Lerer for CASSANDRA-15402
2022-11-19 10:57:54 +01:00
Brad Schoening addc5748a7 Add missing cqlsh completion and round out cqlsh completion test coverage
IF (NOT) EXISTS is now also offered in cqlsh completion for CREATE TYPE, DROP TYPE, CREATE ROLE and DROP ROLE

patch by Brad Schoening; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-16640
2022-11-07 18:00:53 +01:00
Stefan Miklosovic c71f04bd5b Add memtable option among possible tab completions for a table
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17982
2022-10-21 22:34:33 +02:00
Stefan Miklosovic c4c4ad5cbc Merge branch 'cassandra-4.1' into trunk 2022-10-04 20:38:01 +02:00
Stefan Miklosovic f0fd551c7c Merge branch 'cassandra-4.0' into cassandra-4.1 2022-10-03 16:27:45 +02:00
Stefan Miklosovic e9b411e3e0 Merge branch 'cassandra-3.11' into cassandra-4.0 2022-10-03 12:06:37 +02:00
Stefan Miklosovic ad6bca4ab5 Merge branch 'cassandra-3.0' into cassandra-3.11 2022-10-03 10:43:08 +02:00
Brad Schoening 83c1f7713b Fix auto-completing "WITH" when creating a materialized view (CASSANDRA-17879)
patch by Brad Schoening; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17879
2022-10-03 10:35:38 +02:00
Stefan Miklosovic b6d8e2ce6b Make disabling auto snapshot on selected tables possible
patch by Tommy Stendahl; reviewed by Stefan Miklosovic and Aleksey Yeschenko for CASSANDRA-10383

Co-authored-by: Tommy Stendahl <tommy.stendahl@ericsson.com>
Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2022-09-08 10:25:34 +02:00
Yifan Cai 26dd119679 Add new CQL function maxWritetime
patch by Yifan Cai; reviewed by Andres de la Peña, Francisco Guerrero for CASSANDRA-17425
2022-05-18 11:56:51 -07:00
Benjamin Lerer 1ad8bf67a9 Allow to aggregate by time intervals
Patch by Benjamin Lerer; review by Andres De la Pena and Yifan Cai for CASSANDRA-11871

The patch allow to use pure monotonic functions on the last attribute of the GROUP BY clause and introduce some floor functions that can be use to group by time range.

A function is pure if:
    1. The function return values are identical for identical arguments
    2. The function application has no side effects

A function is monotonic if it is either entirely nonincreasing or nondecreasing.
2022-04-22 10:59:42 +02:00
ROCHETEAU Antoine d80bb323c9 CONTAINS and CONTAINS KEY support for Lightweight Transactions
patch by ROCHETEAU Antoine; reviewed by Benjamin Lerer, Berenguer Blasi for CASSANDRA-10537
2022-04-21 09:16:07 +02:00
Brad Schoening 634131961a make pylib PEP and pylint compliant 2022-04-13 07:16:04 -05:00
Brad Schoening f28dd90feb resolve several pylint issues in cqlsh.py and pylib
patch by Brad Schoening; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17480
2022-04-05 14:12:32 +02:00
Jogesh Anand e137c7c34c Add support for IF EXISTS and IF NOT EXISTS in ALTER statements
patch by Jogesh Anand; reviewed by Benjamin Lerer, Berenguer Blasi for CASSANDRA-16916
2022-04-04 11:35:16 +02:00
Bereng 30ad754d7e Pre hashed passwords in CQL
patch by Robert Stupp and Berenguer Blasi; reviewed by Andres de la Peña for CASSANDRA-17334

Co-authored-by: Robert Stupp <snazy@snazy.de>
Co-authored-by: Berenguer Blasi <berenguerblasi@gmail.com>
2022-03-23 07:20:14 +01:00
Bereng 2f84f492a2 Revert "Pre hashed passwords in CQL"
This reverts commit 6946b304e9.
2022-03-21 13:19:31 +01:00
Bereng 6946b304e9 Pre hashed passwords in CQL
patch by Berenguer Blasi; reviewed by Andres de la Peña for CASSANDRA-17334
2022-03-21 11:18:05 +01:00
Francisco Guerrero 185893256f Allow GRANT/REVOKE multiple permissions in a single statement
patch by Francisco Guerrero; reviewed by Benjamin Lerer and Yifan Cai for CASSANDRA-17030

This commit allows GRANT/REVOKE statement to support multiple permissions with a single
statement. For example,

```
GRANT MODIFY, SELECT ON KEYSPACE field TO manager;
GRANT ALTER, DROP ON ROLE role1 TO role2;
```
2021-10-22 14:34:04 +02:00
Benjamin Lerer df6ecaae1c Allow to grant permission for all tables in a keyspace
Patch by Benjamin Lerer; Review by Andres de la Peña and Ekaterina Dimitrova for CASSANDRA-17027

In some cases it is useful to prevent users to alter or drop a keyspace
while allowing them to create new tables.
This patch add support for a new DataResource below KEYSPACE but above
TABLE. The syntax to grant permission at this level in ALL TABLES IN
KEYSPACE.
2021-10-20 14:09:02 +02:00
Marcus Eriksson 1d24c7cf49 Merge branch 'cassandra-3.11' into trunk 2021-04-13 10:52:21 +02:00
Brian Houser 7152d40bb3 Add autocomplete, errors for provide_overlapping_tombstones
Patch by Brian Houser; reviewed by marcuse for CASSANDRA-16350
2021-04-13 10:49:31 +02:00
Caleb Rackliffe 47ac595036 Backport CASSANDRA-12189, formatting fixes
Patch by Caleb Rackliffe, reviewed by brandonwilliams for
CASSANDRA-15948
2020-07-15 14:20:53 -05:00
Caleb Rackliffe 5774415368 Backport CASSANDRA-12189, formatting fixes
Patch by Caleb Rackliffe, reviewed by brandonwilliams for
CASSANDRA-15948
2020-07-15 14:15:53 -05:00
Eduard Tudenhoefner 39a0703b65 Mark system_views/system_virtual_schema as non-alterable keyspaces in cqlsh
patch by Eduard Tudenhoefner; reviewed by Benjamin Lerer for
CASSANDRA-15711
2020-04-09 16:53:22 +02:00
Eduard Tudenhoefner b3f27381a5 Mark system_views/system_virtual_schema as system keyspaces in cqlsh
patch by Eduard Tudenhoefner; reviewed by Benjamin Lerer for
CASSANDRA-15706

This is so that those keyspaces don't show up in tab completions. This
also fixes the cqlsh completion tests.
2020-04-09 11:09:01 +02:00
Patrick Bannister bf9a1d487b Make cqlsh and cqlshlib Python 2 & 3 compatible
Patch by Patrick Bannister; reviewed by Dinesh Joshi, Andy Tolbert and David Capwell for CASSANDRA-10190
2020-02-14 10:33:57 -08:00
Pedro Gordo 7c5904753f
Remove obsolete OldNetworkTopologyStrategy
Removed the strategy from cqlsh autocomplete, including an array for replication_factor autocomplete that was only used for SimpleStrategy and OldNetworkTopologyStrategy.

 patch by Pedro Gordo; reviewed by Anthony Grasso, Mick Semb Wever for CASSANDRA-13990
2019-11-29 10:50:10 +01:00
Ariel Weisberg 4ae229f5cd Upgrade to 4.0 fails with NullPointerException
Patch by Ariel Weisberg; Reviewed by Dinesh Joshi for CASSANDRA-14820
2018-10-16 18:47:40 -04:00
Ariel Weisberg f7431b4328 Transient Replication and Cheap Quorums
Patch by Blake Eggleston, Benedict Elliott Smith, Marcus Eriksson, Alex Petrov, Ariel Weisberg; Reviewed by Blake Eggleston, Marcus Eriksson, Benedict Elliott Smith, Alex Petrov, Ariel Weisberg for CASSANDRA-14404

Co-authored-by: Blake Eggleston <bdeggleston@gmail.com>
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
2018-08-31 21:34:22 -04:00
Blake Eggleston f25a765b6d Make monotonic read / read repair configurable
Patch by Blake Eggleston; Reviewed by Aleksey Yeschenko for CASSANDRA-14635
2018-08-24 09:34:52 -07:00
Blake Eggleston 54de771e64 Add network authz
Patch by Blake Eggleston; Reviewed by Sam Tunnicliffe for CASSANDRA-13985
2018-04-23 09:55:31 -07:00
Aleksey Yeshchenko 2fcd29b830 Eliminate background repair and probablistic read_repair_chance table options
patch by Aleksey Yeschenko; reviewed by Blake Eggleston for
CASSANDRA-13910
2018-04-18 11:41:17 +01:00
Jason Brown 6d324f9d76 Merge branch 'cassandra-3.11' into trunk 2018-01-15 06:06:51 -08:00
Jason Brown 02bbdd6342 Merge branch 'cassandra-3.0' into cassandra-3.11 2018-01-15 06:05:04 -08:00
Jason Brown 685dde10e3 Merge branch 'cassandra-2.2' into cassandra-3.0 2018-01-15 06:03:22 -08:00
Jason Brown 503aec74a5 Merge branch 'cassandra-2.1' into cassandra-2.2 2018-01-15 06:01:14 -08:00
Michael Kjellman f8d73a3acb More PEP8 compliance for cqlsh
patch by Michael Kjellman; reviewed by Jay Zhuang for CASSANDRA-14021
2018-01-15 05:56:44 -08:00
Sylvain Lebresne 4ebab66163 Allow selecting Map values and Set elements
patch and review by Robert Stupp, Sylvain Lebresne and Benjamin Lerer for CASSANDRA-7396
2017-06-01 16:57:13 +02:00
Benjamin Lerer 369e7aa4c1 Merge branch cassandra-3.11 into trunk 2017-01-18 16:18:29 +01:00
Benjamin Lerer d388289533 Merge branch cassandra-3.0 into cassandra-3.11 2017-01-18 16:07:14 +01:00
Carl Yeksigian 5f66d48b38 Remove alter type support
patch by Carl Yeksigian; reviewed by Benjamin Lerer for CASSANDRA-12443
2017-01-18 15:59:10 +01:00
Eduard Tudenhoefner 68c828f48a cqlsh auto completion: refactor definition of compaction strategy options
patch by Eduard Tudenhoefner; reviewed by Stefania Alborghetti for CASSANDRA-12946
2016-11-28 09:05:05 +08:00
Benjamin Lerer 8884302fac Fix CQLSH parser syntax (follow-up CASSANDRA-11935) 2016-11-25 09:47:57 +01:00
Benjamin Lerer 8b3de2f490 Add support for arithmetic operators
patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-11935
2016-11-21 18:04:42 +01:00
Benjamin Lerer 8644aa9b82 Fix CQLSH auto completion for PER PARTITION LIMIT
patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-12803
2016-10-25 12:12:26 +02:00