This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Common types

Understanding common types
  • 1:
  • 2:
  • 3:

List of common protobuf packages used by SPEKTRA Edge services

1 -

All messages and enums in package goten.types

Proto package goten.types

goten.types Shared Messages

Here is the list of goten.types shared messages:

LabelSelector Message

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

NameTypeDescription
match_labelsmap<string, string>matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
match_expressionsrepeated LabelSelectorRequirementmatchExpressions is a list of label selector requirements. The requirements are ANDed.

LabelSelectorRequirement Message

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

NameTypeDescription
keystringkey is the label key that the selector applies to. +patchMergeKey=key +patchStrategy=merge
operatorstringoperator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
valuesrepeated stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. +optional

Lifecycle Message

NameTypeDescription
stateLifecycle.StateCurrent resource state
block_deletionboolOptional flag indicating that resource must not be deleted - at least yet. This flag is not accessible via API, it is expected developer will populate it if needed from custom server code. It should be used when some condition (other than blocking back reference) applies that server is not aware of. If flag is true, then constraint store will block resource deletion. GC will also defer from cleaning up, however developer should ensure that eventually deletion will be done.

Memo Message

Memo

NameTypeDescription
create_time.google.protobuf.Timestamp
update_time.google.protobuf.Timestamp
messagestring
created_bystring

Meta Message

Metadata

NameTypeDescription
create_time.google.protobuf.Timestamp
update_time.google.protobuf.Timestamp
delete_time.google.protobuf.Timestamp
uuidstring
tagsrepeated string
labelsmap<string, string>
annotationsmap<string, string>
generationint64generation is the version number of the spec of the resource. This number increments when the resource is updated with any changes of its spec.
resource_versionstringAn opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
owner_referencesrepeated OwnerReferenceList of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected, unless, the last owner reference had the unset_on_delete flag set to true - in this case the object won’t be garbage collected, just the owner reference will be unset. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true.
shardsmap<string, int64>List of all shard indices by their keys
syncingSyncingMetaInformation about resource region and synchronization
lifecycleLifecycleCurrent lifecycle information about resource.
servicesServicesInfoInformation about services access.ownership of given resource. Non populated value should be treated as unregulated access.

MultiRegionPolicy Message

MultiRegionPolicy is an object defining relation between service in multi-region environment and resource holding this policy (as one of its fields). Policy ought to be used for high-level resources like “Project” or “Organization” which form top elements in scopes. Policy then, attached to such a high level resource defines syncing policies for all kid resources and limits their geographical belonging (kid resources can belong only to the region allowed by a policy). Note: While policy governs all resources under policy holder resource, policy holder resource itself is not subject to this policy. This rule allows information about policy spread properly across regions and enables routing.

NameTypeDescription
enabled_regionsrepeated stringList of regions available in the scope. It is forbidden to create resource within given scope outside allowed regions.
default_control_regionstringMust be within restricted_regions. Defines region handling CUD requests for resources not attached to any region.
criteria_for_disabled_syncrepeated MultiRegionPolicy.CriteriaForDisabledSyncList of criteria according to which synchronization is disabled.

MultiRegionPolicy.CriteriaForDisabledSync Message

CriteriaForDisabledSync is a rule preventing data synchronization. By default, everything within Policy scope is synced (unless schema tells otherwise). However, within single scope to which this policy is attached, it is possible to blacklist synchronization for specific criteria. Examples: { resource_type_name: “devices.service.com/Device”, sourceRegion: “france” } -> will make Devices in France private { resource_type_name: “devices.service.com/Device”, destRegion: “hongkong” } -> will prevent from syncing Devices INTO HongKong region { resource_type_name: “devices.service.com/Device”, sourceRegion: “germany”, destRegion: “hongkong” } -> Will block syncing of Devices from Germany to HongKong. { resource_type_name: “devices.service.com/Pod” } -> will make Pods in all regions private { region: “japan” } -> will make all resources in Japan private

