Google is committed to advancing racial equity for Black communities. See how.

fuchsia.weave

PROTOCOLS

Bootstrap

Defined in fuchsia.weave/bootstrap.fidl

Protocol to allow components to provide initial configuration data derived from an existing Weave implementation to ensure continuity of the Weave fabric and other Weave settings or configuration data.

ImportWeaveConfig

Import a JSON-formatted Weave config providing data in the format expected to satisfy the Weave DeviceLayer ConfigurationManager.

Configuration is guaranteed to have been persisted upon successful completion of this call.

Request

NameType
config_json fuchsia.mem/Buffer

Response

NameType
result Bootstrap_ImportWeaveConfig_Result

FactoryDataManager

Defined in fuchsia.weave/auth.fidl

This protocol is used to retrieve factory data that may be encrypted at rest.

GetPairingCode

Return the device pairing_code on success.

Request

<EMPTY>

Response

NameType
result FactoryDataManager_GetPairingCode_Result

GetWeaveCertificate

Returns the factory provisioned Weave certificate in PEM format.

Request

<EMPTY>

Response

NameType
result FactoryDataManager_GetWeaveCertificate_Result

PairingStateWatcher

Defined in fuchsia.weave/weavestack.fidl

Watches for changes in pairing state in Weave. Retrieved from fuchsia.weave/Stack.GetPairingStateWatcher.

WatchPairingState

Returns the state of pairing.

First call returns the current pairing state or blocks until the pairing state is available. Subsequent calls will block until the pairing state changes.

Calling WatchPairingState when a previous call is still pending will cause the channel to be closed with ZX_ERR_BAD_STATE.

Request

<EMPTY>

Response

NameType
state PairingState

Provisioner

Defined in fuchsia.weave/auth.fidl

This protocol is used for just-in-time provisioning operations.

GenerateKeyPair

Generate key for just-in-time provisioning operations, used when working with Weave operational certificates. On success, a wrapped private key and public key pair is returned in result. The wrapped_private_key can be passed to Signer.SignHashWithPrivateKey to sign Weave messages.

Currently, Weave only supports ECDSA signatures. This protocol returns a key-pair compatible with the Signer protocol (e.g. P256).

Request

<EMPTY>

Response

NameType
result Provisioner_GenerateKeyPair_Result

Signer

Defined in fuchsia.weave/auth.fidl

This protocol is used for signing operations with the factory-provisioned Weave key or generated private keys.

SignHash

Sign the provided hash with the factory provisioned key. On success the result is returned in signature. The signature must be of a type that is supported by Weave, and must take the standard form of an ASN.1 DER SEQUENCE. This operation must support SHA1 and SHA256 hash values.

Request

NameType
hash vector<uint8>[32]

Response

NameType
result Signer_SignHash_Result

SignHashWithPrivateKey

Sign the provided hash with the provided wrapped_private_key. On success, the result is returned in signature. The signature must be of a type that is supported by Weave, and must take the standard form of an ASN.1 DER SEQUENCE. This operation must support SHA1 and SHA256 hash values.

Request

NameType
hash vector<uint8>[32]
wrapped_private_key PrivateKey

Response

NameType
result Signer_SignHashWithPrivateKey_Result

Stack

Defined in fuchsia.weave/weavestack.fidl

Calls and services available from WeaveStack. These calls are designed to wrap the Weave adaptation and provide information or capabilities to Weave applications or components that are interested in information that Weave exposes.

GetPairingStateWatcher

Returns a PairingStateWatcher to watch for changes in pairing state.

Request

NameType
watcher request<PairingStateWatcher>

GetQrCode

Returns a QR code that can be used in the pairing process.

Request

<EMPTY>

Response

NameType
result Stack_GetQrCode_Result

GetSvcDirectoryWatcher

Returns a SvcDirectoryWatcher to watch changes in the Weave service directory for a particular endpoint.

Request

NameType
endpoint_id ServiceEndpointId
watcher request<SvcDirectoryWatcher>

ResetConfig

Reset the Weave configuration.

Request

NameType
flags ResetConfigFlags

Response

NameType
result Stack_ResetConfig_Result

StackProvider

Defined in fuchsia.weave/weavestack.fidl

Services Provided to WeaveStack by other components.

SetWlanNetworkConfigProvider

Registers a WLAN network configuration provider with WeaveStack. Only one provider can be set at a time.

Attempts to set a new provider while there is an active provider will close the channel to active provider and will be replaced by the new provider.

TODO(fxbug.dev/62322): This interface may be deprecated when current WLAN network configuration can be shared amongst multiple components.

Request

NameType
provider WlanNetworkConfigProvider

SvcDirectoryWatcher

Defined in fuchsia.weave/weavestack.fidl

Watches for changes in Weave Service Directory entries for a particular endpoint ID. The endpoint ID is specified in, and this protocol retrieved from fuchsia.weave/Stack.GetServiceDirectoryWatcher.

WatchServiceDirectory

Returns a vector of HostPorts for the watched endpoint ID.

First call returns the current list of HostPorts or blocks until the list is available from the service. Subsequent calls will block until a new ServiceDirectory lookup is made and will return the list associated with the watched endpoint ID, which may or may not be the same as prior values.

Calling WatchServiceDirectory when a previous call is still pending will cause the channel to be closed with ZX_ERR_BAD_STATE.

Request

<EMPTY>

Response

NameType
host_port_list vector<HostPort>[256]

WlanNetworkConfigProvider

Defined in fuchsia.weave/weavestack.fidl

Component acting as WLAN network configuration provider for WeaveStack need to implement this.

WatchConnectedNetwork

Returns current network configuration when new information is available.

First call returns the current network configuration if available, otherwise return empty config. WeaveStack consumes network config and sends another request.

Request

<EMPTY>

Response

NameType
network_config fuchsia.wlan.policy/NetworkConfig

STRUCTS

Bootstrap_ImportWeaveConfig_Response

Defined in fuchsia.weave/bootstrap.fidl

<EMPTY>

FactoryDataManager_GetPairingCode_Response

Defined in fuchsia.weave/auth.fidl

FieldTypeDescriptionDefault
pairing_code vector<uint8>[16] No default

FactoryDataManager_GetWeaveCertificate_Response resource

Defined in fuchsia.weave/auth.fidl

FieldTypeDescriptionDefault
certificate fuchsia.mem/Buffer No default

HostPort

Defined in fuchsia.weave/weavestack.fidl

A tuple of host and port to represent a connectable endpoint.

FieldTypeDescriptionDefault
host Host No default
port uint16 No default

Provisioner_GenerateKeyPair_Response

Defined in fuchsia.weave/auth.fidl

FieldTypeDescriptionDefault
wrapped_private_key PrivateKey No default
public_key vector<uint8>[65] No default

QrCode

Defined in fuchsia.weave/weavestack.fidl

QR Code data for pairing.

FieldTypeDescriptionDefault
data string[256]

QR code data in string format, supplying this string in a QR code should be sufficient for pairing.

No default

Signer_SignHashWithPrivateKey_Response

Defined in fuchsia.weave/auth.fidl

FieldTypeDescriptionDefault
signature vector<uint8>[139] No default

Signer_SignHash_Response

Defined in fuchsia.weave/auth.fidl

FieldTypeDescriptionDefault
signature vector<uint8>[139] No default

Stack_GetQrCode_Response

Defined in fuchsia.weave/weavestack.fidl

FieldTypeDescriptionDefault
qr_code QrCode No default

Stack_ResetConfig_Response

Defined in fuchsia.weave/weavestack.fidl

<EMPTY>

ENUMS

ErrorCode strict

Type: uint32

Defined in fuchsia.weave/common.fidl

NameValueDescription
FILE_NOT_FOUND 1

Key/pairing code not found in storage.

CRYPTO_ERROR 2

Error occurred during cryptographic operations.

INVALID_ARGUMENT 3

An invalid argument was supplied.

INVALID_STATE 4

Weave is in an invalid state to support the operation.

UNSPECIFIED_ERROR 2147483647

An unknown or non-specific error occurred.

TABLES

PairingState

Defined in fuchsia.weave/weavestack.fidl

Current state of pairing/provisioning. At the point of a completely unprovisioned or factory reset device, all states will be false. Outside of an explicit ResetConfig call or factory reset, the provisioning states will only transition from false to true as Weave profiles are provisioned.

OrdinalFieldTypeDescription
1 is_weave_fully_provisioned bool

Has Weave been fully provisioned? This implies that all provisioning has been completed as expected as specified in the configuration.

2 is_wlan_provisioned bool

Has WiFi been provisioned? Defaults to false.

3 is_thread_provisioned bool

Has Thread been provisioned? Defaults to false.

4 is_fabric_provisioned bool

Has the fabric been provisioned? Defaults to false.

5 is_service_provisioned bool

Has the service been provisioned? Defaults to false.

UNIONS

Bootstrap_ImportWeaveConfig_Result strict

Defined in fuchsia.weave/bootstrap.fidl

Ordinal
VariantTypeDescription
1 response Bootstrap_ImportWeaveConfig_Response
2 err zx/status

FactoryDataManager_GetPairingCode_Result strict

Defined in fuchsia.weave/auth.fidl

Ordinal
VariantTypeDescription
1 response FactoryDataManager_GetPairingCode_Response
2 err ErrorCode

FactoryDataManager_GetWeaveCertificate_Result strict resource

Defined in fuchsia.weave/auth.fidl

Ordinal
VariantTypeDescription
1 response FactoryDataManager_GetWeaveCertificate_Response
2 err ErrorCode

Host strict

Defined in fuchsia.weave/weavestack.fidl

Representation of a host either in the form of a hostname or IP address.

Ordinal
VariantTypeDescription
1 hostname string[255]
2 ip_address fuchsia.net/IpAddress

Provisioner_GenerateKeyPair_Result strict

Defined in fuchsia.weave/auth.fidl

Ordinal
VariantTypeDescription
1 response Provisioner_GenerateKeyPair_Response
2 err ErrorCode

Signer_SignHashWithPrivateKey_Result strict

Defined in fuchsia.weave/auth.fidl

Ordinal
VariantTypeDescription
1 response Signer_SignHashWithPrivateKey_Response
2 err ErrorCode

Signer_SignHash_Result strict

Defined in fuchsia.weave/auth.fidl

Ordinal
VariantTypeDescription
1 response Signer_SignHash_Response
2 err ErrorCode

Stack_GetQrCode_Result strict

Defined in fuchsia.weave/weavestack.fidl

Ordinal
VariantTypeDescription
1 response Stack_GetQrCode_Response
2 err ErrorCode

Stack_ResetConfig_Result strict

Defined in fuchsia.weave/weavestack.fidl

Ordinal
VariantTypeDescription
1 response Stack_ResetConfig_Response
2 err ErrorCode

BITS

ResetConfigFlags strict

Type: uint16

Defined in fuchsia.weave/weavestack.fidl

ResetConfig flags.

NameValueDescription
NETWORK_CONFIG 1

Reset network configuration information.

FABRIC_CONFIG 2

Reset fabric configuration information.

SERVICE_CONFIG 4

Reset service configuration information.

OPERATIONAL_CREDENTIALS 8

Reset device operational credentials.

CONSTANTS

NameValueTypeDescription
MAX_HOST_PORTS 256 uint32

The maximum number of HostPorts that Weave can return in a HostPortList, as weave indexes HostPortLists by a uint8.

MAX_PUBLIC_KEY_SIZE 65 uint32

The maximum size for a public key produced when generating a key pair.

MAX_QR_CODE_SIZE 256 uint32

The largest supported size of a QR code encoded in string format may be.

MAX_SIGNATURE_SIZE 139 uint32

The maximum size of a signature supported by Weave.

Currently, Weave only supports ECDSA signatures using the P224 curve, however, to allow this protocol to support future changes to supported Weave signatures the maximum size of the returned signature is set to 139 bytes which is the largest amount of space needed to return an encoded ECDSA P521 signature.

RESET_CONFIG_ALL 255 uint16

Reset all device configuration information.

TYPE ALIASES

NameValueDescription
PrivateKey vector[MAX]

Bytes representing a wrapped private key. Since the size of the wrapping is implementation-defined, the bytes are only bounded by MAX. The bytes should be considered opaque, both in structure and in content, as the value is only meaningful to operations such as Provisioner.GenerateKeyPair.

ServiceEndpointId uint64

An endpoint ID used for identifying which service endpoints are of interest when looking up endpoints in the Weave Service Directory.