Skip to content

Service Control Policies ​

Service Control Policies (SCP) act as a foundational layer before RBAC is applied, providing granular control over access within a tenant or a space.

SCPs centrally define the maximum permissions for users and roles within a tenant or a space. SCPs have the following characteristics:

  • Granular Control:
    SCPs can limit access to entire service categories, individual instance types, or specific actions.
  • Permission Guardrails:
    SCPs do not grant permissions directly but set limits on the actions users and roles can perform.
  • Integration with RBAC:
    Effective permissions are the intersection of what is allowed by the SCP and the RBAC policies.

Levels ​

Service Control Policies can be defined at the provider, the tenant, and the space level. Provider SCPs are managed by Swisscom. Tenant admins can manage SCPs at the tenant level and space admins can manage SCPs at the space level. SCPs are hierarchical over these three levels: provider SCPs take precedence over tenant and space SCPs and tenant SCPs take precedence over space SCPs.

Tenant SCPs are managed via Administration → Tenant Administration → Service Control Policies

Space SCPs are managed via Administration → Tenant Administration → Spaces → Space → Service Control Policies

Types ​

SCPs can be configured in two ways:

  • Allow-based: Define which actions are explicitly permitted (allowedActions). All other actions are implicitly denied.
  • Deny-based: Define which actions are explicitly denied (deniedActions) while allowing all other actions by default.

Both approaches can be combined within a single SCP, where denied actions take precedence over allowed actions.

Configuration ​

The SCP configuration is part of the tenant & space configuration and is stored in the serviceControlPolicy field.

  • The config field is used for tenant and space-level SCPs.
  • The same wildcard glob patterns used in our RBAC policies are also used in SCPs for consistency and flexibility. Provider-level SCPs are managed by Swisscom and are not exposed in tenant or space configuration.

Via Portal/GUI ​

scp

  1. Access the Service Control Policies Configuration:

    • Navigate to the administration section of the web app.
    • Select the "Service Control Policies" option from the menu.
  2. Add / Delete a Service Control Policy:

    • To delete an existing SCP, click on the "Trash" button next to the policy.
    • To add a new SCP, click on the "Add Allowed Action" or "Add Denied Action" button.
    • Enter the desired action in the input field in the glob pattern as described further below.

Possible Values ​

Below is a list of possible values that can be used in SCPs for the various services. Values follow the pattern domain:service[:sub-service]:action (e.g., services:FILESERVICE:FS_NFS_CONTAINER:delete).

Service NamePossible Values (examples)
S3services:S3:**
File Serviceservices:FILESERVICE:**, sub-services e.g. services:FILESERVICE:FS_NFS_CONTAINER:*, services:FILESERVICE:FS_NFS_SHARE:*
File Service Kubernetesservices:FILESERVICE_KUBERNETES:**
Managed Kubernetesservices:MANAGED_KUBERNETES:**
Kubernetes Serviceservices:KUBERNETES:**
IaaS Servicesservices:IAAS:**
IaaS Networkingservices:IAAS_NETWORKING:**
Managed Reverse Proxyservices:MANAGED_REVERSEPROXY:**
Managed Forward Proxyservices:MANAGED_FORWARDPROXY:**
Managed MS SQLservices:MANAGED_MSSQL:**

Actions ​

Service ActionPermission
*:*:*:readGives permission to read instances.
*:*:*:createGives permission to provision a new instance.
*:*:*:shareGives permission to share (read-only) an instance with the tenant
*:*:*:updateGives permission to update instances & run day 2 actions.
*:*:*:deleteGives permission to delete instances.

Default Configuration ​

json
{
  "config": {
    "serviceControlPolicy": {
      "allowedActions": ["**"],
      "deniedActions": []
    }
  }
}

By default, the allowedActions list contains ["**"], which permits all actions at the tenant and space levels. This ensures that, unless otherwise specified, all actions are initially allowed.

The glob pattern ** means it can match across multiple domains separated by a colon :

Use Case Examples ​

Use Case 1: Restricting File Service NFS ​

A Tenant Admin wants to restrict tenants from using the File Service NFS.

  • Action: Deny all actions for File Service NFS in the tenant-level SCP.
  • Configuration:
    json
    {
      "config": {
        "serviceControlPolicy": {
          "allowedActions": ["**"],
          "deniedActions": [
            "services:FILESERVICE:FS_NFS_CONTAINER:*",
            "services:FILESERVICE:FS_NFS_SHARE:*"
          ]
        }
      }
    }
  • Result: Users cannot perform any actions related to the File Service NFS services.

💡 Note: Although the allowedActions list is set to ["**"], the deniedActions list takes precedence.

Tip: Alternatively services:FILESERVICE:NFS*:* can be used to deny all actions for services starting with NFS.

Use Case 2: Allowing Only S3 Service for a Tenant ​

A Tenant Admin wants to enable only the S3 service for their tenant.

  • Action: Only allow actions related to desired services in the tenant-level SCP.
  • Configuration:
    json
    {
      "config": {
        "serviceControlPolicy": {
          "allowedActions": ["services:S3:**"],
          "deniedActions": []
        }
      }
    }
  • Result: Users within the tenant can only access and perform actions related to the S3 service.

💡 Note: By doing this you can opt-in to enable only certain services, while new services will not be available by default.

Use Case 3: Restricting Create Actions ​

A Tenant Admin wants to restrict users from creating any new instances but allow them to manage existing ones.

  • Action: Deny the "create" actions but allow all others in the tenant-level SCP.

  • Configuration:

    json
    {
      "config": {
        "serviceControlPolicy": {
          "allowedActions": ["**"],
          "deniedActions": ["**:create"]
        }
      }
    }
  • Result: Users can manage existing instances but cannot create new ones.

Use Case 4: Space-Level SCP to Restrict Deletion in Specific Space ​

A Space Admin wants to restrict users from deleting instances in a specific space.

  • Action: Deny the "delete" actions in the space-level SCP.
  • Configuration:
    json
    {
      "config": {
        "serviceControlPolicy": {
          "allowedActions": ["**"],
          "deniedActions": ["**:delete"]
        }
      }
    }
  • Result: Users can create and manage instances in the space but cannot delete them.

Tasks and entities not restricted by SCPs ​

You can't use SCPs to restrict the following tasks:

  • Any action outside the services: domain to avoid interfering with essential management permissions.
  • Any action performed by Provider Admins

SCPs only set limits; they do not grant permissions. To grant permissions, custom groups with attached roles and permissions must be used.

Additional Resources ​

  • AWS Service Control Policies (SCPs):
    For more information on a similar approach, refer to the AWS SCP documentation.
  • Glob Pattern:
    Learn more about glob patterns and their syntax in OPA glob patterns.