SV-235796r627515_rule
V-235796
SRG-APP-000141
DKER-EE-001900
CAT II
10
This fix only applies to the DTR component of Docker Enterprise.
Disable the "Create repository on push" option in DTR:
via UI:
As a Docker EE Admin, navigate to "System" | "General" in the DTR management console. Click the "Create repository on push" slider to disable this capability.
via CLI:
Linux (requires curl and jq): As a Docker EE Admin, execute the following commands from a machine with connectivity to the DTR management console:
AUTHTOKEN=$(curl -sk -u <username>:<password> "https://[dtr_url]/auth/token" | jq -r .token)
curl -k -H "Authorization: Bearer $AUTHTOKEN" -X POST -d '{"createRepositoryOnPush":true}' -H 'Content-Type: application/json' "https://[dtr_url]/api/v0/meta/settings"
This check only applies to the DTR component of Docker Enterprise.
Verify that the "Create repository on push" option is disabled in DTR:
via UI:
As a Docker EE Admin, navigate to "System" | "General" in the DTR management console. Verify that the "Create repository on push" slider is turned off.
via CLI:
Linux (requires curl and jq):
AUTHTOKEN=$(curl -sk -u <username>:<password> "https://[dtr_url]/auth/token" | jq -r .token)
curl -k -H "Authorization: Bearer $AUTHTOKEN"" -X GET ""https://[dtr_url]/api/v0/meta/settings"
Look for the "createRepositoryOnPush" field in the output and verify that it is set to "false". If it is not, then this is a finding.
V-235796
False
DKER-EE-001900
This check only applies to the DTR component of Docker Enterprise.
Verify that the "Create repository on push" option is disabled in DTR:
via UI:
As a Docker EE Admin, navigate to "System" | "General" in the DTR management console. Verify that the "Create repository on push" slider is turned off.
via CLI:
Linux (requires curl and jq):
AUTHTOKEN=$(curl -sk -u <username>:<password> "https://[dtr_url]/auth/token" | jq -r .token)
curl -k -H "Authorization: Bearer $AUTHTOKEN"" -X GET ""https://[dtr_url]/api/v0/meta/settings"
Look for the "createRepositoryOnPush" field in the output and verify that it is set to "false". If it is not, then this is a finding.
M
5281