Lattice Schema Registry

Publish and share custom Protobuf schemas for Lattice integrations

The Lattice Schema Registry (LSR) is a centralized registry that tracks schema definitions for Lattice integrations. Publish your schemas to use them in your Lattice integration, such as custom task definitions that express your platform’s capabilities.

The LSR accepts schemas written in the Protobuf IDL. Protobuf is supported by a variety of language-specific plugins, so your schemas can be used to create both REST and gRPC integrations using most major programming languages.

The Lattice Schema Registry dashboard

In the following sections, you learn how to set up your account in the Lattice Schema Registry, create a repository, and publish your custom schemas.

Before you begin

  • If you don’t have a Lattice Developer login, request to join the Lattice SDK Developer program.
  • Your user account in the LSR is created the first time you log in.
  • Review how to define a custom task to understand best practices for authoring Protobuf schemas before publishing them to the registry.

Set up your registry

Open the Schema Registry dashboard, then do the following:

1

Log in using your Lattice Developer SSO.

User and organization provisioning
  • Your LSR account is created when you log in for the first time and is automatically provisioned as a member of the organization associated with your Lattice Developer SSO.
  • Organizations in the LSR are created when the first associated Lattice Developer logs in. The first member of a new organization becomes its default admin.
2

Select your organization from the list of organizations displayed on the left.

3

If you are an admin, you can modify user roles from the Members panel.

4

From the organization dashboard, choose Create Repository:

Create Repository dialog with fields for name and visibility

In the modal, enter your-repository for the repository name, and select Private for visibility. Then click Create.

Privacy

Treat your schema definitions as a public interface for your integration.

  • The Lattice Schema Registry is not rated for ITAR specifications, regardless of repository visibility. Do not use the registry to store any classified or export-controlled information.
  • Public repositories are visible to all users of the Lattice Schema Registry.
  • Private repositories are only visible to organization members. Repositories are Private by default.
  • All repositories, regardless of visibility, are readable for a subset of Anduril engineers. Do not include proprietary information that you would not share with an Anduril engineer.

Publish to the registry

After creating a repository, you can publish Protobuf schemas to the LSR. First, define your package and associated schemas in .proto files. Publishing your schemas to the LSR will automatically register these definitions for use in Sandboxes test environments. If you’re integrating with a production deployment, confirm this behavior with your Anduril representative.

To publish schemas to your repository, you’ll use the Buf CLI:

1

Install the Buf CLI

Follow the Buf CLI installation guide for your operating system.

2

Authenticate with the LSR

When you authenticate with the LSR, you create a token that is scoped to your user.

From your account dropdown, navigate to Settings. Create a new token and save it. Export the token in your CLI:

export BUF_TOKEN=<your_token>@schema-registry.developer.anduril.com

Any time you use Buf CLI with the domain name schema-registry.developer.anduril.com, it will use the $BUF_TOKEN to authenticate. To confirm your token works, run:

buf registry whoami schema-registry.developer.anduril.com

Read more about ways to authenticate the Buf CLI.

Once you’ve authenticated with the LSR and are satisfied with your schema definitions, publish them to the LSR.

Breaking Change Protection

Changes to existing schemas must release a new version - breaking changes to modules are not allowed, including for alpha, beta, and test modules. This ensures that message types are backwards-compatible and that messages are valid even if the definitions have not been uniformly updated. If you must release a breaking change, create a new version (i.e. v1alpha -> v2alpha).

1

Create a buf.yaml configuration file

The buf.yaml file defines how your modules are published. Create a buf.yaml file in the root of your protobuf directory:

1version: v2 // Buf config file version
2modules:
3 - path: .
4 name: schema-registry.developer.anduril.com/<your-org>/<your-repository>

This file defines where and how your schemas are pushed to the registry. View the full buf.yaml config spec for more options.

2

Push your definitions to the registry

Push your schema definitions to the Schema Registry:

$buf push

This command compiles your protobuf definitions and uploads them to your repository in the Schema Registry.

You can now use this custom definition with the Lattice SDK to send your task data across your Lattice environments.

Consume generated artifacts

The Schema Registry automatically generates SDKs and bindings that make it easy to produce or consume your schemas in various languages and protocols. Click on the SDKs tab

Development Loop

After you push your schemas to the LSR, you can use them in workflows that require a Type URL, such as registering a custom task in an asset’s task catalog. Test your workflow against Sandboxes test environments.

Schema Definition Propagation

Currently, schema definitions and updates take 1-2 hours before they are updated in Lattice Sandboxes. You must create a new environment at least 1 hour after pushing your changes to LSR for the schema to be registered. We are actively working on closing the lead time in this loop.

Use tokens for automated workflows

For automated workflows, such as in a CI/CD pipeline, use API tokens to authenticate with the LSR:

1

From the LSR dashboard, select your username in the top-right corner to open the dropdown list. Choose Settings to open the setting dashboard.

2

Use the Create a token pane to create an API token.

The token is displayed only once and can’t be retrieved again. If you lose the token or it’s compromised, delete it and create a new one.

3

Set the BUF_TOKEN environment variable in your CI/CD environment:

$export BUF_TOKEN=<your-token-here>

The Buf CLI will automatically use this token for authentication. For more information, see Authenticating in CI in the Buf Developer Documentation.

What’s next?