mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description ---- #### AI description (iteration 1) #### PR Classification Code cleanup #### PR Summary This pull request moves the `auth_scram` functions back to the OSS directory and updates the relevant SQL files to reflect this change. - Moved `auth_scram--1.14-0.sql` and `auth_scram--latest.sql` from `helio_api/pg_helio_api/sql/udfs/auth` to `oss/pg_documentdb/sql/udfs/auth`. - Updated `pg_helio_api--1.12-0--1.13-0.sql` to include the new path for `auth_scram--1.14-0.sql`. - Updated `pgmongo--1.13-2--1.14-0.sql` to include the new path for `auth_scram--1.14-0.sql`. - Updated `documentdb--0.24-0.sql` to include the new path for `auth_scram--1.14-0.sql`.
22 lines
1.1 KiB
SQL
22 lines
1.1 KiB
SQL
/* Authenticate using SCRAM SHA256 with postgresql db for a specific user name */
|
|
CREATE OR REPLACE FUNCTION __API_SCHEMA_INTERNAL_V2__.authenticate_with_scram_sha256(
|
|
p_user_name text, p_auth_msg text, p_client_proof text)
|
|
RETURNS __CORE_SCHEMA_V2__.bson
|
|
LANGUAGE C
|
|
PARALLEL SAFE STABLE
|
|
AS 'MODULE_PATHNAME', $$command_authenticate_with_scram_sha256$$;
|
|
COMMENT ON FUNCTION __API_SCHEMA_INTERNAL_V2__.authenticate_with_scram_sha256(text, text, text)
|
|
IS 'Used to authenticate the user with Postgresql DB using SCRAM SHA-256';
|
|
|
|
/*
|
|
* scram_sha256_get_salt_and_iterations() gets SALT and Iteration
|
|
* count for the given user from the Postgresql DB
|
|
*/
|
|
CREATE OR REPLACE FUNCTION __API_SCHEMA_INTERNAL_V2__.scram_sha256_get_salt_and_iterations(
|
|
p_user_name text)
|
|
RETURNS __CORE_SCHEMA_V2__.bson
|
|
LANGUAGE C
|
|
PARALLEL SAFE STABLE
|
|
AS 'MODULE_PATHNAME', $$command_scram_sha256_get_salt_and_iterations$$;
|
|
COMMENT ON FUNCTION __API_SCHEMA_INTERNAL_V2__.scram_sha256_get_salt_and_iterations(text)
|
|
IS 'Gets SALT and Iteration count for the given user from the backend'; |