NameTypeDescription
resource_type_namestringFully qualified name of a resource. If not provided, all are considered. Required format: “${SERVICE_DOMAIN}/${RESOURCE_SINGLE_NAME_CAMEL}, for example: “devices.service.com/Device”
source_regionstringSource region indicates that this rule prevents syncing into this region. If left blank, then all regions are considered.
dest_regionstringDest region indicates that this rule prevents syncing from this region. If left blank, then all regions are considered.

OwnerReference Message

OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.

NameTypeDescription
kindstringResource kind, for example “library.goten.com/Site”
versionstringFor example v1
namestringName of the resource, for example projects/p1/devices/d1
regionstringRegion ID owning resource
controllerboolIf true, this reference points to the managing controller.
requires_owner_referenceboolThis flag indicates that owner must have schema-based reference for this owner reference to be valid. Otherwise it will be removed. If there are no other owners, resource will be deleted. It also works if owner resource unsets its reference. This extends default behavior of meta references, where ownees are deleted only when owner is deleted. Here, we also want to delete ownee if owner just stops pointing to ownee via own reference (or never pointed at all). This flag is useful if higher-level service creates some resource in lower level service and assigns via schema reference.
unset_on_deleteboolThis flag indicates if the reference should be unset on the owner deletion. If set, owner’s deletion will not cause the resource deletion, but rather only the owner reference will be unset

ServicesInfo Message

ServicesInfo contains information about resource ownership/access in terms of service. As goten is a multi-service framework, it is possible for a resource in one service to be “owned” by another one. Owning service may also need to regulate access to other services via allowed services field. It should be note that Goten does not provide authorization layer of its own, ServicesInfo is provided for convenience, but actual restriction should be implemented by actual services.

NameTypeDescription
owning_servicestringService domain owning resource
allowed_servicesrepeated stringList of services with allowed access to resource.

SyncingMeta Message

SyncingMeta is a helper object associated with each resource that is either regional or is governed by Policy object. This object is used for internal purposes like Sync controller which ensures data synchronization of all resources across multiple regions.

NameTypeDescription
owning_regionstringFor regional resources (or their descendants) it is equal to the region ID (present in resource name). Otherwise it is equal to the region as defined in Policy object under default_control_region field.
regionsrepeated stringList of regions where owning resource can be present. If can be present in all regions, will contain “*”.

goten.types Shared Enumerations

Here is the list of goten.types shared enumerations:

Lifecycle.State Enumeration

current resource state

NameDescription
UNDEFINEDMust never be used
ACTIVEResource is up and running
DELETINGResource is in slow-deletion process.

View Enumeration

View defines list of fields of the resource that will be obtained in servers response.

NameDescription
UNSPECIFIED
NAME
BASIC
DETAIL
FULL

WatchType Enumeration

WatchType defines how client wants to subscribe for real-time updates when making Watch request.

NameDescription
STATEFULIn a Stateful type, by default first watch response contains whole snapshot of a given query according to the provided filter, field mask, order by fields. Paging is supported (page token and size can be used), but resuming not (resume token cannot be used). Reason is, that server drops all state for given watch session after disconnection and cannot match resuming token with some known state. Subsequent responses will contain incremental changes to the initially given snapshot. Server will provide additional information like index positions (and changes of those). It is possible to split snapshot and incremental changes into chunks (and therefore, many watch responses) by using maximum chunk size field in a request. In that case, client is expected to check the appropriate flag in each response messages to find a marker when “complete” message finishes. Clients should specify at least chunk size or page size. If none of them are present, server may enforce own limit on number of resources (page size) and return snapshot with next page token, if that limit was exceeded. If page size is accepted by the server (not too big), then response may be chunked only on user wish, but its not necessary. This type is made for users desiring real-time updates of a defined pages for use in for example UI dashboards, which is typical case when users are capped by a page size.
STATELESSIn a stateless type, initial snapshot of a query is sent within N watch responses (N = (NumRes / ChunkSize)), where: NumRes is a number of resources passing optional filter specified in a request (and parent if applicable), and ChunkSize is a maximum number of resource changes allowed to be included in a single Watch<Collection>Response. This chunk size should be specified in request object. Ordering and paging is not supported: request must not specify page token, order by fields or page size. Response object will never contain next/prev page tokens and index positions inside resource change objects must be ignored by a client. Field mask is allowed to be used. As client is supposed to contain state of the session, it is allowed to use resumption tokens and it may be provided with response. Server cannot tell the difference between added or modified resource - instead of using “Add” or “Modified” change types, server uses stateless “Set” type. The only common part is “Removed” type. If client does not specify chunk size, server may enforce its own default value. This type is made for users that do not care about ordering or paging but need general view of a set of resources in the unordered fashion, for example controllers. The benefit of this type, is that number of resources is never capped.

