Skip to content

Commit 93a4dce

Browse files
author
John Howard
committed
Windows: Add CredentialSpec
Signed-off-by: John Howard <[email protected]>
1 parent 45c3fd4 commit 93a4dce

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

config-windows.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,42 @@ The following parameters can be specified:
9494
}
9595
}
9696
```
97+
98+
## <a name="configWindowsCredentialSpec" />Credential Spec
99+
100+
You can configure a container's group Managed Service Accounts (gMSAs) via the OPTIONAL `credentialspec` field of the Windows configuration. For more information about gMSAs, see [Active Directory Service Accounts for Windows Containers][gMSAOverview]. For more information about tooling to generate a gMSA, see [Deployment Overview][gMSATooling]. The `credentialspec` MUST be a string containing an escaped JSON object.
101+
102+
103+
### Example
104+
105+
```json
106+
"windows": {
107+
"credentialspec": "{
108+
\"CmsPlugins\": [ \"ActiveDirectory\" ],
109+
\"DomainJoinConfig\": {
110+
\"Sid\": \"S-1-5-21-4288985-3632099173-1864715694\",
111+
\"MachineAccountName\": \"MusicStoreAcct\",
112+
\"Guid\": \"3705d4c3-0b80-42a9-ad97-ebc1801c74b9\",
113+
\"DnsTreeName\": \"hyperv.local\",
114+
\"DnsName\": \"hyperv.local\",
115+
\"NetBiosName\": \"hyperv\"
116+
},
117+
\"ActiveDirectoryConfig\": {
118+
\"GroupManagedServiceAccounts\": [
119+
{
120+
\"Name\": \"MusicStoreAcct\",
121+
\"Scope\": \"hyperv.local\"
122+
},
123+
{
124+
\"Name\": \"MusicStoreAcct\",
125+
\"Scope\": \"hyperv\"
126+
}
127+
]
128+
}
129+
}"
130+
}
131+
```
132+
133+
134+
[gMSAOverview]: https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/manage-serviceaccounts
135+
[gMSATooling]: https://github.com/Microsoft/Virtualization-Documentation/tree/live/windows-server-container-tools/ServiceAccounts

schema/config-windows.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@
6565
}
6666
}
6767
}
68+
},
69+
"credentialspec": {
70+
"id": "https://opencontainers.org/schema/bundle/windows/credentialspec",
71+
"type": "string"
6872
}
73+
6974
}
7075
}
7176
}

specs-go/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,8 @@ type SolarisAnet struct {
432432
type Windows struct {
433433
// Resources contains information for handling resource constraints for the container.
434434
Resources *WindowsResources `json:"resources,omitempty"`
435+
// CredentialSpec contain an optional opaque escaped JSON object describing a group Managed Service Accounts (gMSA) specification.
436+
CredentialSpec string `json:"credentialspec,omitempty"`
435437
}
436438

437439
// WindowsResources has container runtime resource constraints for containers running on Windows.

0 commit comments

Comments
 (0)