Граф коммитов

117 Коммитов

Автор SHA1 Сообщение Дата
Gene Wood 419e04c45f
Add deprecation notice 2022-03-09 08:51:05 -08:00
Gene Wood ca711e7f7d
Create CODE_OF_CONDUCT.md 2021-10-06 10:42:30 -07:00
Gene Wood 05ad07ff07
Merge pull request #28 from gene1wood/add_a_changelog
Add a CHANGELOG
2021-10-06 10:35:57 -07:00
Gene Wood b4ff3fe37a
Add a CHANGELOG 2021-10-06 10:35:12 -07:00
Gene Wood 5d990c57f6
Fix some README typos 2021-10-06 09:12:09 -07:00
Gene Wood 02f19a6ec0
Merge pull request #27 from gene1wood/add_description_of_flow
Add flow descriptions to README
2021-10-06 09:05:43 -07:00
Gene Wood 0168c390ae
Add flow descriptions to README 2021-10-06 09:05:10 -07:00
Gene Wood 8216c64cb6
Merge pull request #26 from gene1wood/add_diagrams
Add flow diagrams to README
2021-10-06 08:55:38 -07:00
Gene Wood 7c1f0a9565
Add flow diagrams to README 2021-10-06 08:53:59 -07:00
Gene Wood 679fe4e789
Add link to mana in README 2021-10-06 08:20:03 -07:00
Emma Rose f36b293c37
Merge pull request #25 from gene1wood/update_readme_with_token_provisioning
Add a section to the README on token provisioning
2020-04-20 12:02:29 -04:00
Gene Wood c3d721e438
Clarify the Slack provisioning steps 2020-04-17 16:28:46 -07:00
Gene Wood 663ab62b48
Add a section to the README on token provisioning
Document the token provisioning step of deployment
2020-04-17 16:04:22 -07:00
Gene Wood fb754d730d
Merge pull request #24 from gene1wood/add_get_parameters_back_in
Correction from the last commit, we need both GetParameter and GetPar…
2020-04-17 15:54:27 -07:00
Gene Wood cd919a5304
Correction from the last commit, we need both GetParameter and GetParameters 2020-04-17 15:54:01 -07:00
Gene Wood cc7eac7c19
Merge pull request #22 from gene1wood/fix_typo_iam_permission
Fix typo in IAM permission for SSM
2020-04-17 15:42:11 -07:00
Gene Wood 4dbd5d5a95
Fix typo in IAM permission for SSM 2020-04-17 15:40:34 -07:00
Emma Rose fba3cf0a3d
Merge pull request #21 from gene1wood/fix_put_parameter_bug
Fix store_oauth_token ValidationException error
2020-04-17 18:34:34 -04:00
Gene Wood 4ad8674487
Fix store_oauth_token ValidationException error
This fixes the exception of

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the PutParameter operation: Invalid request: tags and overwrite can't be used together. To create a parameter with tags, please remove overwrite flag. To update tags for an existing parameter, please use AddTagsToResource or RemoveTagsFromResource.
2020-04-17 15:32:19 -07:00
Emma Rose 5df0c2fd72
Merge pull request #20 from mozilla/macify
Macify
2020-04-14 20:17:45 -04:00
Emma Rose 70000abf8f
Fix use of cp and rm commands to work on macOS 2020-04-14 20:17:21 -04:00
Emma Rose f4e169eae8
Modify use of ln so it works on macOS 2020-04-14 19:48:28 -04:00
Emma Rose 4656e885de
Refer to PROD secret for prod deployment 2020-04-14 19:43:07 -04:00
Emma Rose 4761a62572
Modify mktemp calls so they ought to work on both macOS and Linux 2020-04-14 19:42:34 -04:00
Gene Wood 2cab1e3c70
Merge pull request #18 from gene1wood/add_arg_check
Improve Makefile
2020-04-14 16:19:55 -07:00
Gene Wood 347ca0db4c
Add checks for missing client_secrets 2020-04-14 16:18:54 -07:00
Gene Wood b652f73b46
Add production client_id 2020-04-14 16:18:30 -07:00
Gene Wood dc67779120
Merge pull request #17 from gene1wood/another_doc_update
Add additional links to docs on how to find apps in Slack
2020-03-10 15:16:59 -07:00
Gene Wood a60d063375
Add additional links to docs on how to find apps in Slack 2020-03-10 15:16:34 -07:00
Gene Wood eb44611773
Merge pull request #16 from gene1wood/update_docs
Add slack details to README
2020-03-10 15:09:31 -07:00
Gene Wood 1aae9244ff
Add slack details to README 2020-03-10 15:08:37 -07:00
Gene Wood 8195dfee16
Add avatar image 2020-03-10 15:07:55 -07:00
Emma Rose 6ce09ae55b
Explicitly mark the output of discover-sqs-queue-url JSON 2020-03-10 15:01:22 -04:00
Emma Rose 3387705fcd
Fixed some residual typos 2020-03-10 15:00:50 -04:00
Gene Wood 3c3bad319e
Merge pull request #13 from gene1wood/fix_readme
Fix up typos in README
2020-01-02 15:03:50 -08:00
Gene Wood c51267174d
Fix up typos in README 2020-01-02 15:03:27 -08:00
Gene Wood f343a15395
Merge pull request #12 from gene1wood/document_details_on_sqs
Add README info on integrating MozDef and the bot
2020-01-02 14:59:43 -08:00
Gene Wood 5c9eac130f
Add README info on integrating MozDef and the bot 2020-01-02 14:59:07 -08:00
Gene Wood f627207387
Merge pull request #11 from gene1wood/separate_api_and_user
Move IAM user creation into it's own CloudFormation stack
2019-12-30 17:07:21 -08:00
Gene Wood 55ac67caaf
Move IAM user creation into it's own CloudFormation stack
This will make the IAM user and API keys durable across API
stack rebuilds.
This also grants the IAM user rights to invoke all deployments
of the API and all SQS queues used by the API
2019-12-30 17:00:57 -08:00
Gene Wood 8bb843cb29
Change the result structure one more time to be a JSON dictionary
This was changed in 5d0ba05 and then in 74f8d5f9e5
This is another attempt at getting it right
2019-12-30 16:59:38 -08:00
Gene Wood 051384430d
Add support for emitting slackName to MozDef
This emits an additional piece of information to MozDef about
the user, the user's Slack username in the slackName field of
the SQS message
2019-12-30 16:57:39 -08:00
Emma Rose bf0468e947
Add a field to capture both the ID of a slack user and also their handle 2019-12-30 17:47:32 -05:00
Gene Wood 47f1909e89
Merge pull request #10 from gene1wood/pass_result_for_success
Fix exception handling change to pass results on success
2019-12-30 10:29:11 -08:00
Gene Wood 74f8d5f9e5
Fix exception handling change to pass results on success
Fix the change introduced in 5d0ba05215 which
fails to pass the result back to the caller upon success.
2019-12-30 10:25:31 -08:00
Gene Wood 791088334a
Merge pull request #9 from gene1wood/better_exception_handling
Improve exception handling
2019-12-30 10:03:36 -08:00
Gene Wood 5d0ba05215
Improve exception handling
Deal with exceptions differently depending on if the function was called
by API Gateway or through direct invocation.

