-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: support more functions from pgcrypto module #21001
Comments
Who requested this? |
It seems Bxxx did in the linked issue. It's a reasonable ask to make password storage easier (passwords from the end-user application, not ours). We'd have to gauge demand and figure out exactly which algorithms to support (only one out of the four supported by pgcrypto is acceptable for security purposes), as well as what else to support from pgcrypto. |
See also: #22878 for pgp functions from pgcrypto. |
Ok, apparently I'm supposed to take this on, so I'll do some research on this. |
@robert-s-lee did you manage to auth? i set the password to null, but i'm getting this warning
|
@cmnstmntmn I have investigated the issue by looking at the source code of VerneMQ, which thankfully is open source. The issue can be addressed either by
I am not yet certain which one is the easiest for us but I'll investigate. |
@knz thank you for your time and interest! |
a specific VerneMQ auth plugin would be great; |
@awoods187 can you pick this up for roadmapping? |
As discussed, we will handle this through Ops & Tools planning |
What is the state of pgcrypto with cockroachdb ? |
@MrOffline77 thank you for your interest in CockroachDB! we are approaching this by looking at individual use cases and applications and providing answers on a per-case basis. It is unlikely that we will aim supporting the entirety of pgcrypto any time soon, because it has a very large scope and also includes functionality that is rarely used (if at all) by modern applications. The proper next step for you here is to tell us more about your specific needs to see how we can help you. |
@knz Thank you ! |
@MrOffline77 we provide a separate feature which is systematic on-disk encryption for all the data (not just table data: also metadata and user authentication details). This is an enterprise feature. |
Ok. Did I get you right that there is no alternative for a mysql query type like this:
I guess this is an interesting thing for other people too. |
This is a similar request as the one from a previous commenter. In this case we advise to run the AES encrypt and decrypt functions using a client-side library. We understand this need well and will consider this for a future extension of CockroachDB. Note however that the performance profile of such a facility is not ideal, and if performance is important to you you will want to run the encryption/decryption client-side in a streaming fashion, or use a storage encryption facility on the database side (which can also operate in streaming fashion). |
Zendesk ticket #3212 has been linked to this issue. |
Hello! We're currently looking into CockroachDB and YugaByte DB as the distributed SQL for our internal projects. Some projects might be required column-based encryption at rest for specific data to follow our data privacy policy. Of course, we can encrypt them on the application side with some libraries, but I think the encryption approach using |
I don't think we meant to close this. |
This is also a hurdle for supporting Hasura's Metadata database, meaning that Hasura needs a separate Postgres database to work with Cockroach (given cockroach's lack of support for |
Hi @dvasdekis, that Discord link isn't accessible to me. Can you please provide a list of the missing functionality that Hasura needs from |
103211: upgradeinterlockccl: shard interlock test cases into separate tests r=rickystewart a=healthy-pod `TestTenantUpgradeInterlock` is composed of 14 test cases and they take around 10 minutes to run. This is a bottleneck on both current CI and future remote test execution CI. This code change shards `TestTenantUpgradeInterlock` into 14 different tests. The code generation logic lives under `pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/testgen`. Release note: None Epic: CRDB-17165 Closes DEVINF-751 103446: deps: upgrade golang.org/x/{crypto,mod,net,sys,text,tools,term} r=rafiss,knz a=andyyang890 This patch updates the following core dependencies as follows: * golang.org/x/crypto from v0.6.0 to v0.7.0 * golang.org/x/mod from v0.7.0 to v0.8.0 * golang.org/x/net from v0.7.0 to v0.8.0 * golang.org/x/sys from v0.5.0 to v0.6.0 * golang.org/x/text from v0.7.0 to v0.8.0 * golang.org/x/tools from v0.1.12 to v0.6.0 * golang.org/x/term from v0.5.0 to v0.6.0 Also update `rules_go` to a compatible version (0.38). Informs #21001 Release note: None Co-authored-by: healthy-pod <[email protected]> Co-authored-by: Andy Yang <[email protected]>
104058: pgcrypto: add helper functions for PKCS padding r=rafiss a=andyyang890 This patch adds helper functions for PKCS padding/unpadding, which is needed for pgcrypto's raw encryption functions. Informs #21001 Release note: None 104111: kvserver: add cross-region snapshot byte metrics to StoreMetrics r=kvoli,andrewbaptist a=wenyihu6 **kvserver: refactor getSnapshotBytesMetrics** This commit refactors `getSnapshotBytesMetrics` in `replica_learner_test` to return a `map[string]snapshotBytesMetrics` instead of `map[SnapShotRequest_Priority]snapshotBytesMetrics`. This allows us to include and compare different types of snapshot metrics, removing the constraint of being limited to `SnapShotRequest_Priority`. This commit does not change any existing functionality, and the main purpose is to make future commits cleaner. Part of: #104124 Release note: none --- **kvserver: add cross-region snapshot byte metrics to StoreMetrics** Previously, there were no metrics to observe cross-region snapshot traffic between stores within a cluster. To improve this issue, this commit adds two new store metrics - `range.snapshots.cross-region.sent-bytes` and `range.snapshots.cross-region.rcvd-bytes`. These metrics track the aggregate of snapshot bytes sent from and received at a store across different regions. Resolves: #104124 Release note (ops change): Two new store metrics - `range.snapshots.cross-region.sent-bytes` and `range.snapshots.cross-region.rcvd-bytes` - are now added to track the aggregate of snapshot bytes sent from and received at a store across different regions. Note that these metrics require nodes’ localities to include a “region” tier key. If a node lacks this key but is involved in cross-region batch activities, an error message will be logged. Co-authored-by: Andy Yang <[email protected]> Co-authored-by: Wenyi <[email protected]>
105301: pgcryptocipher: add helper function for parsing cipher method r=rafiss a=andyyang890 **pgcryptocipher: create new package for pgcrypto cipher functions** This patch creates a new package that will contain the implementation of pgcrypto cipher functions, along with related helpers. Release note: None ---- **pgcryptocipher: add helper function for parsing cipher method** This patch adds a helper function for parsing the cipher method string passed to pgcrypto cipher functions. Release note: None ---- Informs #21001 105559: testccl/sqlccl: unskip TestExplainRedactDDL r=mgartner a=michae2 `TestExplainRedactDDL` is a randomized SQL test which runs variants of `EXPLAIN (REDACT)` on random SQL statements and checks that an injected poison string is always redacted in the output. It is very similar to another randomized test, `TestExplainRedact`, but also includes DDL in the random statements. During development of v23.1 this test was skipped because the random DDL statements were running into other bugs unrelated to redaction. Now that things are more stable, let's unskip this test. Fixes: #99005 Epic: None Release note: None Co-authored-by: Andy Yang <[email protected]> Co-authored-by: Michael Erickson <[email protected]>
105654: builtins: implement encrypt and decrypt pgcrypto functions r=rafiss a=andyyang890 This patch implements `encrypt`, `encrypt_iv`, `decrypt`, and `decrypt_iv` from pgcrypto. These functions require an enterprise license on a CCL distribution. Informs #21001 Release note (enterprise change): The pgcrypto functions `encrypt`, `encrypt_iv`, `decrypt`, and `decrypt_iv` are now implemented. These functions require an enterprise license on a CCL distribution. 109782: server,sql: add status server endpoint to request profiler details r=dt a=adityamaru This change introduces a new status server endpoint to request job profiler details. This endpoint will redirect the request to the current coordinator node of the job in question. This will be useful because in a followup we will load the resumer from the coordinator node's job registry and trigger its specific job profiler detail collection logic. This is the first step of a few to move to a "fetch model" rather than have each resumer dump their execution details at some arbitrary cadence. The core logic involved in collecting profiler details has not changed, it has been moved in its entirety from pkg/sql to pkg/server. The `crdb_internal.request_job_execution_details` builtin now resolves the job's coordinator ID and calls the new status server endpoint. Informs: #109671 Release note: None Co-authored-by: Andy Yang <[email protected]> Co-authored-by: adityamaru <[email protected]>
110380: pgcryptocipherccl: add FuzzEncryptDecryptAESNoPadding test r=chrisseto a=andyyang890 This patch adds another fuzz test for testing that a round trip of `Encrypt` and `Decrypt` returns the original input when used with the no padding option. Informs #21001 Release note: None Co-authored-by: Andy Yang <[email protected]>
110408: pgcryptocipherccl: don't panic when passed invalid padding size r=rafiss a=andyyang890 This patch modifies `zeroPadOrTruncate` to return an error instead of panicking when it is passed an invalid (i.e. negative) padding size. Note that this is currently only possible as the result of programmer error. We also add a unit test to validate the function's expected behavior. Informs #21001 Release note: None 110580: tree: fix formatting of SHOW BACKUP WITH OPTIONS r=rafiss a=rafiss This avoids an ambiguity when formatting the statement. fixes #110411 Release note: None Co-authored-by: Andy Yang <[email protected]> Co-authored-by: Rafi Shamim <[email protected]>
FEATURE REQUEST
https://vernemq.com/docs/configuration/db-auth.html
is there an equivalent crypt(x.password, x.salt) available?
#19368 has reference to pgcrypt. crypt is a part of the pgcrypto module.
Update on 2023-05-09: Here is a list showing the currently supported functions. We are working on adding support for the remaining ones.
pgcrypto
also has PGP functions which we may or may not add, since the security community is generally moving away fromopenpgp
. These are also tracked in #73869.Jira issue: CRDB-5904
Epic CRDB-10655
The text was updated successfully, but these errors were encountered: