golem-add-http-auth-rust

Enables OIDC authentication on Rust HTTP endpoints in Golem agents.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-add-http-auth-rust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-add-http-auth-rust
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/rust/golem-add-http-auth-rust
Command: npx skills add https://github.com/golemcloud/golem --skill golem-add-http-auth-rust

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Securing HTTP endpoints in Golem agents requires coordinating Rust attribute macros with deployment configuration, and getting either side wrong leaves endpoints unintentionally public or locked. This Skill guides you through enabling authentication correctly at both the code and deployment levels.

Core Features & Use Cases

  • Mount-Level Authentication: Set auth = true on #[agent_definition] to require authentication for every endpoint on an agent.
  • Per-Endpoint Control: Enable or override authentication on individual #[endpoint] attributes, including opting specific routes out of mount-level auth.
  • Deployment Configuration: Connect secured agents to OIDC security schemes or test session headers in golem.yaml.
  • Use Case: You have a Rust Golem agent exposing both a public health check and private data endpoints. Use this Skill to require auth on the private routes while keeping /health open, then wire up the OIDC security scheme for deployment.

Quick Start

Ask the AI to add authentication to the private endpoints of your Rust Golem agent while leaving the health check endpoint public.

Frequently Asked Questions about golem-add-http-auth-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication to Golem HTTP endpoints in Rust?

Set auth = true on the #[agent_definition] attribute to protect all endpoints, or on individual #[endpoint] attributes for selective protection. Then configure a matching security scheme in golem.yaml under httpApi deployments.

How do I make one endpoint public when the agent requires auth?

Set auth = false on the specific #[endpoint] attribute to override the mount-level setting. For example, a health check endpoint can stay public while all other endpoints inherit auth = true from the agent definition.

Does Golem endpoint authentication work without an OIDC provider?

Yes, for development you can use testSessionHeaderName in golem.yaml instead of a full OIDC security scheme. Production deployments should reference a real OIDC security scheme such as my-oidc.

Why is my Golem endpoint still public after setting auth = true?

Setting auth = true in code only marks the endpoint as requiring authentication; you must also configure a security scheme in golem.yaml for the deployment. Without the deployment configuration, authentication is not enforced.

What is the difference between mount-level and endpoint-level auth in Golem?

Mount-level auth on #[agent_definition] applies to every endpoint of the agent, while endpoint-level auth on #[endpoint] applies to a single route. Per-endpoint settings override the mount-level value in either direction.