Skip to content

Commit

Permalink
Separates CredentialProvider from OutputDispatcher (#875)
Browse files Browse the repository at this point in the history
* Initial commit

* Now with tests

* Touchups

* Remove extraneous static method

* DRYs out some code related to S3 secret bucket name

* Proof-of-concept of mocking CredentialProvider

* Fix some pylints

* Removes output_cred_name() to consolidate functionality. Updates all tests

* pylint

* Refactors Drivers for OutputCredentialsProvider (#878)

* Working? Draft of new driver-based credentials storage

* Higher quality refactor; needs tests

* Kinks ironed out with good tests this time

* First maybe working try

* Adds lots of tests for the Drivers

* Add more tests. Not final; still need to remove deprecated methods

* Rename method to reduce confusion

* Remove deprecated method load_encrypted_credentials_from_s3

* Removes deprecated method get_local_credentials_temp_dir

* Remove deprecated method get_formatted_output_credentials_name

* Removes deprecated method kms_decrypt

* Removes extraneous imports

* Extract globally injected REGION so the handler can be implemented properly

* Pylint`

* Pylint is my nemesis

* Remove extraneous method

* Use default_config for boto clients

* Code coverage. PR feedback.

* Add missing __init__.py file causing poor code coverage

* Fixes the tests to get past pylint garbage

* Change account_id to a property

* Formatting

* (fixup) PR Feedback

* (fixup) Disentangles streamalert cli helper with stream_alert credentials provider.

* (fixup) Deprecate old methods

* pylint

* Removes deprecated code; adds tests for aws_api_client; DRYs out test code
  • Loading branch information
Ryxias committed Jan 30, 2019
1 parent 6334ede commit 44fe7d0
Show file tree
Hide file tree
Showing 22 changed files with 1,842 additions and 560 deletions.
4 changes: 4 additions & 0 deletions stream_alert/alert_processor/outputs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ def _dispatch(self, alert, descriptor):

return True

@property
def account_id(self):
return self._credentials_provider.get_aws_account_id()


@StreamAlertOutput
class SQSOutput(AWSOutput):
Expand Down
Empty file.

0 comments on commit 44fe7d0

Please sign in to comment.