Skip to main content
The Identity resource defines an authentication identity that can access Edge Server HTTP APIs. Each identity has a credential (such as an API key) and a set of permissions that control what operations they can perform.
For a complete guide on generating API keys and configuring authentication, see the Authentication guide.

Basic Configuration

Identities are defined under the top-level auth: configuration:

Required Fields

Optional Fields

Credentials

Credentials define how an identity authenticates with Edge Server. All credentials must be generated using the Edge Server CLI command.

API Key Credential

Currently, API key is the only supported credential type:
Credentials must be unique across all identities. Duplicating credentials across multiple identities is not allowed and will cause a configuration error.

Generating API Keys

Use the Edge Server CLI to generate secure API key credentials:
This will output:
  • Generated Private Key: The secret clients use to authenticate (give to clients)
  • Secure Public Hash: The hash to store in your config (shown above)

Permissions

The permissions field is an array of permission set names defined in the same auth: configuration. This separation allows you to reuse permission sets across multiple identities.
See the PermissionSet documentation for details on configuring permissions.

Complete Examples

Complete Configuration with Authentication

Multiple Identities with Shared Permissions

Identity Without Custom ID

When id is not specified, the YAML key is used:

Using Identities with HTTP Servers

When identities are defined in the auth: configuration, the HTTP server automatically uses them for authentication:
To disable authentication entirely (not recommended for production):

Security Best Practices

  1. Generate credentials securely: Always use the Edge Server CLI to generate credentials. Never create API keys manually
  2. Unique credentials: Each identity must have a unique credential. Never reuse credentials across identities
  3. Meaningful IDs: Use descriptive id values to make audit logs easier to understand
  4. Principle of least privilege: Grant identities only the permissions they need
  5. Rotate credentials: Regularly rotate API keys by generating new credentials and updating your configuration
  6. Secure storage: Store credentials securely (e.g., in environment variables or secrets management systems) rather than committing them to version control

Important Notes

  1. Credential Uniqueness: The same credential cannot be used by multiple identities. Each identity must have its own unique credential
  2. Audit Logging: The id field (or YAML key if id is not set) appears in audit logs to identify who performed actions
  3. Permission Set References: The permissions field must reference permission sets defined in the permission_sets section
  4. Authentication Flow: When an HTTP request arrives with an API key, Edge Server validates it against all configured identities and checks the associated permissions