Is it possible, like it is for the "password" parameter in devise for example, to declare other parameters that would need to be hidden from logs ? If possible, how should it be done ?
You add any parameters you want to filter to the file config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
password is already filtered so just add any others to the array [:password,:hidden_parameter]
Related
i'm tryimg to loop over a diffrent countries folder that got fixed sub folder named survey (i.e Spain/survey , USA/survey ).
where and how I Need to define a wildcard / parameter for the countries so I could loop over all the files that in the survey folder ?
what is the right wildcard syntax ? ( the equivalent of - like 'survey%' in SQL) ?
I tried several ways to define it with no success and I would be happy to get some help on this - Thanks !
In case if the list of paths are static, you can create a parameter or add it in a SQL database and get that result from a lookup activity.
Pass the output to a for each activity and within foreach activity use a copy activity.
You can parameterize the input dataset to get the file paths thereby you need not think of any wildcard characters but use the actual paths itself.
Hope this is helpful.
I'm using pykeepass to do bulk modification on several hundred keepass files and I'd like to add some additional attributes to the keepass entries.
I tried to do it like this:
def updateRecord(record, recordParent, recordGrandparent, recordGreatGrandparent, kdbxHandle):
record.custom_properties["keepass2"] = recordGrandparent
record.custom_properties["keepass3"] = recordGreatGrandparent
kdbxHandle.save()
return record
but this has zero effect (no error message no nothing). From my understanding record.custom_properties is a dict which I should be able to modify.
What do I have to do, to add additional attributes to a keepass file with pykeepass?
Thank you!
Ok I can answer my own question - setting a custom property is done like this:
record.set_custom_property("keepass2", recordGrandparent)
The following command does not append but replaces the content
echo 0 >> /sys/block/nvme0n1/queue/nomerges
I don't want to replace but append. But I'm curious Is there something special about this file?
It also doesn't allow more than one character as its input.
Look at https://serverfault.com/questions/865787/what-does-the-nomerge-mean-in-linux-system
It might help you in understanding, that there are only 3 options that the file can take.
Also:
nomerges enables the user to disable the lookup logic involved with IO
merging requests in the block layer. By default (0) all merges are
enabled. When set to 1 only simple one-hit merges will be tried. When
set to 2 no merge algorithms will be tried (including one-hit or more
complex tree/hash lookups).
I have added # character in name, emailId and address. But when I see in hmc or backoffice , hash(#) is removed. name and emailId exist without hash.
Why hybris is not taking # character in any attribute value?
The de.hybris.platform.servicelayer.web.XSSFilter class strips the # character from the input fields. You can test it by adding the following value to your local.properties:
xss.filter.enabled=false
Once you do this, you will be able to capture data containing a # character. But since you don't want to disable XSSFilter, so the only way around it is to override the doFilter method on XSSFilter and add some logic to exclude data that would contain # character.
Also, if you are trying to save such values at other places like local.properties, then please try storing the value like below, use \\ before # symbol:
property.value=hybris\\#value
I have a requirement such that whenever i run my Kettle job, the database connection parameters must be taken dynamically from an excel source on each run.
Say i have an excel with column names : HostName, Username, Database, Password.
i want to pass these connection parameters to my table input step dynamically whenever the job runs.
This is what i was trying to do.
You can achieve this by
reading the DB connection parameters from a source (e.g. Excel or in my example a CSV file)
storing the parameters in variables
using the variables in your connection setting.
Proceed as follows
Create another transformation for setting the variables (you cannot do this in the same transformation that uses it):
In the Set Variables element configure the variables:
In the element reading/writing your data create a new connection and set the connection parameters using ${variable_name}. Note that you have to blindly write ${password} into the appropriate field. Also note that this may be a security issue because the value may show up as plain text in log files!
In your job call the variable transformation first and then the functional part:
All you need is the XLS input and the Set Variables step. Define your variables as being valid in the Root job and you can use them in subsequent jobs, as long as they're called by the same root job, when defining the connection.
The "Copy rows to result" and "Get rows from result" are used to send information (rows of data) from one transformation to the next transformation or job in the same parent job. They're not used to send data between steps, that's what the hops are for.