Property | Value |
---|---|
Google Cloud Service Name | AccessContextManager |
Google Cloud Service Documentation | /vpc-service-controls/docs/ |
Google Cloud REST Resource Name | accesscontextmanager.v1.accessPolicies.servicePerimeters |
Google Cloud REST Resource Documentation | /access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters |
Config Connector Resource Short Names | gcpaccesscontextmanagerserviceperimeter gcpaccesscontextmanagerserviceperimeters accesscontextmanagerserviceperimeter |
Config Connector Service Name | accesscontextmanager.googleapis.com |
Config Connector Resource Fully Qualified Name | accesscontextmanagerserviceperimeters.accesscontextmanager.cnrm.cloud.google.com |
Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
Custom Resource Definition Properties
Spec
Schema
accessPolicyRef:
external: string
name: string
namespace: string
description: string
perimeterType: string
spec:
accessLevels:
- external: string
name: string
namespace: string
resources:
- projectRef:
external: string
name: string
namespace: string
restrictedServices:
- string
vpcAccessibleServices:
allowedServices:
- string
enableRestriction: boolean
status:
accessLevels:
- external: string
name: string
namespace: string
resources:
- projectRef:
external: string
name: string
namespace: string
restrictedServices:
- string
vpcAccessibleServices:
allowedServices:
- string
enableRestriction: boolean
title: string
useExplicitDryRunSpec: boolean
Fields | |
---|---|
Required |
The AccessContextManagerAccessPolicy this AccessContextManagerServicePerimeter lives in. |
Optional |
The name of an AccessContextManagerAccessPolicy. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Description of the ServicePerimeter and its use. Does not affect behavior. |
Optional |
Immutable. Specifies the type of the Perimeter. There are two types: regular and bridge. Regular Service Perimeter contains resources, access levels, and restricted services. Every resource can be in at most ONE regular Service Perimeter. In addition to being in a regular service perimeter, a resource can also be in zero or more perimeter bridges. A perimeter bridge only contains resources. Cross project operations are permitted if all effected resources share some perimeter (whether bridge or regular). Perimeter Bridge does not contain access levels or services: those are governed entirely by the regular perimeter that resource is in. Perimeter Bridges are typically useful when building more complex topologies with many independent perimeters that need to share some data with a common perimeter, but should not be able to share data among themselves. Default value: "PERIMETER_TYPE_REGULAR" Possible values: ["PERIMETER_TYPE_REGULAR", "PERIMETER_TYPE_BRIDGE"] |
Optional |
Proposed (or dry run) ServicePerimeter configuration. This configuration allows to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only allowed to be set when the 'useExplicitDryRunSpec' flag is set. |
Optional |
|
Optional |
(Optional) A list of AccessLevel resource names that allow resources within the ServicePerimeter to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel is a syntax error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via GCP calls with request origins within the perimeter. For Service Perimeter Bridge, must be empty. |
Optional |
The name of an AccessContextManagerAccessLevel. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
|
Optional |
(Optional) A list of GCP resources that are inside of the service perimeter. Currently only projects are allowed. |
Optional |
|
Optional |
The number of a Project. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
GCP services that are subject to the Service Perimeter restrictions. Must contain a list of services. For example, if 'storage.googleapis.com' is specified, access to the storage buckets inside the perimeter must meet the perimeter's access restrictions. |
Optional |
|
Optional |
Specifies how APIs are allowed to communicate within the Service Perimeter. |
Optional |
The list of APIs usable within the Service Perimeter. Must be empty unless 'enableRestriction' is True. |
Optional |
|
Optional |
Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowedServices'. |
Optional |
ServicePerimeter configuration. Specifies sets of resources, restricted services and access levels that determine perimeter content and boundaries. |
Optional |
|
Optional |
(Optional) A list of AccessLevel resource names that allow resources within the ServicePerimeter to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel is a syntax error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via GCP calls with request origins within the perimeter. For Service Perimeter Bridge, must be empty. |
Optional |
The name of an AccessContextManagerAccessLevel. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
|
Optional |
(Optional) A list of GCP resources that are inside of the service perimeter. Currently only projects are allowed. |
Optional |
|
Optional |
The number of a Project. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
GCP services that are subject to the Service Perimeter restrictions. Must contain a list of services. For example, if 'storage.googleapis.com' is specified, access to the storage buckets inside the perimeter must meet the perimeter's access restrictions. |
Optional |
|
Optional |
Specifies how APIs are allowed to communicate within the Service Perimeter. |
Optional |
The list of APIs usable within the Service Perimeter. Must be empty unless 'enableRestriction' is True. |
Optional |
|
Optional |
Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowedServices'. |
Required |
Human readable title. Must be unique within the Policy. |
Optional |
Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists for all Service Perimeters, and that spec is identical to the status for those Service Perimeters. When this flag is set, it inhibits the generation of the implicit spec, thereby allowing the user to explicitly provide a configuration ("spec") to use in a dry-run version of the Service Perimeter. This allows the user to test changes to the enforced config ("status") without actually enforcing them. This testing is done through analyzing the differences between currently enforced and suggested restrictions. useExplicitDryRunSpec must bet set to True if any of the fields in the spec are set to non-default values. |
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
createTime: string
updateTime: string
Fields | |
---|---|
conditions |
Conditions represents the latest available observation of the resource's current state. |
conditions.[] |
|
conditions.[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions.[].message |
Human-readable message indicating details about last transition. |
conditions.[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions.[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions.[].type |
Type is the type of the condition. |
createTime |
Time the AccessPolicy was created in UTC. |
updateTime |
Time the AccessPolicy was updated in UTC. |
Sample YAML(s)
Typical Use Case
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: accesscontextmanager.cnrm.cloud.google.com/v1beta1
kind: AccessContextManagerServicePerimeter
metadata:
name: serviceperimetersample
spec:
# Config for DRY-RUN
# To use this 'useExplicitDryRunSpec' must be set to 'true'
# Replace "${ACCESS_POLICY_NUMBER}" with the numeric ID for your Access Policy
# Replace "${PROJECT_NUMBERx}" with the appropriate `project number` for the project to be protected by the perimeter
spec:
# List of Access Levels to be applied for this perimeter
accessLevels:
- name: serviceperimeterdep2
# List of projects to be included in this perimeter
resources:
- projectRef:
external: "projects/${PROJECT_NUMBER1}"
- projectRef:
external: "projects/${PROJECT_NUMBER2}"
# List of restricted services
restrictedServices:
- "storage.googleapis.com"
# List of services that could be accessed from within the perimeter
vpcAccessibleServices:
allowedServices:
- "storage.googleapis.com"
- "pubsub.googleapis.com"
enableRestriction: true
# Config to ENFORCE
# Config items are repeated as above for DRY-RUN
# Replace "${ACCESS_POLICY_NUMBER}" with the numeric ID for your Access Policy
# Replace "${PROJECT_NUMBERx}" with the appropriate `project number` for the project to be protected by the perimeter
status:
accessLevels:
- name: serviceperimeterdep2
resources:
- projectRef:
external: "projects/${PROJECT_NUMBER3}"
- projectRef:
external: "projects/${PROJECT_NUMBER4}"
restrictedServices:
- "bigquery.googleapis.com"
vpcAccessibleServices:
allowedServices:
- "bigquery.googleapis.com"
- "logging.googleapis.com"
enableRestriction: true
title: Service Perimeter created by Config Connector
useExplicitDryRunSpec: true
accessPolicyRef:
# Using an already existing Access Policy. Currently there is a limitation
# of only one Access Policy per Organisation.
# Use one of the two options below to select Access Policy
# 1. The dependent Access Policy Object created via Config Connector
# name: accesscontextmanagerserviceperimeterdep
# 2. Set the appropriate ACCESS_POLICY_NUMBER
external: accessPolicies/${ACCESS_POLICY_NUMBER}
description: A Service Perimeter Created by Config Connector
perimeterType: PERIMETER_TYPE_REGULAR
---
apiVersion: accesscontextmanager.cnrm.cloud.google.com/v1beta1
kind: AccessContextManagerAccessLevel
metadata:
annotations:
# Replace "${ORG_ID?}" with the numeric ID for your organization
cnrm.cloud.google.com/organization-id: "${ORG_ID}"
name: serviceperimeterdep1
spec:
accessPolicyRef:
# Replace "${ACCESS_POLICY_NUMBER}" with the numeric ID for your Access Policy
external: "accessPolicies/${ACCESS_POLICY_NUMBER}"
title: Service Perimeter Dependency ACL1
basic:
conditions:
- devicePolicy:
requireCorpOwned: true
---
apiVersion: accesscontextmanager.cnrm.cloud.google.com/v1beta1
kind: AccessContextManagerAccessLevel
metadata:
annotations:
# Replace "${ORG_ID?}" with the numeric ID for your organization
cnrm.cloud.google.com/organization-id: "${ORG_ID}"
name: serviceperimeterdep2
spec:
accessPolicyRef:
# Replace "${ACCESS_POLICY_NUMBER}" with the numeric ID for your Access Policy
external: "accessPolicies/${ACCESS_POLICY_NUMBER}"
title: Service Perimeter Dependency ACL2
basic:
conditions:
- devicePolicy:
requireCorpOwned: true