mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactoring ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Move auth_scram functions to OSS
22 lines
1006 B
SQL
22 lines
1006 B
SQL
/* Authenticate using SCRAM SHA256 with postgresql db for a specific user name */
|
|
CREATE OR REPLACE FUNCTION helio_api.authenticate_with_scram_sha256(
|
|
p_user_name text, p_auth_msg text, p_client_proof text)
|
|
RETURNS helio_core.bson
|
|
LANGUAGE C
|
|
PARALLEL SAFE STABLE
|
|
AS 'MODULE_PATHNAME', $$command_authenticate_with_scram_sha256$$;
|
|
COMMENT ON FUNCTION helio_api.authenticate_with_scram_sha256(text, text, text)
|
|
IS 'Used to authenticate the user with Postgresql DB using SCRAM SHA-256';
|
|
|
|
/*
|
|
* helio_api.scram_sha256_get_salt_and_iterations() gets SALT and Iteration
|
|
* count for the given user from the Postgresql DB
|
|
*/
|
|
CREATE OR REPLACE FUNCTION helio_api.scram_sha256_get_salt_and_iterations(
|
|
p_user_name text)
|
|
RETURNS helio_core.bson
|
|
LANGUAGE C
|
|
PARALLEL SAFE STABLE
|
|
AS 'MODULE_PATHNAME', $$command_scram_sha256_get_salt_and_iterations$$;
|
|
COMMENT ON FUNCTION helio_api.scram_sha256_get_salt_and_iterations(text)
|
|
IS 'Gets SALT and Iteration count for the given user from the backend'; |