Overview
This Action programmatically exports decrypted SendSafely package contents to Global Relay for long-term storage.
Please note that this Action requires access to the contents of SendSafely packages, and thus must be configured with a Portal Master Key.
Getting Started
- Work with Global Relay to enable your SendSafely archive feed.
- A provisioning specialist will provide your credentials. Please do not share these credentials with the SendSafely team.
- Contact SendSafely for the Global Relay Action (an AWS CloudFormation template)
- The Action template requires you to have AWS infrastructure capable of deploying a Lambda function.
- Configure your SendSafely Actions workflow in the SendSafely portal.
- Define your archiving event triggers and data filters and connect the integration, as described in the Setup Instructions below
- Activate and validate
- Confirm data is flowing into your Global Relay Archive
Setup Instructions
1. Deploy the Lambda
To deploy the Lambda, you'll need the following permissions in AWS:
- Create a new Lambda Function
- Create a new AWS Secret (AWS Secrets Manager)
- Define a custom IAM Role for the Lambda function
Follow these steps:
- In AWS, navigate to CloudFormation and click Create stack, then select "With new resources (standard)" from the dropdown.
- Under Template source, select "Upload a template file," then click Choose file and select the YAML file provided by your SendSafely account rep.
- Click Next. Name the stack, e.g., "GlobalRelayArchiveAction," then click Next.
- Click the three checkboxes at the bottom of the page, then click Next.
- Click Submit.
- Wait for the Stack's status to change from "CREATE_IN_PROGRESS" to "CREATE_COMPLETE."
2. Update Secrets Manager
We'll update the Automatic_Export_Config Secret generated by this deployment. Click on this Secret in Secrets Manager, click Retrieve secret value, and click Edit. Provide the following secret values:
- ss-host
- ss-api-key
- ss-api-secret
- gr-base64-credential-string-event: base64 encoded clientID:clientSecret for Event datatype.
- gr-authentication-token: Will be updated by Lambda, see 'Trigger Initial Token Rotation' below.
- pk-<ss-public-key-id>. Note that you must update the Name of this secret to replace the text '<ss-public-key-id>' with the actual public key ID of your Master Key (the SendSafely Support team will provide you this ID when you submit them the public key). You must update the Value of this secret with the full text of the private key, including the opening and closing tags:
------BEGIN PGP PRIVATE KEY BLOCK-----
------END PGP PRIVATE KEY BLOCK-----
Trigger Initial Token Rotation
After the stack reaches CREATE_COMPLETE, the Lambda needs to fetch and store a valid GlobalRelay access token in Secrets Manager before it can process any packages. Do this once manually:
- In AWS, navigate to Lambda and open the function named after your stack (e.g., "GlobalRelayArchiveAction").
- Click the Test tab.
- Click Create new event and give it any name (e.g., "InitialTokenRotation").
-
Replace the default payload with:
{ "source": "aws.events", "detail-type": "Scheduled Event" } - Click Test.
You should see a green Execution result: succeeded banner. The gr-authentication-token value in your Secrets Manager entry will now be populated with a valid token.
From this point on, the token will be automatically refreshed every 12 hours.
Note: If this step is skipped, the first package finalization or workspace upload will fail because the Lambda will not have a valid GlobalRelay token to authenticate with.
For now, leave the last three secret values be and Click Save. We'll populate one of them in Step 6.
3. Create a new Workflow
As an admin logged into your SendSafely portal, click the circle containing your initials in the top-right corner of the screen and select SendSafely Actions. Here, click New Workflow.
4. Choose the trigger event
At the time of this writing, the Actions framework supports two trigger events: "A file is uploaded to a Workspace" or "A package is finalized." If you wish to perform this Action on both events, you'll need to go through this process twice, setting up two Workflows: one for each event.
5. Decide whether this Workflow will apply to a specific user's packages (Optional)
This Workflow, by default, will apply to all packages portal-wide. To limit its scope to packages owned by a specific user:
- Click the plus button and select Add an Event Filter.
- From the Criteria dropdown, select Package Owner Email.
- From the Operator dropdown, select equals.
- In the Value input, type the email of the user in question and click Save.
6. Add the Actions
Three Actions comprise this Workflow. We will add them one at a time.
Action 1.
First, we'll hold the package or file, preventing your recipients from accessing its contents.
- Click the plus button and select Add an Action.
- From the Action dropdown, select Hold Package (or, if the trigger event is "A file is uploaded to a Workspace, Hold File).
- From the Notification dropdown, select Notify on Error or Timeout.
Action 2.
Next, we'll invoke the webhook of the Lambda, which will use the Master Key to decrypt the package or file's contents, and upload them to Global Relay for storage, and return a verdict.
- Click the plus button and select Add another Action.
- From the Action dropdown, select Invoke an External Webhook.
- From the Notification dropdown, select Notify on False, or Timeout.
- Retrieve the WebhookUrl from the Outputs tab of the relevant Stack in CloudFormation, then paste it into the input in SendSafely and click Save.
- Click the text that says "Click here to view the action secret," then click Copy.
- In AWS Secrets Manager, click into the "Automatic_Export_Config" Secret.
- Click Retrieve secret value, then click Edit.
- Paste the action secret into the value for action-secret-id-<actionId-finalize-package> (if the trigger event was "A package is finalized.") or for action-secret-id-<actionId-workspace-upload> (if the trigger event was "A file is uploaded to a Workspace"), then click Save.
Action 3.
Last, we'll release the package or file, rendering its contents available to its recipients.
- Click the plus button and select Add another Action.
- From the Action dropdown, select Release Package (or, if the trigger event is "A file is uploaded to a Workspace, Release File).
- From the Notification dropdown, select Notify on Error or Timeout.
Add Action Filter.
We'll now add an Action Filter to this 3rd Action, so that it only runs if the 2nd Action succeeds. Packages successfully uploaded to Global Relay will be released, whereas packages whose upload failed will remain held.
- Click Add Action Filter.
- From the Criteria dropdown, select Action Step 2 Result.
- From the Operator dropdown, select Equals.
- From the Value dropdown, select True.
7. Activate the Workflow
At the top of the page, click the toggle next to the text "Disabled" to enable the Action. The text will change from "Disabled" to "Live.
8. Test the Workflow
Now that we've activated the Workflow, let's trigger it. If the triggering event is "A package is finalized," we'll make a Dropzone submission or create a Transfer package. If the triggering event is "A file is uploaded to a Workspace," we'll upload a file to a Workspace.
If the package or file that triggered the Action is not successfully uploaded to Global Relay, it will remain held. If the package or file that triggered the Action is successfully uploaded to Global Relay, it will be released.
Comments
0 comments
Article is closed for comments.