GetSecurityPolicy
POST/gitpod.v1.SecurityService/GetSecurityPolicy
Gets details about a specific security policy.
Use this method to:
- View security policy configuration
- Inspect enforcement rules
Examples
-
Get security policy:
Retrieves a security policy by ID.
securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
GetSecurityPolicy
curl https://app.gitpod.io/api/gitpod.v1.SecurityService/GetSecurityPolicy \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GITPOD_API_KEY" \
-d '{}'{
"securityPolicy": {
"metadata": {
"name": "x"
},
"spec": {
"blockDevices": {
"defaultEffect": "EFFECT_UNSPECIFIED"
},
"data": {
"defaultEffect": "EFFECT_UNSPECIFIED",
"rules": [
{
"destination": {
"host": "host"
},
"effect": "EFFECT_UNSPECIFIED",
"source": {
"file": "file",
"integration": "integration",
"selector": "selector"
}
}
]
},
"executables": {
"defaultEffect": "EFFECT_UNSPECIFIED",
"rules": [
{
"effect": "EFFECT_UNSPECIFIED",
"path": "path"
}
]
},
"files": {
"defaultActions": [
"ACTION_UNSPECIFIED"
],
"defaultEffect": "EFFECT_UNSPECIFIED",
"rules": [
{
"actions": [
"ACTION_UNSPECIFIED"
],
"effect": "EFFECT_UNSPECIFIED",
"path": "path"
}
]
},
"ports": {
"maxAdmissionLevel": "ADMISSION_LEVEL_UNSPECIFIED"
}
},
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
}
}Returns Examples
{
"securityPolicy": {
"metadata": {
"name": "x"
},
"spec": {
"blockDevices": {
"defaultEffect": "EFFECT_UNSPECIFIED"
},
"data": {
"defaultEffect": "EFFECT_UNSPECIFIED",
"rules": [
{
"destination": {
"host": "host"
},
"effect": "EFFECT_UNSPECIFIED",
"source": {
"file": "file",
"integration": "integration",
"selector": "selector"
}
}
]
},
"executables": {
"defaultEffect": "EFFECT_UNSPECIFIED",
"rules": [
{
"effect": "EFFECT_UNSPECIFIED",
"path": "path"
}
]
},
"files": {
"defaultActions": [
"ACTION_UNSPECIFIED"
],
"defaultEffect": "EFFECT_UNSPECIFIED",
"rules": [
{
"actions": [
"ACTION_UNSPECIFIED"
],
"effect": "EFFECT_UNSPECIFIED",
"path": "path"
}
]
},
"ports": {
"maxAdmissionLevel": "ADMISSION_LEVEL_UNSPECIFIED"
}
},
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
}
}