golem-add-http-auth-scala

Enables OIDC authentication on Scala 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-scala
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-add-http-auth-scala
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/scala/golem-add-http-auth-scala
Command: npx skills add https://github.com/golemcloud/golem --skill golem-add-http-auth-scala

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Securing HTTP endpoints in Golem Scala agents requires knowing the correct annotation flags and matching deployment configuration. This Skill shows how to require authentication on endpoints and wire up OIDC security schemes in golem.yaml.

Core Features & Use Cases

  • Mount-Level Auth: Set auth = true on @agentDefinition to protect every endpoint of an agent at once.
  • Per-Endpoint Auth: Enable or override authentication on individual @endpoint annotations, including opting specific routes out of mount-level auth.
  • Deployment Configuration: Connect protected agents to an OIDC security scheme in golem.yaml, or use a test session header for local development.
  • Use Case: You have a Scala agent exposing both a public health check and private data endpoints. Use this Skill to require authentication on the private routes while keeping /health open, then configure the OIDC scheme for deployment.

Quick Start

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

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

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

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

Set auth = true on the @agentDefinition annotation to protect all endpoints, or on individual @endpoint annotations for specific routes. Then configure a matching securityScheme in the httpApi deployments section of golem.yaml.

How to make one endpoint public when the agent requires auth?

Set auth = false on that specific @endpoint annotation. Per-endpoint auth settings override the mount-level auth = true defined on @agentDefinition, so routes like /health can stay public.

Does Golem authentication work with OIDC providers?

Yes, Golem supports authentication on HTTP endpoints via OIDC providers. You reference the provider through a securityScheme entry in golem.yaml, and for local development you can use a testSessionHeaderName instead.

Why is my authenticated Golem endpoint not enforcing auth after deployment?

Setting auth = true in code is not enough by itself. You must also configure a securityScheme for the agent under httpApi deployments in golem.yaml, otherwise the authentication requirement is not wired to an actual OIDC provider.

Can I test Golem endpoint authentication locally without an OIDC provider?

Yes, for development you can set testSessionHeaderName (for example X-Test-Auth) on the agent in golem.yaml instead of a securityScheme. This lets you simulate authenticated requests without configuring a production OIDC provider.