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

ssl.conf missing trailing always #391

Closed
1 task done
sadkisson opened this issue Jun 28, 2023 · 6 comments · Fixed by linuxserver/docker-baseimage-alpine-nginx#146
Closed
1 task done

ssl.conf missing trailing always #391

sadkisson opened this issue Jun 28, 2023 · 6 comments · Fixed by linuxserver/docker-baseimage-alpine-nginx#146
Labels
awaiting-approval Stale exempt

Comments

@sadkisson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Optional additional ssl headers missing the always tag on a couple of the lines causing the headers to not be applied.

#add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'";
#add_header Permissions-Policy "interest-cohort=()";

Expected Behavior

After adding "always" before ";", the headers are applied.

#add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'" always;
#add_header Permissions-Policy "interest-cohort=()" always;

Steps To Reproduce

/swag/nginx/ssl.conf

lines 33, 34

Environment

- OS:Unraid
- How docker service was installed:apps

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='swag'
  --net='bridge'
  --ip='x.x.x.x'
  -e TZ="America/Somewhere"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="hostname"
  -e HOST_CONTAINERNAME="swag"
  -e 'TCP_PORT_443'='443'
  -e 'TCP_PORT_80'='80'
  -e 'URL'='domain.tld'
  -e 'VALIDATION'='dns'
  -e 'SUBDOMAINS'='wildcard'
  -e 'CERTPROVIDER'='zerossl'
  -e 'DNSPLUGIN'='cloudflare'
  -e 'PROPAGATION'='120'
  -e 'EMAIL'='[email protected]'
  -e 'ONLY_SUBDOMAINS'='false'
  -e 'EXTRA_DOMAINS'=''
  -e 'STAGING'='false'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver-ls-logo.png'
  -v '/mnt/cache/appdata/swag':'/config':'rw'
  --cap-add=NET_ADMIN 'lscr.io/linuxserver/swag'

Container logs

na
@github-actions
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@nemchik
Copy link
Member

nemchik commented Jun 28, 2023

I'll look more into these headers again, but when they were introduced they were explicitly made the bare minimum to pass most security scanners, because most other settings would be more restrictive and less universal.

If there's any updated settings we could ship that are still fairly universal I'll definitely consider it.

P.s. I tend to use the recommendations from observatory.mozilla.com as a reference for how to set these out of the box, but I'm open to reading other sources.

@sadkisson
Copy link
Author

No issues. I had no idea what i was doing. I just used one of those security checking sites that pointed out some of the headers were not being applied. I did not change any of the settings nor do I understand what they do. I just noticed all the other lines included always at the end and tried adding it to the 2 missing lines. Headers were then reporting as working after re scanning.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@nemchik
Copy link
Member

nemchik commented Jul 29, 2023

I need to look at this. Sorry I've been busy.

@Shalar
Copy link

Shalar commented Aug 12, 2023

Applying this finally allowed firefox to load my subdomains inside frames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Stale exempt
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants