intelowlproject / IntelOwl

IntelOwl: manage your Threat Intelligence at scale
https://intelowlproject.github.io
GNU Affero General Public License v3.0
3.82k stars 432 forks source link

Error when trying to run with AWS Secrets Manager #2540

Open arakakiv opened 5 days ago

arakakiv commented 5 days ago

What happened

When executing the container _intel_owluwsgi, an error occurs indicating that the settings object lacks the AWS_REGION key. I initially thought I hadn’t passed the environment variable, but I followed step by step the docs. I set up AWS_REGION, the necessary credentials (access keys or AWS_IAM_ACCESS), and AWS_SECRETS environment variables, both in the AWS infrastructure and locally with access keys. Additionally, I tried setting these variables both by manually exporting them in the shell and using the _env_fileapp file.

Environment

  1. OS: Ubuntu LTS 22.04
  2. IntelOwl version: v6.1.0

What did you expect to happen

Retrieve my AWS secrets from the AWS Secrets Manager service.

How to reproduce your issue

  1. Run the initialize.sh script.
  2. Set up the AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and the AWS_SECRETS environment variables in the env_file_app.
  3. Run the ./start prod up command.

Error messages and logs

The error basically says that the settings object doesn't have the AWS_REGION key. I look at the code and in the secrets.py file, but I couldn't understand why the error is occurring. It looks like occurs when running the manage.py script, but I can be wrong.

Error

mlodic commented 15 hours ago

hey, thanks for reporting. I opened a PR https://github.com/intelowlproject/IntelOwl/pull/2541/files. It should be fixed into the next release

arakakiv commented 14 hours ago

hey, thanks for reporting. I opened a PR https://github.com/intelowlproject/IntelOwl/pull/2541/files. It should be fixed into the next release

I really appreciate your response, thanks. The whole problem was that it wasn't possible to retrieve the AWS_REGION variable from the django settings? Why I wasn't being able to modify the code and run it? Did I did something wrong?

*I was modifying the source code and trying to run the start script.

arakakiv commented 11 hours ago

hey, thanks for reporting. I opened a PR https://github.com/intelowlproject/IntelOwl/pull/2541/files. It should be fixed into the next release

Also, I cloned the branch but I couldn't make it work as well. Is there any steps that I'm missing based on what I provided on the issue description?