Host Extension On Private Server
Prepare the .crx File
Ensure you have the .crx file for Protegrity Browser Protector extension. If you haven’t created one yet, follow the steps in the Extension Source Code section.
Set Up HTTPS File Hosting
HTTPS File hosting service is required to host the .crx file. This can be any web server, such as, Apache, Nginx, or a cloud storage service.
Set Up an Amazon S3 Bucket
Create a new S3 bucket:
- Log in to the AWS Management Console.
- Navigate to S3 and click Create bucket.
- Provide a unique name for the bucket, for example, s3-bucket-name and choose a region.
- Leave other settings as default and click Create bucket.
Upload the .crx file:
- Open the bucket in the S3 dashboard.
- Click Upload and select your .crx file.
- Set permissions to allow public access to the file as given in the below section.
Configure Permissions for Public Access
By default, files in S3 buckets are private. You need to make the .crx file publicly accessible:
Enable public access for the file:
- Navigate to the uploaded .crx file in the S3 bucket.
- Click Permissions.
- Under Block public access, ensure the bucket allows public file access.
Add a bucket policy:
- Navigate to the Permissions tab of the bucket.
- Click Bucket policy and add a policy like the following:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::s3-bucket-name/*" } ] } - Replace s3-bucket-name with the name of your bucket.
- Click Save.
Set the Correct MIME Type for .crx Files
You need to configure the file’s MIME type so browsers recognize it as a Chrome extension:
Edit the file properties:
- Navigate to the uploaded .crx file in the S3 bucket.
- Click Properties.
- Under Metadata, add the following key-value pair:
- Key:
Content-Type - Value:
application/x-chrome-extension
- Key:
Save the changes.
Access the Hosted .crx File
Once the file is uploaded and permissions are configured, you can access it via the S3 public URL:https://.s3..amazonaws.com/pty-browser-protector.crx
For example:
https://s3-bucket-name.s3.us-east-1.amazonaws.com/pty-browser-protector.crx
Create an Update Manifest for Updates
Create an updated manifest file (update.xml) and host it on S3 as well.
Example update.xml File:
<?xml version="1.0" encoding="UTF-8"?>
<gupdate xmlns="http://www.google.com/update2/response" protocol="2.0">
<app appid="pty_extension_id">
<updatecheck codebase="https://s3-bucket-name.s3.us-east-1.amazonaws.com/pty-browser-protector.crx" version="1.0.2" />
</app>
</gupdate>
- Replace pty_extension_id with Protegrity Browser Protector extension’s unique ID recorded in the Extension Source Code section.
- Replace the codebase URL with the public S3 URL of your .crx file.
- Update the version field to match your extension’s version.
Upload this update.xml file to the same S3 bucket and set the MIME type to application/xml.
Note down the update.xml S3 URL. It will be used in the Installing Browser Protector on Windows Devices Using Intune and Installing Browser Protector on macOS Using Kandji sections.
Feedback
Was this page helpful?