- Resource: ServicePerimeter
- PerimeterType
- ServicePerimeterConfig
- VpcAccessibleServices
- IngressPolicy
- IngressFrom
- IngressSource
- IdentityType
- IngressTo
- ApiOperation
- EgressPolicy
- EgressFrom
- EgressSource
- SourceRestriction
- EgressTo
- Methods
Resource: ServicePerimeter
ServicePerimeter
describes a set of Google Cloud resources which can freely import and export data amongst themselves, but not export outside of the ServicePerimeter
. If a request with a source within this ServicePerimeter
has a target outside of the ServicePerimeter
, the request is blocked. Otherwise the request is allowed. There are two types of service perimeter: regular and bridge. Regular perimeters cannot overlap, a single Google Cloud project or VPC network can only belong to a single regular perimeter. Perimeter bridges can contain only Google Cloud projects as members, a single Google Cloud project might belong to multiple Service perimeter bridges.
JSON representation |
---|
{ "name": string, "title": string, "description": string, "perimeterType": enum ( |
Fields | |
---|---|
name |
Identifier. Resource name for the The After you create a |
title |
Human readable title. Must be unique within the Policy. |
description |
Description of the |
perimeterType |
Perimeter type indicator. A single project or VPC network is allowed to be a member of single regular perimeter, but a project can be in multiple service perimeter bridges. A project cannot be a included in a perimeter bridge without being included in regular perimeter. For perimeter bridges, the restricted service list as well as access level lists must be empty. |
status |
Current ServicePerimeter configuration. Specifies sets of resources, restricted services and access levels that determine perimeter content and boundaries. |
spec |
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. |
useExplicitDryRunSpec |
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. |
PerimeterType
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 toplogies with many independent perimeters that need to share some data with a common perimeter, but should not be able to share data among themselves.
Enums | |
---|---|
PERIMETER_TYPE_REGULAR |
Regular Perimeter. When no value is specified, the perimeter uses this type. |
PERIMETER_TYPE_BRIDGE |
Perimeter Bridge. |
ServicePerimeterConfig
ServicePerimeterConfig
specifies a set of Google Cloud resources that describe specific Service Perimeter configuration.
JSON representation |
---|
{ "resources": [ string ], "accessLevels": [ string ], "restrictedServices": [ string ], "vpcAccessibleServices": { object ( |
Fields | |
---|---|
resources[] |
A list Google Cloud resources that are inside of the service perimeter. Only projects and VPCs are allowed. Project format: |
accessLevels[] |
A list of |
restrictedServices[] |
Google Cloud services that are subject to the Service Perimeter restrictions. For example, if |
vpcAccessibleServices |
Configuration for APIs allowed within Perimeter. |
ingressPolicies[] |
List of |
egressPolicies[] |
List of |
VpcAccessibleServices
Specifies how APIs are allowed to communicate within the Service Perimeter.
JSON representation |
---|
{ "enableRestriction": boolean, "allowedServices": [ string ] } |
Fields | |
---|---|
enableRestriction |
Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowedServices'. |
allowedServices[] |
The list of APIs usable within the Service Perimeter. Must be empty unless 'enableRestriction' is True. You can specify a list of individual services, as well as include the 'RESTRICTED-SERVICES' value, which automatically includes all of the services protected by the perimeter. |
IngressPolicy
Policy for ingress into ServicePerimeter
.
IngressPolicies
match requests based on ingressFrom
and ingressTo
stanzas. For an ingress policy to match, both the ingressFrom
and ingressTo
stanzas must be matched. If an IngressPolicy
matches a request, the request is allowed through the perimeter boundary from outside the perimeter.
For example, access from the internet can be allowed either based on an AccessLevel
or, for traffic hosted on Google Cloud, the project of the source network. For access from private networks, using the project of the hosting network is required.
Individual ingress policies can be limited by restricting which services and/or actions they match using the ingressTo
field.
JSON representation |
---|
{ "ingressFrom": { object ( |
Fields | |
---|---|
ingressFrom |
Defines the conditions on the source of a request causing this |
ingressTo |
Defines the conditions on the |
IngressFrom
Defines the conditions under which an IngressPolicy
matches a request. Conditions are based on information about the source of the request. The request must satisfy what is defined in sources
AND identity related fields in order to match.
JSON representation |
---|
{ "sources": [ { object ( |
Fields | |
---|---|
sources[] |
Sources that this |
identities[] |
A list of identities that are allowed access through |
identityType |
Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of |
IngressSource
The source that IngressPolicy
authorizes access from.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field source . Allowed ingress source. It can be one of AccessLevel or Google Cloud resource. source can be only one of the following: |
|
accessLevel |
An |
resource |
A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources are allowed to access perimeter data. Only projects and VPCs are allowed. Project format: |
IdentityType
Specifies the types of identities that are allowed access in either IngressFrom
or EgressFrom
rules.
Enums | |
---|---|
IDENTITY_TYPE_UNSPECIFIED |
No blanket identity group specified. |
ANY_IDENTITY |
Authorize access from all identities outside the perimeter. |
ANY_USER_ACCOUNT |
Authorize access from all human users outside the perimeter. |
ANY_SERVICE_ACCOUNT |
Authorize access from all service accounts outside the perimeter. |
IngressTo
Defines the conditions under which an IngressPolicy
matches a request. Conditions are based on information about the ApiOperation
intended to be performed on the target resource of the request. The request must satisfy what is defined in operations
AND resources
in order to match.
JSON representation |
---|
{
"operations": [
{
object ( |
Fields | |
---|---|
operations[] |
A list of |
resources[] |
A list of resources, currently only projects in the form |
roles[] |
IAM roles that represent the set of operations that the sources specified in the corresponding |
ApiOperation
Identification for an API Operation.
JSON representation |
---|
{
"serviceName": string,
"methodSelectors": [
{
object ( |
Fields | |
---|---|
serviceName |
The name of the API whose methods or permissions the |
methodSelectors[] |
API methods or permissions to allow. Method or permission must belong to the service specified by |
EgressPolicy
Policy for egress from perimeter.
EgressPolicies
match requests based on egressFrom
and egressTo
stanzas. For an EgressPolicy
to match, both egressFrom
and egressTo
stanzas must be matched. If an EgressPolicy
matches a request, the request is allowed to span the ServicePerimeter
boundary. For example, an EgressPolicy
can be used to allow VMs on networks within the ServicePerimeter
to access a defined set of projects outside the perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket or query against a BigQuery dataset).
EgressPolicies
are concerned with the resources that a request relates as well as the API services and API actions being used. They do not related to the direction of data movement. More detailed documentation for this concept can be found in the descriptions of EgressFrom
and EgressTo
.
JSON representation |
---|
{ "egressFrom": { object ( |
Fields | |
---|---|
egressFrom |
Defines conditions on the source of a request causing this |
egressTo |
Defines the conditions on the |
EgressFrom
Defines the conditions under which an EgressPolicy
matches a request. Conditions based on information about the source of the request. Note that if the destination of the request also is protected by a ServicePerimeter
, then that ServicePerimeter
must have an IngressPolicy
which allows access in order for this request to succeed.
JSON representation |
---|
{ "identities": [ string ], "identityType": enum ( |
Fields | |
---|---|
identities[] |
A list of identities that are allowed access through |
identityType |
Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of |
sources[] |
Sources that this |
sourceRestriction |
Whether to enforce traffic restrictions based on |
EgressSource
The source that EgressPolicy
authorizes access from inside the ServicePerimeter
to somewhere outside the ServicePerimeter
boundaries.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field source . Allowed egress source. source can be only one of the following: |
|
accessLevel |
An |
SourceRestriction
Whether to enable the enforcement of traffic based on the sources
field. Only applies to EgressFrom
.
Enums | |
---|---|
SOURCE_RESTRICTION_UNSPECIFIED |
Enforcement preference unspecified, will not enforce traffic restrictions based on sources in EgressFrom . |
SOURCE_RESTRICTION_ENABLED |
Enforcement preference enabled, traffic restrictions will be enforced based on sources in EgressFrom . |
SOURCE_RESTRICTION_DISABLED |
Enforcement preference disabled, will not enforce traffic restrictions based on sources in EgressFrom . |
EgressTo
Defines the conditions under which an EgressPolicy
matches a request. Conditions are based on information about the ApiOperation
intended to be performed on the resources
specified. Note that if the destination of the request is also protected by a ServicePerimeter
, then that ServicePerimeter
must have an IngressPolicy
which allows access in order for this request to succeed. The request must match operations
AND resources
fields in order to be allowed egress out of the perimeter.
JSON representation |
---|
{
"resources": [
string
],
"operations": [
{
object ( |
Fields | |
---|---|
resources[] |
A list of resources, currently only projects in the form |
operations[] |
A list of |
externalResources[] |
A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported formats are s3://BUCKET_NAME, s3a://BUCKET_NAME, and s3n://BUCKET_NAME. For Azure Storage, the supported format is azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed. |
roles[] |
IAM roles that represent the set of operations allowed to be performed by the sources specified in the corresponding |
Methods |
|
---|---|
|
Commits the dry-run specification for all the service perimeters in an access policy . |
|
Creates a service perimeter . |
|
Deletes a service perimeter based on the resource name. |
|
Gets a service perimeter based on the resource name. |
|
Lists all service perimeters for an access policy. |
|
Updates a service perimeter . |
|
Replace all existing service perimeters in an access policy with the service perimeters provided. |
|
Returns the IAM permissions that the caller has on the specified Access Context Manager resource. |