-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings defined in app.config does not work with encryption #21900
Comments
Is it recommended to use the ISettingManager instead and if so, would that affect this? Guessing not because of this from docs "Use the ISettingProvider instead of the ISettingManager if you only need to read the setting values, because it implements caching and supports all deployment scenarios. You can use the ISettingManager if you are creating a setting management UI." |
The setting value in |
Thanks for responding. I linked to that thread above, there is actually no mentioning of that in the thread or in the documentation from what I can see as well as information on how to actually do the encryption. It also only seem to refer to the default value and when running custom code, which would most likely be "-" or something like that for a sensitive data. It does state "Usually, you don't need to care about the encryption, which is done automatically." which does not seem to be true. That said, it would seem reasonable that the value should be encrypted in appsettings or when overridden in hosting etc. but then the documentation needs to be updated to mention this as well as how to do it. I assume you are not supposed to build a utility of you own using ISettingEncryptionService just for it, can it be done using the CLI? Thanks. |
The setting values in We will use |
I think that this should at least be mentioned in the documentation at https://abp.io/docs/latest/framework/infrastructure/settings that for encrypted values, you need to encrypt them manually yourself. The example given under "Setting Values in the Application Configuration" is quite confusing if not incorrect in itself, as it supplies the Abp.Mailing.Smtp.Password as an unencrypted value in appsettings.json, even though that is a setting that is supposed to be encrypted so the provided example would not work. Encrypt the SMTP Password https://abp.io/docs/latest/framework/infrastructure/emailing |
Is there an existing issue for this?
Description
It seems like when defining settings in app.config like
It does not seem to work when those settings are supposed to be encrypted like:
When you try to read them like:
the encrypted value will always be string.Empty (""). If you disable encryption it will work fine.
This seems like a bug unless our implementation is wrong.
There is a related topic here but since we are defining settings in app.config, I don't think it applies here.
https://abp.io/support/questions/5911/Encrypted-Setting-Default-Value
Thanks.
The text was updated successfully, but these errors were encountered: