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

#293 Fix issue with optional Okta sync #295

Merged
merged 3 commits into from
Apr 30, 2020
Merged

#293 Fix issue with optional Okta sync #295

merged 3 commits into from
Apr 30, 2020

Conversation

khanhldt
Copy link
Contributor

@khanhldt khanhldt commented Apr 29, 2020

Notes

Issue: #293

Since I found out about this issue as part of trying to run cartography for the first time, I also found a few places where the doc could be a bit better, in particular JAVA_HOME needs to be set and Neo4j's auth might need to be turned off for local testing.

Checked with @achantavy about the tabs vs spaces and it looks like the install.md file should have used spaces instead of tabs, so I cleaned that up too.

Testing

  • Manual test:
    • Before this change, calling catography would result in the command returning error (see the linked issue above).
    • After this change, the command successfully finished syncing. See the related trailing logs:
....
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'
WARNING:cartography.intel.okta:No valid Okta credentials could be found. Exiting Okta sync stage.
INFO:cartography.sync:Finishing sync stage 'okta'
INFO:cartography.sync:Starting sync stage 'github'
WARNING:cartography.intel.github:GitHub import is not configured - skipping this module. See docs to configure.
INFO:cartography.sync:Finishing sync stage 'github'
INFO:cartography.sync:Starting sync stage 'analysis'
INFO:cartography.intel.analysis:Skipping analysis because no job path was provided.
INFO:cartography.sync:Finishing sync stage 'analysis'
INFO:cartography.sync:Finishing sync with update tag '1588204170'
  • Regression test:
pip install -r test-requirements.txt
git add .  && make test_lint
make test

@khanhldt khanhldt requested a review from achantavy April 29, 2020 23:40
Copy link
Contributor

@achantavy achantavy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this and for the thorough description!

@achantavy achantavy merged commit 2603f46 into master Apr 30, 2020
@khanhldt khanhldt deleted the 293 branch April 30, 2020 00:10
@khanhldt khanhldt linked an issue Apr 30, 2020 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Missing optional okta_api_key crashed the sync process
3 participants