Commit Graph

301 Commits

Author SHA1 Message Date
Yi Wu 17fdbc46a5
EaR: Add page checksum to Redwood pages in no-auth mode (#8965)
Previously with EaR we always enable authentication (e.g. we encrypt Redwood pages). The authentication is a form of checksum, so dedicated page checksum was not needed. This PR adds back xxhash page checksum when authentication is disabled. Also change the knob to default disable authentication.
2023-01-03 10:30:07 -08:00
Kevin Hoxha a05649c620 metrics: Add knob to control emission of DDSketch buckets 2022-12-14 14:33:39 -08:00
Kevin Hoxha 3cea754ba3 metrics: Add OTEL metric definitions 2022-12-08 10:07:11 -08:00
Kevin Hoxha 5a9d3343cc metrics: Add IMetricClient and StatsdMetric to send batches over UDP 2022-12-08 10:07:11 -08:00
Kevin Hoxha f3431fe1e7 metrics: Add MetricsLogger loop and more knobs 2022-12-08 10:07:11 -08:00
Kevin Hoxha fe73576cc7 metrics: Add knobs and make Counter, LatencySample implement flush() method 2022-12-08 10:07:11 -08:00
Marian Dvorsky 085fce8478
Distributed tracing related improvements (#8942)
Several fixes/improvements related to distributed traces.

Remove "key" attributes and the TRACING_SPAN_ATTRIBUTES_ENABLED knob: we almost never want to log actual keys (as they can contain private data), however, we do want to use other span attributes.
In Transaction::setTransactionID, properly propagate spanContext flags, and set all copies of spancontext
2022-12-07 17:58:52 +01:00
A.J. Beamon 3e9b6ce937 Don't disallow a seed value of 0 2022-12-02 15:32:34 -08:00
Lukas Joswiak 7d73d52a91 Enable tracing in simulation
This will help test the flow of span IDs from the client all the way to
the storage servers.
2022-11-21 09:03:22 -08:00
Sam Gwydir 34b8c5eb2b ENCRYPT_KEY_CACHE_LOGGING_SAMPLE_SIZE -> ENCRYPT_KEY_CACHE_LOGGING_SKETCH_ACCURACY 2022-11-14 10:47:45 -08:00
Sam Gwydir 23706c957b Use DDSketch for Sample Data. 2022-11-12 13:45:46 -08:00
Steve Atherton d169875423 Add a knob for whether to allow guard pages in memory allocations done via mmapInternal(). The knob defaults to false. 2022-10-16 19:55:07 -07:00
Markus Pilman c143f1db33
Merge pull request #8455 from sfc-gh-mpilman/features/token-audit-logging
Audit all AuthZ token usages
2022-10-12 14:22:55 -06:00
Kevin Hoxha ff1b2df8f6 fdbcli: Add options for knob management
- setknob <knob_name> <knob_value> [config_class]
- getknob <knob_name> [config_class]
- Added new option to begin to specify if it's a configuration txn. Syntax is begin [config-txn]
- Added utility function for converting tuples to string
- Added knobmanagment test in fdbcli_tests.py
2022-10-11 15:32:01 -07:00
Markus Pilman 5239c491c4 Audit all AuthZ token usages 2022-10-11 14:34:10 -06:00
Marian Dvorsky c6c449d047
Extract TaskQueue out of Net2 and reuse it in sim2 (#8330)
* Extract TaskQueue out of Net2 and reuse it in sim2

* empty commit

* Address review comments

* Introduce MAX_RUNLOOP_SLEEP_DELAY

* Apply clang-format
2022-10-10 12:46:06 -07:00
sfc-gh-tclinkenbeard fec791be62 Merge remote-tracking branch 'origin/main' into split-failure-injection-workloads 2022-09-30 18:00:48 -07:00
Ata E Husain Bohra 03f1d13be3
Enable encryption authentication configurability (#8312)
* Enable encryption authentication configurability

Description

 diff-1: Remove memcpy due to auth-token computation
         Address review comments

Patch proposes major changes:
1. Enable FDB to choose encryption authentication as a configurable
parameter. Fix issues choosing ENCRYPT_HEADER_AUTH_TOKEN_NONE mode.
2. Introduce AES_CMAC as supported encryption authentication scheme.

Patch allows cluster to govern: if encryption authentication needs to
enabled, if yes, then choose from two supported schemes:
1. HMAC_SHA_256
2. AES_256_CMAC

Testing

devRunCorrectness - 100K
BlobCipher unittests
EncryptionOps.toml
BlobGranuleCorrectness/BlobGranuleCorrectnessClean
2022-09-29 16:18:55 -07:00
sfc-gh-tclinkenbeard 2434f18c5c Enable failure injection for all simulation tests 2022-09-29 14:14:24 -07:00
sfc-gh-tclinkenbeard 5e71f365fb Set ENABLE_SIMULATION_IMPROVEMENTS to true 2022-09-29 12:40:09 -07:00
Markus Pilman e1627e0a78 Merge remote-tracking branch 'origin/main' into features/always-inject-faults 2022-09-19 09:38:55 -06:00
Steve Atherton 2bf90ca5ec Change KAIO latency metrics to use LatencySample for easier usability. Rename a SQLite-specific knob to indicate it is specific to SQLite. 2022-09-15 13:27:23 -07:00
Markus Pilman 2d1b58d020
Update flow/Knobs.cpp
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2022-09-15 11:54:45 -06:00
Markus Pilman acd24d6c81 Merge remote-tracking branch 'origin/main' into features/always-inject-faults 2022-09-12 16:44:16 -06:00
Yi Wu d831c87d14
Add encryption metrics (#8070)
Adding the following metrics:
* BlobCipherKeyCache hit/miss
* EKP: KMS requests latencies
* For each component that using encryption, they now need to pass a UsageType enum to the encryption helper methods (GetEncryptCipherKeys/GetLatestEncryptCipherKey/encrypt/decrypt) and those methods will help to log get cipher key latency samples and encryption/decryption cpu times accordingly.
2022-09-09 18:43:09 -07:00
Junhyun Shim 3023096962 Add a knob to allow token-less tenant data access for untrusted clients 2022-09-08 14:53:01 +02:00
Junhyun Shim 6bcfbf421e Merge remote-tracking branch 'origin/main' into authz-general-tls-and-integration-test 2022-08-26 09:20:31 +02:00
Trevor Clinkenbeard c41e6090f6
Merge pull request #7624 from sfc-gh-dadkins/sfc-gh-dadkins/bugs/7619
Fix parsing of knob values to reject invalid values.
2022-08-23 22:43:08 -07:00
Trevor Clinkenbeard e83b21d21f
Mark value maybe_unused in /flow/Knobs/ParseKnobValue 2022-08-23 10:16:16 -07:00
Junhyun Shim a312002333 Merge remote-tracking branch 'origin/main' into authz-general-tls-and-integration-test 2022-08-17 17:32:00 +02:00
Junhyun Shim bcb9bc7e62 Set up authz integration test environment using Python venv
Add Authz-related support to {tmp|local}_cluster.py
Also fix public key set load/refresh mechanism
2022-08-17 14:57:05 +02:00
Ata E Husain Bohra 03435b5133
Update BlobCipher cache to respect EKP/KMS cipherKey TTL (#7885)
Description

FDB native encryption data at-rest supports two type of cipher-keys
in-memory caching:
1. Revocable keys - with a definite expiry (future timestamp)
2. Non-revocable keys - with or without expiry timestamp and/or
refreshAt timestamp.

Patch update BlobCipherKey in-memory cache to respect EKP/KMS
supplied 'refreshAt' and 'expireAt' timestamp. GetLatestCipher
validates `cipher key freshness' as well as GetCipherKey checks
for 'cipher key liveness' before replying details to the caller.

Patch also optimizes the BlobCipher module logging by taking
following measures:
1. BLOB_CIPHER_DEBUG macro to guard spammy log messages needed
mostly for debugging failures.
2. Minimize log volume by logging cipherKey details for any new
key added to the cache, key-refreshes are not logged.
3. Categorize logs into: debug, info and warn on per-usecase basis

Testing

devRunCorrectness - 100K
EncryptOps.toml - 100K
2022-08-15 11:17:26 -07:00
Markus Pilman 69744ffdcb disable new failure injection 2022-08-08 14:39:21 -06:00
Junhyun Shim 65b441bd1b Watch public key file at CLI-arg path
Argument name: authorization-public-key-file
2022-07-28 20:03:19 +02:00
Junhyun Shim e2a3fedfc7
Merge branch 'main' into features/authz 2022-07-27 00:08:57 +02:00
Renxuan Wang dc9599f2e9
Get network interfaces ready for https proxy. (#7556)
* Move HTTP from fdbclient/ to fdbrpc/.

* Move md5 and libb64 to contrib/.

* Get network interfaces ready for https proxy.

* Rebase
2022-07-25 17:08:32 -07:00
Dan Adkins f144c929d3 Fix parsing of knob values to reject invalid values.
As of version 7.1, knob parsing started using std::stol which will
partially consume its input and return success, even if that's not
what we want, e.g. std::stol("4GiB") returns 4.

This changes returns the behavior of 7.0, which would consider the
above example invalid.
2022-07-19 16:46:42 -04:00
Markus Pilman 2edbcf2c65
Merge pull request #44 from apple/main
Merge main
2022-07-12 07:51:22 -06:00
He Liu bc5bfaffda
Shard based move (#6981)
* Shard based move.

* Clean up.

* Clear results on retry in getInitialDataDistribution.

* Remove assertion on SHARD_ENCODE_LOCATION_METADATA for compatibility.

* Resolved comments.

Co-authored-by: He Liu <heliu@apple.com>
2022-07-07 20:49:16 -07:00
Markus Pilman 56541167c2 send token with tenant info object 2022-07-06 20:58:17 -06:00
Markus Pilman 3aaae9c521 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-27 11:07:14 -06:00
Markus Pilman a47ed89018 Linux fixes and addressed review comments 2022-06-23 20:52:13 -06:00
Ata E Husain Bohra 8808d93813
Fix bugs in EncyrptKeyProxy actor (#7388)
Description

Major changes include:
1. GetEncryptByKeyIds cache elements can expire.
2. Update iterator after erasing an element during refresh encryption keys
   operation.

Testing

EncryptKeyProxyTest
2022-06-14 21:22:25 -07:00
Markus Pilman 799fe32346 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-13 18:02:11 -06:00
Ray Jenkins c45abc7c32
Add TRACING_SPAN_ATTRIBUTES_ENABLED Knob, default false. (#7354)
* Add TRACING_SPAN_ATTRIBUTES_ENABLED Knob, default false.

In order to prevent accidental leakage of PII to external tracing collector services,
we've added a knob to prevent additional attributes to be added to spans unless explicitly
enabled by the user.

* Enable span attributes knob for unit tests.
2022-06-13 11:37:09 -05:00
Steve Atherton 697aa6cc32 Performance bug fix: reactor.react() is called too often. 2022-06-07 17:53:40 -07:00
Renxuan Wang cd2a575e02
Move the resolve of coordinator hostname from getCoordinatorProtocol() to getClusterProtocolImpl(). (#7245)
* Move the resolve of coordinator hostname from getCoordinatorProtocol() to getClusterProtocolImpl().

* Guard DNS Cache behind a knob.
2022-05-26 09:45:54 -07:00
Ata E Husain Bohra 333aadb903
Interface to enable clients to send/receive REST requests/responses (#6866)
* Interface to enable clients to send/receive REST requests/responses

Description

Major changes:
1. Add RESTClient interface enabling client to send/receive REST HTTP
   requests. Support REST APIs are: get, head, put, post, delete, trace
2. Add RESTUtil file introducing below interfaces:
 2.1. RESTUrl - Extract URI information: host, service, request-parameters.
 2.2. RESTConnectionPool-
      Connection establishment, life-cycle management, connection-pool (TTL)
 2.3. RESTClientKnobs - supports REST Knob parameter management and updates

Testing

Unit test - fdbrpc/RESTClient, fdbrpc/RESTUtils
2022-04-27 12:17:52 -07:00
Markus Pilman 145f3d15bc implemented token caching 2022-04-26 10:21:22 -06:00
Markus Pilman bbb1392aad Merge remote-tracking branch 'origin/main' into features/validate-trace-events-in-simulation 2022-04-21 08:24:18 -06:00