Configuring SRT encryption/decryption on MediaConnect
Publishing an encrypted SRT stream to MediaConnect
Configuring SRT encryption/decryption on MediaConnect
- Navigate to your AWS account and enter the Secrets Manager Service
- Select Store a new secret
-
Under secret type: select Other type of secret
-
Under Key/value pairs:
-
First select Plaintext
-
Delete ALL contents of the Plaintext field including any brackets
-
Add desired SRT encryption key into the plaintext field. (You can use any random encryption key generator such as this one at https://randomkeygen.com/). Be sure to note the key for future reference when configuring the SRT stream.
-
-
Under Encryption key
-
Select the aws/secretsmanager from the dropdown.
-
- Select Next
- Enter desired Secret name. All other fields are optional on this page.
- Click Next
- On the Configure rotation page, this is optional. Click Next
- On the Review page, click Store
- Refresh the page and open up the secret you just created
-
NOTE: Make a note, or save a copy, of the Secret’s ARN for your IAM policy in the next step.
-
-
-
Enter the AWS IAM Service
- On the left-hand side bar, under Access Management, select Policies
-
Create an IAM policy to allow AWS Elemental MediaConnect to access your secret
-
Click Create policy
-
Click JSON
-
Clear ALL existing JSON text and replace with the text in the code block below in step 4. Leave the version set to 2012-10-17 and replace arn-for-secret with your Secret’s ARN.
-
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "secretsmanager:GetResourcePolicy", "secretsmanager:GetSecretValue", "secretsmanager:DescribeSecret", "secretsmanager:ListSecretVersionIds" ], "Resource": [ "arn-for-secret" ] } ] }
- Click Next
-
- Under the Review and create page:
- Enter a Policy name
-
Click Create policy
-
Navigate back to the AWS IAM Service
-
On the left-hand sidebar, under Access management, select Roles
- Create an IAM role with a trusted relationship
-
Click Create role
-
Under Trusted entity type, select AWS Service
-
Under Use case, select EC2
-
Click Next
-
-
Under the Add permissions page
-
Search for the policy you just created in the Search bar
-
Click the check box next to it
-
Click Next
-
-
Under the Name, review, and create page
-
Enter a name for the Role name
-
Click Create role
-
-
From the IAM Roles page, you will now update your trust policy from EC2 to MediaConnect
-
Search for and click your Role name
-
Click the Trust relationships tab
-
Click Edit trust policy
-
Clear ALL existing JSON text and replace with the text in the code block below in step 5
-
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "mediaconnect.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
-
Click Update Policy
-
-
-
Enter the AWS Key Management Service
-
Create an encryption key by clicking Create key
-
Under the Configure key page
-
Set the Key type to Symmetric
-
Set the Key usage to Encrypt and decrypt
-
Click Next
-
-
Under the Add labels page
-
The Alias can be given a display name you prefer
-
Description and Tags are optional entries
-
Click Next
-
-
Under the Define key administrative permissions page
-
Search for your role Name here and check the box to the left of it
-
Click Next
-
-
Under the Define key usage permissions page
-
Search for your role Name here and check the box to the left of it
-
Click Next
-
-
Under the Review page
-
Review to ensure accuracy and then click Finish
-
-
-
Navigate back to AWS Secrets Manager Service
-
Click on your Secret name
-
Click the Actions dropdown for Secrets details
- Select Edit encryption key
-
Click the dropdown under Encryption key and choose the key created in the previous Key Management Service steps
-
Click Save
-
-
Navigate to AWS MediaConnect Service
-
Update your MediaConnect Flow with decryption
-
Click your Flow Name
-
Click the circle next to your Source
-
Click Update
-
Under Decryption click Activate
-
For Role ARN, click the dropdown, search for, and select your Role
-
For Secret ARN, click the dropdown, search for, and select your Secret
-
Click Update source
-
-
Publishing an encrypted SRT stream to MediaConnect
- Navigate to AWS MediaConnect and enter the Flow which you are using
- Start the Flow in the top-right of your Flow's screen
- Allow some time for the Flow to start and the Status will then show "Active" when it is ready
-
Set up the Videon device to stream SRT
-
Set Call Mode to Caller
-
Configure the SRT URL
- Navigate to the appropriate Flow in MediaConnect and locate the Public Outbound IP address
-
Enter the Public Outbound IP address into the Node / EdgeCaster's SRT output IP address
- From the MediaConnect Flow, select Sources and locate the Source port
-
Enter the Source port into the Node / EdgeCaster's SRT output Port
- Navigate to the appropriate Flow in MediaConnect and locate the Public Outbound IP address
-
Enter a Latency greater than the Minimum Latency assigned to the MediaConnect Flow
-
Enter a Bandwidth
-
Ensure Encryption is turned ON
- Enter the passphrase used in your Secret in the Videon UI as the Encryption Passphrase
-
- Turn the SRT output ON and click Save
-
View stream in VLC
-
srt://<ip_from_flow_output>:<port_from_flow_output>
-