MOD-7613: Add search-oss-global-password#5237
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## nafraf_config-params #5237 +/- ##
========================================================
- Coverage 87.28% 87.24% -0.04%
========================================================
Files 196 196
Lines 34986 34997 +11
========================================================
- Hits 30538 30534 -4
- Misses 4448 4463 +15 ☔ View full report in Codecov by Sentry. |
tests/pytests/test_config.py
Outdated
| .error().contains('CONFIG SET failed') | ||
|
|
||
|
|
||
| @skip(cluster=False, redis_less_than='8.1.0') |
There was a problem hiding this comment.
Should be greater than 8.0.2? (what we have now)
There was a problem hiding this comment.
Now it is skipped on less than 8.0, for redis-server 8.0.m02 the version number is v=7.9.225.
Another option is to skip it on less than 7.9.226 to include the test on the 8.0.m03 if it exists.
src/coord/config.c
Outdated
| if (clusterConfig.type == ClusterType_RedisOSS) { | ||
| if (RedisModule_RegisterStringConfig ( | ||
| ctx, "search-oss-global-password", "", | ||
| REDISMODULE_CONFIG_IMMUTABLE | REDISMODULE_CONFIG_UNPREFIXED, |
There was a problem hiding this comment.
Should we use REDISMODULE_CONFIG_SENSITIVE flag as well to redact it in logging?
There was a problem hiding this comment.
Yes, we should. Flag added
src/coord/config.c
Outdated
| // acl-username | ||
| RedisModuleString * get_oss_acl_username(const char *name, void *privdata) { | ||
| char *str = *(char **)privdata; | ||
| if (str) { |
There was a problem hiding this comment.
Can null check be dropped? (if initialized properly)
There was a problem hiding this comment.
Yes. Check dropped.
src/coord/config.c
Outdated
| if (config_oss_acl_username) { | ||
| RedisModule_FreeString(NULL, config_oss_acl_username); | ||
| } |
There was a problem hiding this comment.
Not need to free previous value since it is immutable. Consider also denoting the setter is for immutable config params.
There was a problem hiding this comment.
Changes done and setter function renamed.
src/coord/config.c
Outdated
|
|
||
| CONFIG_SETTER(setGlobalPass) { | ||
| RedisModule_Log(RSDummyContext, "warning", | ||
| "OSS_GLOBAL_PASSWORD is deprecated. Use `CONFIG SET search-oss-global-password <password>` instead"); |
There was a problem hiding this comment.
Shouldn't the set be in the config file? since it is immutable
Maybe clarify that in the warning.
Also it isn't clear that the operation was able to set the value inf the warning.
* WIP: Config parameters * Refactor config register * MOD-7596: Add mirroring support (#4937) * * initial commit * * Use RediSearch branch mirroring fork * * Code Review - Round #1 * Change maxPending requests when changing the number of connections (#4972) change the number of maxPending requests when changing the number of connections * Test boolean parameters * Fix boolean params default values * MOD-7695: Decide Ubuntu Runner Using Variable (#4975) * * initial commit * * code review * Enable MT in comunity eddition by default - [MOD-7160] (#4974) * remove compilation flag (wip) * finish removing compilation flag * remove from tests * MOD-7706 fix ramp-packer version (#4980) ramp-packer 2.5.10 * HNSW vector index - handle inplace deletion after async [MOD-7643] (#4964) * Fix inplace deletion in tiered index in vecsim * remove excessive thread iteration log, finalize test * update vecsim version * update vecsim version - fixing bug found in test vecsim with json multi * remove print from test * better logging * test - print warning always * test2 - print warning DEBUG AND CI ENV VARS * use force for env vars * try print instead * print for GHA annotation * Add two immutable params * Fix max-doctablesize name * MOD-7737: Add relaxation flags to Rocky9 installations (#4989) Add relaxing installation flags to Rocky platform * MOD-7646 cmake fetch boost if not exists (#4984) cmake fetch boost if not exists * MOD-7465 MOD-7466: Add ACL support for RediSearch, phase 1 (#4957) * Support ACL for RediSearch commands - wip * Register RediSearch commands to redis ACL categories * Add tests * Small fix * Add coordinator commands registration * Register underscored commands to ACL as well * Remove dangerous from INFO * Skip test conditioned on redis version * Fix categories according to new evaluation * Remove comments * Fix * Address review * Remove TODOs * Replace macro with function * Wrap with RM_TRY * Fix unit-tests * Touchup * Address review * Address review * Address review * Bump sanitizer and Valgrind to use 7.4 * Address review * Touchups * Remove TODOs * Fix test * Address review * Move hack to src * WIP: Register numeric params * WIP: Config numeric params * WIP: CONFIG value precedence * Complete boolean parameters * Test search.partial-indexed-docs * Fix string configs * Add index-cursor-limit config * Fix unit tests * Create cluster configuration params * Fix cluster configuration params * Test MODULE LOADEX numeric config * WIP: Test MODULE LOADEX bool config * Fix set_no_gc() * Fix string config parameters * Test MODULE LOADEX enum config * Fix set_workers() * Fix numeric parameter limit * Test boolean parameters with config file * Test with config file: numeric, enum, string * Add max-aggregate-results and max-search-results * tidy up * Add more tests * Use REDISMODULE_CONFIG_UNPREFIXED flag * Revert "Use REDISMODULE_CONFIG_UNPREFIXED flag" This reverts commit b1985fc. * Use common setfn, getfn for numeric params * Fix mem leak 1 * Fix mem leak 2 - string config * Disable immutable limits tests * Use RLTest >= 0.7.14 * Check version before loading config * Add testConfigAPILoadTimeNumericParams() * Fix unit-tests * Refactor config API function parameters for consistency * Use privdata in numeric config params * Refactor boolean config registration and clean up unused macros * Refactor configuration setter functions to improve consistency * Refactor coord config functions * Refactor config functions for improved clarity and consistency * search-gc-scan-size is Load-Time immutable * Fixes from code review * Remove parameter modified validation * Fix search-ext-load and search-friso-ini tests * Remove global config vars * Remove str validation from get_string_config() * Update default configuration to initialize extLoad and frisoIni as empty strings * MOD-7613: Add search-oss-global-password (#5237) 1. Configure the module parameter search-oss-global-password which is equivalent to the previous OSS_GLOBAL_PASSWORD module parameter. 2. Configure the module parameter search-oss-acl-username which is equivalent to the previous OSS_ACL_USERNAME --------- Co-authored-by: kei-nan <[email protected]> Co-authored-by: GuyAv46 <[email protected]> Co-authored-by: DvirDukhan <[email protected]> Co-authored-by: alonre24 <[email protected]> Co-authored-by: Raz Monsonego <[email protected]> Co-authored-by: oshadmi <[email protected]>
Describe the changes in the pull request
search-oss-global-passwordwhich is equivalent to the previous OSS_GLOBAL_PASSWORD module parameter.search-oss-acl-usernamewhich is equivalent to the previous OSS_ACL_USERNAMEWhich issues this PR fixes
Main objects this PR modified
Mark if applicable