2 -

All messages and enums in package ntt.api

Proto package ntt.api

ntt.api Shared Messages

Here is the list of ntt.api shared messages:

Account Message

NameTypeDescription
userUser
service_accountServiceAccount

DeviceFileCheck Message

NameTypeDescription
file_typeDeviceFileCheck.FileTypeOneOf
device_file_namestring

DeviceFileCheck.FileTypeOneOf Message

NameTypeDescription
is_directorybool
is_block_devicebool
is_char_devicebool
is_fifobool
is_regular_filebool

DeviceIdentity Message

NameTypeDescription
serial_numberstring
manufacturerstring
product_namestring
tpm_versionTpmVersionOnly TPM2.0 is supported
ek_tpm_pubbytesTPM_PUBLIC format object obtained by tpm2.ReadPublic
ekcertbytesASN.1 DER encoded EK certificate.
ekcerturlstringFor Intel TPMs, Intel hosts certificates at a public URL derived from the Public key. Clients or servers can perform an HTTP GET to this URL, and use ParseEKCertificate on the response body.
idevid_cert_tpm_pubbytesTPM_PUBLIC format object obtained by tpm2.ReadPublic
idevid_certbytesASN.1 DER encoded IDevID certificate.
ldevid_cert_tpm_pubbytesTPM_PUBLIC format object obtained by tpm2.ReadPublic
ldevid_certbytesASN.1 DER encoded LDevID certificate.
ak_paramsDeviceIdentity.AttestationParams
challenge_formatDeviceIdentity.ChallengeFormatChallengeFormat defines the method of generating identity activation challenge by the Verifier (server). It should affect the interpretation ChallengeResponse fields cred_encrypted_by_ekpub and secret_encrypted_by_cred. Attestor (client) is responsible for chosing the right format depending on TPM version and the presence of TrouSerS daemon.

DeviceIdentity.AttestationParams Message

NameTypeDescription
akpubbyteshttps: // trustedcomputinggroup.org/wp-content/uploads/TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf https: // www.trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-2-Structures-01.38.pdf TPMT_PUBLIC (TPM 2.0) or TPM_PUBKEY (TPM 1.2)
creation_databytesTPMS_CREATION_DATA
attestbytesTPMS_ATTEST
signaturebytesTPMT_SIGNATURE

ExecCheck Message

ExecCheck describes a “run in container” action.

NameTypeDescription
commandrepeated stringCommand is the command line to execute inside the container, the working directory for the command is root (’/’) in the container’s filesystem. The command is simply exec’d, it is not run inside a shell, so traditional shell instructions ('

GRPCCheck Message

NameTypeDescription
portint32Port number of the gRPC service. Number must be in the range 1 to 65535.
servicestringService is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC.
hoststringHost name to connect to. For containers this defaults to the container IP or wan interface IP in host mode networking For device, this is a mandatory parameter
skip_tls_checkbool

HTTPGetCheck Message

HTTPGetCheck describes health check based on HTTP Get requests.

NameTypeDescription
urlstringhttp_url field has to be used when the IP to perform health check is a container IP that cannot not be known beforehand, In all other cases, simple url string can be used Although not explicitly declared as oneof, url and http_url is oneof type
http_urlHTTPGetCheck.HTTPUrl
http_headersrepeated HTTPGetCheck.HTTPHeaderCustom headers to set in the request. HTTP allows repeated headers. optional
skip_tls_checkbool
expected_response_codeint32optional. By default any response code >= 400 or response code == 300 are considered as failure Sometimes, the health check might actually expect 401/403/511 without proper authentication setting expected_response_code will help to consider this as successful for health check
enable_detailed_metricsboolBy default only Success or Failure metric will be generated. This field can be used to enable response time metric and network metrics if supported

HTTPGetCheck.HTTPHeader Message

HTTPHeader describes a custom header to be used in HTTP HealthChecks

NameTypeDescription
namestringThe header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
valuestringThe header field value

HTTPGetCheck.HTTPUrl Message

NameTypeDescription
pathstringPath to access on the HTTP server, defaults to /
portint32port to access on the container. defaults to 80 for http and 443 for https Number must be in the range 1 to 65535.
hoststringHost name to connect to. For containers this defaults to the container IP or wan interface IP in host mode networking For device, this is a mandatory parameter
schemestringScheme to use for connecting to the host. optional, defaults to HTTP.

HealthCheckSpec Message

HealthCheck describes a health check to be performed in the context of a device or a container. Only the exec check can be truly executed inside a container. All the other checks are run on the host device. When run for device health check, host/IP address is mandatory for connectivity checks. For container health checks, host/IP is optional and would default to IP address of the container. It is important to note that a health check for https://endpoint.com/api defined for a container would be run from the host device and not from withthin the container

NameTypeDescription
http_get_checkHTTPGetCheckhttp_get_check specifies the http request to perform.
tcp_checkTCPChecktcp_check specifies an action involving a TCP port.
icmp_checkICMPCheckicmp_check specifies an icmp health check
grpc_checkGRPCCheckGRPC specifies an action involving a GRPC port. It is essential that the grpc server inplements this api https://github.com/grpc/grpc/blob/master/doc/health-checking.md If not, tcp_check should be used.
execExecCheckExec specifies the command to execute in the container to determine its health
device_file_checkDeviceFileCheckdevice_file_check is only available for device. It can be configured to ensure specific hardware is connected (eg modem /dev/cdc-wdm0, RFID reader device /dev/ttyACM0 etc)
timeout.google.protobuf.DurationTimeout for the HealthCheck. Defaults to 1 second, greater than 5 seconds is not allowed
interval.google.protobuf.DurationInterval for health check, 60 seconds minimum interval
namestringname for the health check. A meaningful name for this might be useful as a metrics label

ICMPCheck Message

NameTypeDescription
hoststringdomain name or IP Addres to perform ICMP check
enable_detailed_metricsboolBy default only Success or Failure metric will be generated. This field can be used to enable network metrics such as latency/jitter

IdentityChallenge Message

One of IDevID or LDevID is mandatory for IdentityChallenge to succeed DevID keys can be either signing or decrypt With GlobalSign + Compulab, we use decrypt keys, but other vendors like Dell may be using signing keys instead, so api should allow both

NameTypeDescription
platform_attestation_noncebytesPlatform attestation
cred_encrypted_by_ekpubbytesAK TPM Residency check
secret_encrypted_by_ekcredbytes
cred_encrypted_by_idevid_pubbytesIDevID TPM Residency check
secret_encrypted_by_idevid_credbytes
cred_encrypted_by_ldevid_pubbytesLDevID TPM Residency check
secret_encrypted_by_ldevid_credbytes
digest_to_sign_with_idevidbytesIDevID verification when key is signing
rsa_secret_to_decrypt_with_idevidbytesIDevID verification when key is decrypt
digest_to_sign_with_ldevidbytesLDevID verification when key is signing
rsa_secret_to_decrypt_with_ldevidbytesLDevID verification when key is decrypt

IdentityChallengeResponse Message

NameTypeDescription
ak_activation_decrypted_secretbytes
idevid_activation_decrypted_secretbytes
ldevid_activation_decrypted_secretbytes
digest_signed_by_idevidbytes
digest_signed_by_ldevidbytes
rsa_decrypted_with_idevidbytes
rsa_decrypted_with_ldevidbytes
quotesrepeated IdentityChallengeResponse.Quote
pcrsrepeated PCR
eventlogbytesBinary contents of /sys/kernel/security/tpm0/binary_bios_measurements

IdentityChallengeResponse.Quote Message

NameTypeDescription
quotebytesTPMS_ATTEST (TSS_VALIDATION.Data or TSS_VALIDATION.rgbData) This contains PCR selection information for which the signature was calculated and other required data, like nonce.
signaturebytesTSS_VALIDATION.ValidationData or TSS_VALIDATION.rgbValidationData

PCR Message

NameTypeDescription
indexuint32s
digest_hexstringHex-encoded digest string (without 0x prefix, e.g. “DEADBEEF”)
digest_algDigestAlg
commentstringUser’s comments for this entry

ServiceAccount Message

NameTypeDescription
typestring
client_emailstring
private_key_idstring
private_keystring

TCPCheck Message

TCPCheck performs a TCP connect check. Only TCP handshake is performed. No data is sent

NameTypeDescription
portint32Port number to access on the container or given destination. Number must be in the range 1 to 65535.
hoststringHost name to connect to. For containers this defaults to the container IP or wan interface IP in host mode networking For device, this is a mandatory parameter

User Message

NameTypeDescription
emailstring
access_tokenstring
token_typestring
refresh_tokenstring
expiry.google.protobuf.Timestamp

ntt.api Shared Enumerations

Here is the list of ntt.api shared enumerations:

DeviceIdentity.ChallengeFormat Enumeration

NameDescription
TPM20_CREDENTIALCredential Protection as defined in section 24 of the TPM specification revision 2 part 1 See: https://trustedcomputinggroup.org/resource/tpm-library-specification/ Returned primitives are of type TPM2B_ID_OBJECT and TPM2B_ENCRYPTED_SECRET. NOTE: ECC is not supported. Reference implementation: github.com/google/go-attestation@v0.3.2/attest/activation.go:generateChallengeTPM20, which uses github.com/google/go-tmp@v0.3.2/tmp2/credactivation/credential_activation.go:Generate

DigestAlg Enumeration

NameDescription
SHA1
SHA256

LaunchStage Enumeration

The launch stage as defined by Google Cloud Platform Launch Stages.

NameDescription
LAUNCH_STAGE_UNSPECIFIEDDo not use this default value.
EARLY_ACCESSEarly Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.
ALPHAAlpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects whitelisted. Alpha releases don’t have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests – just like they would in normal production cases.
BETABeta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.
GAGA features are open to all developers and are considered stable and fully qualified for production use.
DEPRECATEDDeprecated features are scheduled to be shut down and removed. For more information, see the “Deprecation Policy” section of our Terms of Service and the Google Cloud Platform Subject to the Deprecation Policy documentation.

TpmVersion Enumeration

NameDescription
TPMVAGNOSTIC
TPMV12
TPMV20

3 -

All messages and enums in package ntt.rpc

Proto package ntt.rpc

ntt.rpc Shared Messages

Here is the list of ntt.rpc shared messages:

Status Message

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. The error model is designed to be:

  • Simple to use and understand for most users
  • Flexible enough to meet unexpected needs

Overview

The Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.

Language mapping

The Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.

Other uses

The error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.

Example uses of this error model include:

  • Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.

  • Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.

  • Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.

  • Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.

  • Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.

NameTypeDescription
codeint32The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
messagestringA developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
detailsrepeated .google.protobuf.AnyA list of messages that carry the error details. There is a common set of message types for APIs to use.