microsoft / microsoft/windows-container-tools

IIS Certificate binding

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
277
Forks
77
PR merge metrics
No merged PRs in 30d

Description

I was watching the ignite video and found myself here. There was a brief mention of certificates in that talk and maybe this could be a good place to bring it up.

I was looking for guidance on certificate management with IIS inside windows containers. This is what I'd got to thus far for my Dockerfile to use central certificate store and volume mapping a pfx secret for k8s into C:\inetpub\certs:

RUN $userPass = [guid]::newguid(); \
    # Admin user that can be used for enabling cert provider
    New-LocalUser -Name CertUser -Password (ConvertTo-SecureString $userPass -AsPlainText -Force); \
    Add-LocalGroupMember -Group Administrators -Member CertUser; \
    # Enable Central Certificate Store for IIS
    Enable-WindowsOptionalFeature -Online -FeatureName IIS-CertProvider; \
    # Enable the central certificate store and tell it where certificates are stored
    New-Item -ItemType Directory -Path C:\inetpub\certs | Out-Null; \
    Enable-WebCentralCertProvider -CertStoreLocation C:\inetpub\certs -UserName CertUser -Password $userPass; \
    Import-Module WebAdministration; \
    # Add a central certificate store ssl binding for https
    New-WebBinding -Name 'Default Web Site' -SslFlags 3 -Protocol https -IP '*' -Port 443 -HostHeader '*'; \
    New-Item -Path IIS:\SslBindings\!443!* -SslFlags 3

This is still in development from my side and I'm still validating it's working state etc.

Guidance, tools or anything else that would enable us to have SSL on IIS in our container at runtime while potentially simplifying this would be a great resource.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides a Dockerfile snippet using PowerShell to configure IIS Central Certificate Store and an SSL binding, but names no repository files or tests. Start by reviewing the reported Windows container and Kubernetes volume-mapping setup, then document validated guidance or tools for enabling runtime SSL and simplifying the configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes, powershell
Domain
devops, infrastructure, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.