You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Run cartography CLI without Okta API key failed the sync process.
Description:
All sync targets are supposed to be optional. The CLI should finish the execution without crash when either option --okta-api-key-env-var or --okta-org-id is not provided.
To Reproduce:
AWS_PROFILE=.. cartography
Logs:
INFO:cartography.sync:Starting sync with update tag '1588113605'
INFO:cartography.sync:Starting sync stage 'create-indexes'
INFO:cartography.intel.create_indexes:Creating indexes for cartography node types.
INFO:cartography.sync:Finishing sync stage 'create-indexes'
INFO:cartography.sync:Starting sync stage 'aws'
...
INFO:cartography.sync:Finishing sync stage 'aws'
INFO:cartography.sync:Starting sync stage 'gcp'
INFO:oauth2client.client:Timeout attempting to reach GCE metadata service.
ERROR:cartography.intel.gcp:Unable to initialize Google Compute Platform creds. If you don't have GCP data or don't want to load GCP data then you can ignore this message. Otherwise, the error code is: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. Make sure your GCP credentials are configured correctly, your credentials file (if any) is valid, and that the identity you are authenticating to has the securityReviewer role attached.
INFO:cartography.sync:Finishing sync stage 'gcp'
INFO:cartography.sync:Starting sync stage 'gsuite'
ERROR:cartography.intel.gsuite:Unable to initialize GSuite creds. If you don't have GSuite data or don't want to load Gsuite data then you can ignore this message. Otherwise, the error code is: The parameter passed to the from_stream() method should point to a file. Make sure your GSuite credentials are configured correctly, your credentials file (if any) is valid. For more details see README
INFO:cartography.sync:Finishing sync stage 'gsuite'
INFO:cartography.sync:Starting sync stage 'crxcavator'
WARNING:cartography.intel.crxcavator:CRXcavator import is not configured - skipping this module. See docs to configure.
INFO:cartography.sync:Finishing sync stage 'crxcavator'
INFO:cartography.sync:Starting sync stage 'okta'
ERROR:cartography.sync:Unhandled exception during sync stage 'okta'
Traceback (most recent call last):
File "/Users/kledo/src/cartography/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "/Users/kledo/src/cartography/cartography/util.py", line 58, in timed
return method(*args, **kwargs)
File "/Users/kledo/src/cartography/cartography/intel/okta/__init__.py", line 40, in start_okta_ingestion
if not config.okta_api_key:
AttributeError: 'Namespace' object has no attribute 'okta_api_key'
Traceback (most recent call last):
File "/Users/kledo/.virtualenvs/cartographyenv/bin/cartography", line 11, in <module>
load_entry_point('cartography', 'console_scripts', 'cartography')()
File "/Users/kledo/src/cartography/cartography/cli.py", line 297, in main
return CLI(default_sync, prog='cartography').main(argv)
File "/Users/kledo/src/cartography/cartography/cli.py", line 277, in main
return cartography.sync.run_with_config(self.sync, config)
File "/Users/kledo/src/cartography/cartography/sync.py", line 145, in run_with_config
return sync.run(neo4j_driver, config)
File "/Users/kledo/src/cartography/cartography/sync.py", line 71, in run
stage_func(neo4j_session, config)
File "/Users/kledo/src/cartography/cartography/util.py", line 58, in timed
return method(*args, **kwargs)
File "/Users/kledo/src/cartography/cartography/intel/okta/__init__.py", line 40, in start_okta_ingestion
if not config.okta_api_key:
AttributeError: 'Namespace' object has no attribute 'okta_api_key
Please complete the following information::
Cartography release version or commit hash: 970ab87
* Set okta_api_key to None when not configured. Corrected the log for CRXcavator (#293)
* Update setup step for JAVA_HOME and Neo4j auth setting when testing locally. Replaced tabs with spaces
Title: Run
cartography
CLI without Okta API key failed the sync process.Description:
All sync targets are supposed to be optional. The CLI should finish the execution without crash when either option
--okta-api-key-env-var
or--okta-org-id
is not provided.To Reproduce:
AWS_PROFILE=.. cartography
Logs:
Please complete the following information::
Additional context:
Looks like
okta_api_key
should have been set toNone
in the else clause here: https://github.com/lyft/cartography/blob/master/cartography/cli.py#L253.The text was updated successfully, but these errors were encountered: