Skip to content

Commit

Permalink
Add group policies, limit browser access to container filesystem (#579)
Browse files Browse the repository at this point in the history
Add some default policy settings to disable unneeded Brave features.
Helps a bit with #463, but Brave unfortunately doesn't provide all
mentioned settings as policy options.

Most important changes are in
`config/policies/lockdown-profilebrowser.json` it limits access to the
container filesystem especially during interactive profile browser
creation.
  • Loading branch information
vnznznz committed Jun 5, 2024
1 parent 757e838 commit 068ee79
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ADD package.json /app/
ARG REBUILD

# Prefetch tldextract so pywb is able to boot in environments with limited internet access
RUN tldextract --update
RUN tldextract --update

# Download and format ad host blocklist as JSON
RUN mkdir -p /tmp/ads && cd /tmp/ads && \
Expand Down Expand Up @@ -64,8 +64,11 @@ WORKDIR /crawls
# enable to test custom behaviors build (from browsertrix-behaviors)
# COPY behaviors.js /app/node_modules/browsertrix-behaviors/dist/behaviors.js

# add brave/chromium group policies
RUN mkdir -p /etc/brave/policies/managed/
ADD config/policies /etc/brave/policies/managed/

ADD docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]

CMD ["crawl"]

6 changes: 6 additions & 0 deletions config/policies/brave-default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"BraveRewardsDisabled": true,
"BraveWalletDisabled": true,
"BraveVPNDisabled": 1,
"BraveAIChatEnabled": false
}
8 changes: 8 additions & 0 deletions config/policies/lockdown-profilebrowser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"IncognitoModeAvailability": 1,
"TorDisabled": true,
"AllowFileSelectionDialogs": false,
"URLBlocklist": [
"file://*"
]
}

0 comments on commit 068ee79

Please sign in to comment.