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

Allow egress notification subscriptions from external accounts #84

Open
manics opened this issue Jul 13, 2022 · 0 comments
Open

Allow egress notification subscriptions from external accounts #84

manics opened this issue Jul 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@manics
Copy link
Member

manics commented Jul 13, 2022

Currently the SNS topics used to send notifications about new egress requests assumes the subscriber is in the same account:

# Publish notifications to SNS
notify_ig_reviewer_task = sfn_tasks.SnsPublish(
self,
"Notify Information Governance",
topic=ig_role_topic,
subject=sfn.JsonPath.string_at(
"States.Format('{} Egress Request', $.project_id)"
),
message=sfn.TaskInput.from_object(
{
"Egress Request ID": sfn.JsonPath.string_at("$.egress_request_id"),
"Researcher Email": sfn.JsonPath.string_at("$.created_by_email"),
"Egress Object File Types": sfn.JsonPath.string_at(
"$.copy_to_staging_result.file_extensions"
),
}
),
result_path=sfn.JsonPath.DISCARD,
)
notify_rit_reviewer_task = sfn_tasks.SnsPublish(
self,
"Notify Research IT",
topic=rit_role_topic,
subject=sfn.JsonPath.string_at(
"States.Format('{} Egress Request', $.project_id)"
),
message=sfn.TaskInput.from_object(
{
"Egress Request ID": sfn.JsonPath.string_at("$.egress_request_id"),
"Researcher Email": sfn.JsonPath.string_at("$.created_by_email"),
"Information Governance": sfn.JsonPath.string_at(
"$.information_governance.result.ig_reviewer_1_email"
),
"Egress Object File Types": sfn.JsonPath.string_at(
"$.copy_to_staging_result.file_extensions"
),
}
),
result_path=sfn.JsonPath.DISCARD,
)

We could add a parameter that allows a central subscriber (e.g. a Lambda running in a central TRE account that creates Microsoft Teams notifications or JIRA tickets) to subscribe using AddToResourcePolicyResult

@manics manics added the enhancement New feature or request label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant