-
Notifications
You must be signed in to change notification settings - Fork 10
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
Credentials encrypting not writing in the correct app #211
Comments
Hi, |
sadly no, and it won't be released. It's a Input written for a specific integration. I might be able to give more information thought... lib/requirements.txt only contains splunk-sdk & splunktaucclib may be the only "non standard" action we've done, is to edit the 'input_declare*.py" to insert the lib folder instead of appending it : we add issues with the requests shipped by splunk, so by inserting the lib folder we manage to avoid the issue Our password retrieval is as follow : decrypted_data=None
# Retrieve the password from the storage/passwords endpoint
for storage_password in mod_input_.service.storage_passwords:
if storage_password.username == account+"``splunk_cred_sep``1":
decrypted_data=storage_password.content.clear_password
if decrypted_data is None:
raise ValueError(f"Configuration Error : encrypted_data not found for user {account}") |
@Jalkar I actually fixed the issue with the "import_declare_test.py" in the v5.25.0 which was released this week, please check it out! I would suggest using |
My concern is that if i'm right, the password replacement with "****" is not done in the 'run' of the modular input but on splunk startup |
I confirm my saying above. The CredentialManager is not helping as the "******" replacement step is done by the gui access to the configuration page. I've done the following test :
From my testing, it seems the issue is with the creation of the 'rh_account.py' in which there is a SingleModel object created without app context. If you put any app it will use it as the target. endpoint = SingleModel(
'mod_input_x_account',
model,
config_name='account',app="launcher"
) with the snippet above, my "*****" landed in the launcher app even though the config is in another app. |
I believe you can reproduce the issue with this demo repo : https://github.com/Jalkar/demo_ucc_issue |
@Jalkar I think the behaviour that you see is correct from my perspective, you should not see objects from another apps by default. |
I know there are people who like to keep their configuration in one place (one specific add-on for configuration), do you mind sharing why do you prefer keeping configuration in the separate add-on? |
We keep the conf outside the app to ease deployment & maintenance |
For the above use case mentioned, have you tried using deployment server to deploy your add-ons to multiple Splunk Enterprise forwarders? Accessing secrets from different apps would be an issue in a scenario where a user has used the same name for credentials in 2+ add-ons, hence an add-on should be writing in its own namespace and reading from the same to avoid such issues. |
Hi,
I'm not sure if it's bug, an enhancement request or a rtfm request ^^'
We have a Modular input based on UCC generator which is used for several client.
We have configuration app which provides account/inputs for those client.
Our issue is that the credentials replacement with
******
is not working as we expect : it's writing the******
in the modular input itself instead of overwriting the configuration app files.The result is that the password are always in clear text in our configuration.
In fact all edition of the config are written in the modular input instead of the config app.
How can we make sure the password credentials overwrite the proper files ?
The text was updated successfully, but these errors were encountered: