Implements a permissive authorization evaluator allowing all AI agent tools. Reuse as a baseline for custom permission checking strategies.
// Source: https://github.com/kestra-io/kestra | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package io.kestra.webserver.services.ai.agent.tool;
import io.kestra.core.ai.agent.models.AgentPrincipal;
import jakarta.inject.Singleton;
/**
* Default evaluator: no authorization model exists (a single account owns everything), so every tool
* is allowed. A replacement can override this to check the permission declared by each tool against
* the principal.
*/
@Singleton
public class DefaultAgentToolPermissionEvaluator implements AgentToolPermissionEvaluator {
@Override
public boolean isAllowed(final ToolCatalog.ToolEntry entry, final String tenant, final AgentPrincipal p
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key