Show masked aws secret key if set for Advaced Search
What does this MR do and why?
Currently it's impossible to tell if the AWS Secret Access Key
value is set from the Advanced Search Admin Settings UI as the field stays blank in both states (set and not set). This MR adds a masked value (hardcoded constant ****
) if the AWS Secret Access Key is set.
Note: this works the exact same way as the Password
field on the form above
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- you do not need to have elasticsearch setup to verify this
- navigate to Admin Settings - Advanced Search
- Make sure that
Use AWS OpenSearch Service with IAM credentials
is NOT enabled or it will try to connect and fail to save - Set the
AWS OpenSearch IAM credentials
to anything - Verify that the field shows
****
if the secret key is set - Check in the rails console that the field is setup correctly:
ApplicationSetting.current_without_cache.elasticsearch_aws_secret_access_key
- Click save again on the Advanced Search settings page (do not edit anything) to test that the
****
does not accidentally overwrite the value in the database - Check in the rails console that the field is still set and not
****
:ApplicationSetting.current_without_cache.elasticsearch_aws_secret_access_key
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Terri Chu