Pass SlackExceptions through to the invoker of the function.
2019-12-30 10:02:36 -08:00
Gene Wood a984947a61
Merge pull request #5 from gene1wood/add_working_bot
Add working end to end bot
2019-12-27 22:54:30 -08:00
Gene Wood 03aa28745b
Add working end to end bot
* Add functions to utils
  * store_oauth_token : Store an OAuth 2 access token in SSM parameter store
  * get_access_token : Fetch the OAuth 2 access token for a given client_id from cache or SSM
    parameter store
  * emit_to_mozdef : Send a message with the user's response to SQS for pickup by MozDef
  * call_slack : POST to a slack URL and return the result
  * provision_token : Given an OAuth 2 code, obtain a Slack access token and store it
  * redirect_to_slack_authorize : Build a Slack OAuth 2 authorization URL and redirect the user to it
* Fill out lambda_handler in app to cover all URL paths and direct invocations
* Add functions to app
  * API calls
    * process_api_call : Process an API Gateway call depending on the URL path called
      * `/authorize` : utils.redirect_to_slack_authorize
      * `/redirect_uri` : utils.provision_token
      * `/slack/interactive-endpoint` : handle_message_interaction : Process a user's interaction with a Slack message
        * send_slack_message_response : Respond to a user's selection by updating the Slack message with a reply
  * Direct invocations
    * send_message_to_slack : Send a message to a user via IM or Slack App conversation
      * get_user_from_email : Fetch a slack user dictionary for an email address
      * compose_message : Create a Slack message object
      * create_slack_channel : Create an IM channel with a user
      * post_message : Post a message to a slack channel
* Update README with configuration details
* Add details on discovering the SQS URL to the README
* Add additional test invocations to the Makefile
* Add SQS URL discovery to the Makefile
* Add requests to the requirements.txt
* Update CloudFormation template to
  * accept Slack client ID and secret
  * Grant Lambda function rights to
    * read and write to SSM parameter store
    * decrypt parameter store secrets
    * send messages to the SQS queue
  * Create the SQS queue
  * Grant the MozDef user rights to read from the SQS queue
* Add new settings to config.py
2019-12-27 22:52:14 -08:00
Gene Wood b0ece0d2c3
Remove unused scaffolding 2019-12-27 22:37:00 -08:00