@@ -19,6 +19,7 @@ export const BaseSettingsDefinition = {
1919 description : 'Starting path for the EA handler endpoint' ,
2020 type : 'string' ,
2121 default : '/' ,
22+ sensitive : false ,
2223 } ,
2324 CACHE_LOCK_DURATION : {
2425 description : 'Time (in ms) used as a baseline for the acquisition and extension of cache locks' ,
@@ -57,6 +58,7 @@ export const BaseSettingsDefinition = {
5758 description : 'Hostname for the Redis instance to be used' ,
5859 type : 'string' ,
5960 default : '127.0.0.1' ,
61+ sensitive : false ,
6062 } ,
6163 CACHE_REDIS_MAX_RECONNECT_COOLDOWN : {
6264 description : 'Max cooldown (in ms) before attempting redis reconnection' ,
@@ -72,6 +74,7 @@ export const BaseSettingsDefinition = {
7274 CACHE_REDIS_PATH : {
7375 description : 'The UNIX socket string of the Redis server' ,
7476 type : 'string' ,
77+ sensitive : false ,
7578 } ,
7679 CACHE_REDIS_PORT : {
7780 description : 'Port for the Redis instance to be used' ,
@@ -102,6 +105,7 @@ export const BaseSettingsDefinition = {
102105 description : 'Specifies a prefix to use for cache keys' ,
103106 type : 'string' ,
104107 default : '' ,
108+ sensitive : false ,
105109 } ,
106110 STREAM_HANDLER_RETRY_MAX_MS : {
107111 type : 'number' ,
@@ -156,6 +160,7 @@ export const BaseSettingsDefinition = {
156160 description : 'Minimum level required for logs to be output' ,
157161 type : 'string' ,
158162 default : 'info' ,
163+ sensitive : false ,
159164 } ,
160165 CENSOR_SENSITIVE_LOGS : {
161166 description : 'Controls whether the logging of sensitive information is enabled or disabled' ,
@@ -187,6 +192,7 @@ export const BaseSettingsDefinition = {
187192 description :
188193 'Rate limiting tier to use from the available options for the adapter. If not present, the adapter will run using the first tier on the list.' ,
189194 type : 'string' ,
195+ sensitive : false ,
190196 } ,
191197 RATE_LIMIT_CAPACITY : {
192198 description : 'Used as rate limit capacity per minute and ignores tier settings if defined' ,
@@ -274,13 +280,15 @@ export const BaseSettingsDefinition = {
274280 description : 'Default key to be used when one cannot be determined from request parameters' ,
275281 type : 'string' ,
276282 default : 'DEFAULT_CACHE_KEY' ,
283+ sensitive : false ,
277284 } ,
278285 EA_HOST : {
279286 description :
280287 'Host this EA will listen for REST requests on (if mode is set to "reader" or "reader-writer")' ,
281288 type : 'string' ,
282289 default : '::' ,
283290 validate : validator . host ( ) ,
291+ sensitive : false ,
284292 } ,
285293 EA_MODE : {
286294 description :
@@ -316,6 +324,7 @@ export const BaseSettingsDefinition = {
316324 description : 'Base64 Public Key of TSL/SSL certificate' ,
317325 type : 'string' ,
318326 validate : validator . base64 ( ) ,
327+ sensitive : false ,
319328 } ,
320329 TLS_PASSPHRASE : {
321330 description : 'Password to be used to generate an encryption key' ,
@@ -658,6 +667,7 @@ export class AdapterConfig<T extends SettingsDefinitionMap = SettingsDefinitionM
658667 * RPC_URL are potentially sensitive given it may contain API keys in path
659668 */
660669 buildCensorList ( ) {
670+ const alwaysCensored = [ 'RPC_URL' , 'API_KEY' ]
661671 const censorList : CensorKeyValue [ ] = Object . entries (
662672 BaseSettingsDefinition as SettingsDefinitionMap ,
663673 )
@@ -666,7 +676,8 @@ export class AdapterConfig<T extends SettingsDefinitionMap = SettingsDefinitionM
666676 ( [ name , setting ] ) =>
667677 setting &&
668678 setting . type === 'string' &&
669- ( setting . sensitive || name . endsWith ( 'RPC_URL' ) ) &&
679+ ( setting . sensitive !== false ||
680+ alwaysCensored . some ( ( pattern ) => name . includes ( pattern ) ) ) &&
670681 ( this . settings as Record < string , ValidSettingValue > ) [ name ] ,
671682 )
672683 . map ( ( [ name ] ) => ( {
0 commit comments