Skip to main content

Access Control in Langflow

The authentication and authorization components in Langflow are designed to secure your workflows by validating user credentials, checking permissions, and controlling access to resources. These components ensure that only authorized users can perform specific actions on designated resources.

They handle critical security tasks like verifying tokens, confirming permissions, and managing access control, ensuring smooth and secure operations within your workflows.


JWT Validator

This component verifies JSON Web Tokens (JWT) using JSON Web Key Sets (JWKs) and extracts the user's identifier. It performs a thorough validation process, including signature checks, expiration date verification, and key validation via the specified JWKs endpoint.

To optimize performance, the component automatically fetches and caches the JWKs from the provided URL, handling key rotations efficiently and reducing unnecessary HTTP requests. It supports the RS256 algorithm and retrieves the subject claim (sub) as the user identifier.

Inputs

Name Display Name Description
jwt_token JWT Token The JWT token to validate. Must follow RFC 7519 standards.

Configuration

Name Display Name Description
jwks_url JWKs URL The URL of the JWKs endpoint (e.g., https://your-domain/.well-known/jwks.json).

Outputs

Name Display Name Description
user_id User ID The extracted user ID from the validated token (sub claim).

Permissions Check

This component evaluates whether a user has permission to perform a specific action on a resource. It integrates with Permit.io's Policy Decision Point (PDP) to enforce fine-grained access control based on your defined policies.

It supports context-aware authorization by optionally including tenant information, enabling real-time policy evaluations for multi-tenant environments.

Inputs

Name Display Name Description
user User The user identifier to check permissions for.
action Action The action being performed (e.g., read, write, delete, create).
resource Resource The resource identifier being acted upon.
tenant Tenant Optional tenant identifier for multi-tenant scenarios.

Configuration

Name Display Name Description
pdp_url PDP URL The URL of the Policy Decision Point (found in your Permit.io dashboard).
api_key API Key Your Permit.io API key for authentication.

Outputs

Name Display Name Description
allowed Allowed A boolean value indicating whether the action is permitted (true or false).

Data Protection

This component retrieves and filters the list of resources a user is allowed to access. It can either fetch all permissions for a given resource type or filter a specific set of resource IDs based on the user's permissions.

The component supports bulk permission checks and uses caching to enhance performance when evaluating multiple resources.

Inputs

Name Display Name Description
user_id User ID The user identifier to retrieve permissions for.
action Action The action to filter permissions by (e.g., read, write).
resource_type Resource Type The type of resource to check permissions for (e.g., document, project).
filter_ids Filter IDs Optional list of specific resource IDs to check permissions for.

Configuration

Name Display Name Description
pdp_url PDP URL The URL of the Policy Decision Point.
api_key API Key Your Permit.io API key for authentication.

Outputs

Name Display Name Description
allowed_ids Allowed IDs A list of resource IDs that the user is authorized to access for the specified action.

How These Components Work Together

These components implement the four security perimeters for LLM applications:

  1. Prompt Filtering: Use JWT Validator to authenticate users and filter inputs
  2. RAG Data Protection: Use Data Protection to control access to RAG data
  3. Secure External Access: Use Permissions Check for API and external service access
  4. Response Enforcement: Use Data Protection to filter sensitive information from responses

Each component can be used individually or combined to create comprehensive security flows.

When setting up these components, ensure your Permit.io policies are properly configured, and your JWKs endpoint is accessible. The components are designed to handle errors gracefully, providing clear messages for issues such as invalid tokens, network problems, or denied permissions.

Metadata

Release files for permit-langflow 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for permit-langflow 0.1.0
File Size Uploaded
permit_langflow-0.1.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for permit-langflow 0.1.0
File Interpreter ABI Platform
permit_langflow-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / permit_langflow-0.1.0.tar.gz

Download URL permit_langflow-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2d5c861c636a6f161af432866ebbd7062fdebf949fd180ed094a97b542d21d69
BLAKE2b-256 checksum
How to use checksums
346f4f34249f0fa4c4473ef1bd812c6b0152453257d390e970547a4c2433f0e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 2, 2025.

Transparency log

Release files / permit_langflow-0.1.0-py3-none-any.whl

Download URL permit_langflow-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
796a3c884bfaecfeaa6a40bb703666ef79abe7f8969fc61fe66235afdc8426da
BLAKE2b-256 checksum
How to use checksums
550b41173eb764fefc34b57ed70445ca9fb848bd87b19128fee4944f0baa26d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 2, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page