API Reference

Authentication requirements for BigGeo gRPC.

Overview

This document outlines the authentication requirements for our gRPC based product. The behavior varies based on the deployment method: through Azure Marketplace or locally by hosting the solution on a local machine.

Azure Marketplace Deployment

If the product is deployed through Azure Marketplace, the following rules apply:

  • If the user has enabled password authentication during the creation process, they must provide the chosen password by adding a password field in the metadata of each request.
    • Note: the user providing an incorrect password or no password at all in the initiated requests will result in a 16: UNAUTHENTICATED response from the server.
  • If the user disables authentication, they do not need to set the password field in the request.

Local Deployment

For local deployments, authentication can be controlled via environment variables:

  • Set the BGSEARCH_AUTH_ENABLED environment variable to true (case insensitive) to enable authentication in the container instance.
  • If BGSEARCH_AUTH_ENABLED is set to true, the user must also specify the BGSEARCH_PSWD environment variable to define the password to use.
    • Note: Failure to set the BGSEARCH_PSWD environment variable when authentication is enabled will result in the container failing to start.

Code Examples

// Assuming you have a gRPC stub named `stub`
grpc::ClientContext context;

// If authentication is enabled
std::string password = "user_password_here";
context.AddMetadata("password", password);

// Make the gRPC call using the context
auto response = stub->YourRPCMethod(&context, request);

# Assuming you have a gRPC channel and stub

# If authentication is enabled
password = "user_password_here"
metadata = [('password', password)]

# Make the gRPC call using the context
response = stub.YourRPCMethod(request, metadata=metadata)