Skip to content
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

Facing issues while running CureIAM #1

Open
discoverrange opened this issue Jan 22, 2023 · 0 comments
Open

Facing issues while running CureIAM #1

discoverrange opened this issue Jan 22, 2023 · 0 comments

Comments

@discoverrange
Copy link

python3 -m CureIAM -n

2023-01-22 16:23:28 [34581] [MainProcess] [MainThread] INFO CureIAM.manager:36 - CureIAM 0.1.0
2023-01-22 16:23:28 [34581] [MainProcess] [MainThread] INFO CureIAM.util:38 - Looking for /etc/CureIAM.yaml
2023-01-22 16:23:28 [34581] [MainProcess] [MainThread] INFO CureIAM.util:43 - Found /etc/CureIAM.yaml
2023-01-22 16:23:28 [34581] [MainProcess] [MainThread] INFO CureIAM.util:38 - Looking for /root/.CureIAM.yaml
2023-01-22 16:23:28 [34581] [MainProcess] [MainThread] INFO CureIAM.util:38 - Looking for /root/CureIAM.yaml
2023-01-22 16:23:28 [34581] [MainProcess] [MainThread] INFO CureIAM.util:38 - Looking for CureIAM.yaml
2023-01-22 16:23:28 INFO [34581] CureIAM.manager:51 - CureIAM 0.1.0; configured manager.py:51
INFO [34581] CureIAM.manager:56 - Starting job now manager.py:56
INFO [34581] CureIAM.manager:284 - Skipping email notification because email config is missing; about: all audits; state: starting manager.py:284
INFO [34581] CureIAM.manager:284 - Skipping email notification because email config is missing; about: IAMAudit; state: starting manager.py:284
INFO [34582] CureIAM.workers:190 - store_worker: IAMAudit_filestore: Started workers.py:190
INFO [34585] CureIAM.workers:88 - processor_worker: IAMAudit_gcpIamProcessor: Started workers.py:88
INFO [34583] CureIAM.workers:190 - store_worker: IAMAudit_esstore: Started workers.py:190
INFO [34584] CureIAM.workers:32 - cloud_worker: IAMAudit_gcpCloud: Started workers.py:32
ERROR [34585] CureIAM.workers:93 - processor_worker: IAMAudit_gcpIamProcessor: Failed; error: FileNotFoundError: [Errno 2] No such file or directory: 'cureiamSA.json - foo - workers.py:93
bar'
Traceback (most recent call last):
File "/home/test/CureIAM/CureIAM/workers.py", line 91, in processor_worker
plugin = util.load_plugin(plugin_config)
File "/home/test/CureIAM/CureIAM/util.py", line 120, in load_plugin
plugin = plugin_class(**plugin_params)
File "/home/test/CureIAM/CureIAM/processors/gcpcloudiam.py", line 47, in init
self._cloud_resource = util.build_resource(
File "/home/test/CureIAM/CureIAM/util.py", line 643, in build_resource
credential = service_account.Credentials.from_service_account_file(
File "/usr/local/lib/python3.9/dist-packages/google/oauth2/service_account.py", line 241, in from_service_account_file
info, signer = _service_account_info.from_filename(
File "/usr/local/lib/python3.9/dist-packages/google/auth/_service_account_info.py", line 80, in from_filename
with io.open(filename, "r", encoding="utf-8") as json_file:
FileNotFoundError: [Errno 2] No such file or directory: 'cureiamSA.json - foo - bar'
INFO [34585] CureIAM.workers:95 - processor_worker: IAMAudit_gcpIamProcessor: Stopped workers.py:95
ERROR [34584] CureIAM.workers:51 - cloud_worker: IAMAudit_gcpCloud: Failed; error: FileNotFoundError: [Errno 2] No such file or directory: 'cureiamSA.json' workers.py:51
Traceback (most recent call last):
File "/home/test/CureIAM/CureIAM/workers.py", line 35, in cloud_worker
plugin = util.load_plugin(plugin_config)
File "/home/test/CureIAM/CureIAM/util.py", line 120, in load_plugin
plugin = plugin_class(**plugin_params)
File "/home/test/CureIAM/CureIAM/clouds/gcpcloud.py", line 40, in init
credentials = service_account.Credentials.from_service_account_file(
File "/usr/local/lib/python3.9/dist-packages/google/oauth2/service_account.py", line 241, in from_service_account_file
info, signer = _service_account_info.from_filename(
File "/usr/local/lib/python3.9/dist-packages/google/auth/_service_account_info.py", line 80, in from_filename
with io.open(filename, "r", encoding="utf-8") as json_file:
FileNotFoundError: [Errno 2] No such file or directory: 'cureiamSA.json'
INFO [34584] CureIAM.workers:54 - cloud_worker: IAMAudit_gcpCloud: Stopped workers.py:54
INFO [34582] CureIAM.workers:204 - store_worker: IAMAudit_filestore: Stopping workers.py:204
INFO [34582] CureIAM.workers:224 - store_worker: IAMAudit_filestore: Stopped workers.py:224
ERROR [34583] CureIAM.workers:195 - store_worker: IAMAudit_esstore: Failed; error: ImportError: cannot import name 'ElasticsearchException' from 'elasticsearch' workers.py:195
(/usr/local/lib/python3.9/dist-packages/elasticsearch/init.py)
Traceback (most recent call last):
File "/home/test/CureIAM/CureIAM/workers.py", line 193, in _write_worker
plugin = util.load_plugin(plugin_config)
File "/home/test/CureIAM/CureIAM/util.py", line 113, in load_plugin
plugin_module = importlib.import_module(parts[0])
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/test/CureIAM/CureIAM/stores/esstore.py", line 8, in
from elasticsearch import Elasticsearch, ElasticsearchException
ImportError: cannot import name 'ElasticsearchException' from 'elasticsearch' (/usr/local/lib/python3.9/dist-packages/elasticsearch/init.py)
INFO [34583] CureIAM.workers:197 - store_worker: IAMAudit_esstore: Stopped workers.py:197
INFO [34581] CureIAM.manager:284 - Skipping email notification because email config is missing; about: IAMAudit; state: ending manager.py:284
INFO [34581] CureIAM.manager:284 - Skipping email notification because email config is missing; about: all audits; state: ending manager.py:284

Please help me with this, did I miss out anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant