April 2025 Summaries
25 posts from WorkOS
Filter
Month:
Year:
Post Summaries
Back to Blog
SAML metadata plays a critical role in ensuring secure and reliable Single Sign-On (SSO) integrations. Misconfigured or outdated metadata can cause authentication failures, leading to downtime and security breaches. Common pitfalls include expired certificates, stale or hardcoded metadata files, mismatched Entity IDs or ACS URLs, unsupported or incompatible bindings, misconfigured signing and encryption flags, and version conflicts. To avoid these issues, it's essential to implement failover metadata sources, use metadata aggregators, monitor and alert on metadata and SAML failures, automate metadata updates, handle metadata version conflicts, and maintain a rollback strategy. By taking a proactive approach to managing SAML metadata, teams can ensure their SSO integrations are resilient by design and minimize the risk of authentication failures.
Apr 30, 2025
2,755 words in the original blog post.
New features and updates in April include SSO role mapping, schema-based policies, on-prem guides, and simplified authentication. WorkOS now supports schema-based policies, allowing developers to define advanced policy rules within their authorization schema. The platform also provides clear documentation for integrating with on-prem customers, including generating unique API keys and managing firewall configurations. Additionally, the AuthKit login initiation process has been simplified, making it easier to support logins that originate outside of an app. WorkOS Guides is a new resource offering expertly tailored content to help developers master authentication, authorization, user provisioning, security, and more.
Apr 30, 2025
353 words in the original blog post.
Mastra is a batteries‑included TypeScript framework for agentic apps that enables developers to build agentic workflows without the need for glue code. In this quickstart, we'll use Mastra to build an agentic app that can fetch data from GitHub in under 5 minutes. The process involves defining agents, tools, and RAG workflows in plain TypeScript, wiring up streaming, retries, evals, and a type-safe REST layer. We'll spin up a new project using the CLI, add our LLM key, create a `githubRepoTool`, define an agent that fetches data from GitHub, register the agent and run the app, test out the agent locally in the playground, and call the agent via API or code. The outcome is a fully functional agentic app with a local playground for testing and a Swagger UI for documenting the API.
Apr 29, 2025
1,008 words in the original blog post.
The Model Context Protocol (MCP) is a new protocol that allows large-language models to hit live APIs, query fresh data, and trigger CI/CD pipelines. This shift changes the game by introducing risk, as every outbound call from an MCP server carries credentials such as API keys, database passwords, OAuth tokens, and more. If these secrets leak, the blast radius extends far beyond the LLM demo. To secure MCP servers, it's essential to treat every secret like a live grenade, handle them sparingly, store them safely, and rotate them often. Key best practices include eliminating hard-coding of secrets, preferring dynamic, short-lived credentials, applying least privilege with Role-Based Access Control (RBAC), enforcing end-to-end encryption, rotating and revoking automatically, and logging, alerting, and repeating. By implementing these strategies, developers can preserve user trust, keep auditors happy, and sleep better knowing their LLM won't accidentally leak sensitive data.
Apr 28, 2025
897 words in the original blog post.
The DBConnection pooling mechanism in Elixir's DBConnection library allows for efficient management of database connections. When a query is sent, the first available connection is found by looking at the ETS queue for a holder reference, and ownership of the holder ETS table is passed to the calling process. The connection is then used to make the query, and once complete, the holder reference is returned to the ConnectionPool process, which updates the ETS table and transfers ownership back to itself. If all connections are in use, queries are added to the ETS queue until a connection becomes available. The pool size determines how many connections are spawned under the DBConnection.ConnectionPool.Pool supervisor. Increasing the pool size can improve performance but also increases resource consumption.
Apr 28, 2025
1,867 words in the original blog post.
In-memory distributed state with delta conflict-free replicated data types (CRDTs) enable efficient management of distributed cache or configuration state on an Elixir cluster. Delta CRDTs are a type of conflict-free replicated data type that have the properties of no single source of truth, eventual consistency, and global convergence. They offer a way to replicate and merge state in a distributed environment without coordination between replicas. Operational transforms and delta state are two types of delta CRDTs used for different use cases. DeltaCrdt is an Elixir library implementing delta CRDTs, while Horde provides a distributed name registration and process supervisor on top of delta CRDTs. The Aviato.Agent module uses a CRDT to keep configuration data synchronized across a cluster of ephemeral cloud instances.
Apr 28, 2025
2,555 words in the original blog post.
oRPC is an API toolkit that combines the familiarity of Remote Procedure Call (RPC) with the industry-standard OpenAPI spec, enabling type-safe APIs from client to server. It addresses common issues such as schema drift and integration bugs by collapsing definition, implementation, and documentation into a single, type-safe contract that travels unchanged throughout the system. This approach ensures end-to-end type-safety, contract-first design, and zero code-generation, making it suitable for micro-frontends, BFFs, edge-first workloads, and teams that care about OpenAPI. oRPC provides a flexible architecture for handling errors, including two approaches to error definitions using `.errors()` and fully typed error definitions using `ORPCError`. It also supports authentication and protected routes with the use of context objects and JWT parsing. By using oRPC, developers can write functions and get fully typed, OpenAPI-compliant endpoints without code-generation or drift, resulting in a single source of truth for their APIs.
Apr 28, 2025
862 words in the original blog post.
When building an app that uses OAuth 2.0, using refresh tokens is essential to balance security and user experience. Refresh tokens are issued alongside access tokens during the initial login flow and typically live longer than access tokens, usually days or weeks. They can be used to obtain a new access token when the original one expires, allowing users to stay signed in without re-authenticating. However, if not handled properly, refresh tokens can become vulnerable to attacks, such as replay attacks. To mitigate this risk, it's crucial to store them securely, rotate them regularly, set expiration and revocation logic, and avoid using long-lived JWTs as refresh tokens. Misunderstanding "silent authentication" in SPAs, not rotating refresh tokens, and storing tokens in insecure methods can lead to security issues. By following best practices and understanding how to manage refresh tokens, developers can build trustworthy and secure auth flows that balance user experience with security.
Apr 23, 2025
1,782 words in the original blog post.
IBM's Agent Communication Protocol (ACP) provides autonomous agents with a common "wire format" for communication. It differs from MCP and A2A in its focus on agent-to-agent messaging, task hand-off, and lifecycle management. ACP is designed to be lightweight and opinionated, offering features such as dynamic discovery, task delegation, stateful sessions, security capabilities, observability, and more. The protocol is intended for use in real-world workflows, including enterprise automation, security teams, data scientists, and creative development teams. ACP can be used with various agents and frameworks, including those from IBM, Anthropic, and Google, and can be integrated into CI pipelines without changing code. The protocol's design allows for a pragmatic on-ramp to the multi-agent future, making it an attractive solution for developers working with heterogeneous agents.
Apr 22, 2025
1,137 words in the original blog post.
SAML signature verification bugs are a common issue due to XML Digital Signatures (XML DSIG) fragility and frequent mishandling, leading to real-world vulnerabilities in widely used libraries. Signature validation is hard to get right because of reference confusion, canonicalization mismatch, signature wrapping attacks, and broken or missing schema validation issues. To validate SAML assertions securely, developers should ensure strict reference validation, resolve canonicalization awareness, schema validation, tie verification to usage, use trusted libraries but check them for vulnerabilities, and stay up-to-date with library updates and security advisories. Despite the rise of OIDC and modern identity protocols, SAML remains deeply embedded in enterprise identity scenarios.
Apr 22, 2025
1,246 words in the original blog post.
The Google Agent-to-Agent (A2A) protocol is a standard for enabling multiple autonomous agents to communicate with each other securely and efficiently. A2A builds upon the Model Context Protocol (MCP), which allows models to be plugged into data sources, providing a standardized way of accessing tools. The A2A protocol enables peer-to-peer meshes as well as classic hub-and-spoke designs, allowing any compliant agent to act as a client or server. It provides features such as secure authentication, long-running task support, and modality-agnostic communication, making it suitable for various use cases including multi-agent systems, enterprise-grade controls, and less brittle orchestration. A2A is designed with the future in mind, including negotiation for video, forms, and dynamic UX, ensuring that investments survive the jump to multimodal agents. The protocol is built upon proven web standards, providing a familiar feel for backend engineers.
Apr 18, 2025
807 words in the original blog post.
Versioning is a crucial aspect of software development that can significantly impact the stability, maintainability, and user experience of an application. In this guide, we'll break down the most common versioning schemes, explore their strengths and weaknesses, and provide guidance on how to choose the right one for your project. We'll also cover best practices for managing versioning in various scenarios, including monorepos, SaaS products, distributed systems, and serverless architectures.
Apr 17, 2025
4,887 words in the original blog post.
The Model Context Protocol (MCP), Agent Communication Protocol (ACP), and Agent2Agent Protocol (A2A) are three protocols designed to power the interactions of agents in various AI applications. MCP is an open protocol focused on standardizing how LLM-based applications connect to data sources and tools, providing a standardized way to provide context and functionality to large language models. ACP is IBM Research's agent-to-agent communication standard, powering multi-agent workflows within BeeAI, an experimental platform that makes it easy to run and orchestrate open-source AI agents. A2A is Google's open protocol designed specifically for agent interoperability across frameworks, allowing agents from different frameworks to discover each other's capabilities, exchange messages, and collaborate on tasks. Each protocol has its primary goal, core elements, and use cases, with MCP focusing on standardizing data access, ACP on orchestrating local multi-agent environments, and A2A on bridging cross-vendor agent ecosystems. Understanding the strengths of each protocol can help developers pick the right tool for their agent architecture.
Apr 16, 2025
1,151 words in the original blog post.
WorkOS and Cloudflare have partnered to provide a plug-and-play authentication solution for Agentic AI Builders, enabling secure interactions between AI agents and external services through the Model Context Protocol (MCP). This integration offers granular, role-based access control, enterprise SSO and OAuth flows, and secure delegation without requiring developers to reinvent their auth stack. With MCP, AI agents can interact securely with third-party APIs and tools, enabling use cases such as automation, scheduling, and commerce workflows. WorkOS customers can now authorize AI agents using their existing infrastructure, shifting from "Do X, Y, Z" to "Here's what I want—figure it out". The solution provides a zero-infra deployment, built-in state management, real-time agent interactions, and reuses the auth logic already trusted by developers.
Apr 16, 2025
636 words in the original blog post.
ArkType is a high-performance runtime type validation library built to erase the boundary between static type safety and runtime enforcement, bringing TypeScript types to life by validating inputs with extreme precision and speed. It treats type validation as a runtime mirror of TypeScript's static type system, eliminating the need for mental mapping and providing a design philosophy rooted in isomorphism. ArkType creates a runtime validator that matches your TypeScript definitions using its `type(...)` syntax, offering performance advantages up to 100x faster than Zod and 2,000x faster than Yup, with features such as type syntax familiarity, deep introspectability, rich expression support, and customizable error handling. It shines for critical-path validation or validation in performance-sensitive environments and is a strong contender for developers who care about type safety, performance, and expressive power.
Apr 14, 2025
580 words in the original blog post.
To implement and validate JWTs securely in Python, you need to understand how JWTs work and use the PyJWT library. A JWT consists of three parts: the header, payload, and signature. The header specifies the algorithm used to sign the token, the payload contains the claims or data that the token is encoding, and the signature ensures the token's integrity and confirms it was issued by a trusted source. To work with JWTs in Python, you'll need to generate cryptographic keys, create a JWKS endpoint, handle key rotation and management, secure your private keys, and use asymmetric signing (RS256 or ES256). Always verify the signature when decoding JWTs, validate critical claims, use a JWKS endpoint if available, enforce the Bearer token format, do not store sensitive information in the token, and use HTTPS everywhere. Additionally, consider using WorkOS for authentication, SSO, and user identity, which provides a modern API for enterprise-ready authentication features and can take care of the heavy lifting.
Apr 14, 2025
2,459 words in the original blog post.
Iframes can pose significant security risks, including Cross-Site Scripting (XSS), clickjacking, Cross-Frame Scripting (CFS) attacks, session hijacking, phishing and social engineering attacks, and data privacy risks. Iframes create a parent-child relationship between the hosting page and the content inside the iframe, which can be exploited by malicious actors. Embedding login forms or sensitive data entry forms in iframes increases the risk of phishing attacks, compromising user security. To mitigate these risks, developers should use security best practices such as setting proper HTTP headers, validating sources, using HTTPS, enforcing same-origin policy, implementing Content Security Policy (CSP), and regularly auditing embedded content.
Apr 10, 2025
2,086 words in the original blog post.
Prisma is a popular Object-Relational Mapper (ORM) in the TypeScript/JavaScript ecosystem, offering robust type-safety guarantees and seamless integration with frameworks like Next.js. It provides powerful auto-generated type definitions and a consistent API for database operations, making it an attractive solution for modern web development teams seeking streamlined development and lower maintenance overhead. Prisma supports various relational databases and offers features such as zero-cost type-safety, intuitive data modeling, high performance, and reduced boilerplate code, while also providing a learning curve and certain edge cases that may require direct SQL usage. With its developer-focused ergonomics and seamless integration with Next.js, Prisma is well worth considering for projects requiring robust ORM capabilities.
Apr 10, 2025
882 words in the original blog post.
Smithery AI provides a centralized hub for Model Context Protocol (MCP) servers, allowing large language model clients to discover, install, and manage external servers to access new tools or APIs. MCP servers can be deployed in two modes: Hosted/Remote, where they run on Smithery's infrastructure accessed via the web, and Local, which requires installing the server locally via the Smithery CLI. For local installations, users supply tokens through a command and configure the server to read from environment variables or a configuration file. Security is emphasized, with tokens stored locally for hosted MCPs, while untrusted fields should be avoided. The platform's data policy ensures minimal storage of usage data on Smithery's side, with tokens being ephemeral in both local and hosted scenarios.
Apr 08, 2025
795 words in the original blog post.
HMAC and RSA are two commonly used algorithms for signing JWTs (JSON Web Tokens), while ECDSA is another contender that offers stronger security with smaller key sizes. HMAC provides a way to verify the integrity and authenticity of a message by combining a hash function with a secret key, making it suitable for internal apps or systems where multiple clients must sign and verify JWTs. RSA is widely used in scenarios like OAuth 2.0, OpenID Connect, and other authentication protocols where asymmetric key cryptography is needed for signing and verifying JWTs. However, RSA's signing speed disadvantage becomes noticeable if you need to sign a lot of tokens. ECDSA is typically more efficient for signing and provides strong security with smaller key sizes, making it a better choice for high-throughput systems or when performance is crucial. EdDSA is generally considered faster, more secure, and easier to implement than ECDSA, especially for mobile devices or environments where performance and security are both important. Ultimately, the choice of algorithm depends on factors such as the use case, security requirements, and performance needs.
Apr 08, 2025
4,616 words in the original blog post.
Cloudflare Workers offers a solution to deploy globally-distributed, serverless infrastructure that supports next-generation AI workloads. This allows developers to overcome challenges such as variable and unpredictable workloads, global latency requirements, and resource coordination complexity associated with traditional GPU-accelerated deployments. Edge computing platforms like Cloudflare Workers distribute computation across a global network of data centers, reducing latency through geographic distribution, providing serverless GPU access, integrating with memory and storage services, and enabling fine-grained resource scaling. By implementing AI at the edge using Cloudflare Workers, developers can deploy globally-distributed, serverless infrastructure that supports next-generation AI workloads, improving global performance characteristics, simplifying operational overhead, and achieving more efficient resource utilization.
Apr 07, 2025
1,362 words in the original blog post.
Risk-Based Authentication (RBA) is a security measure that evaluates the risk associated with a login attempt or transaction and adjusts the level of authentication accordingly. It considers various factors, including user behavior patterns, device information, location, time of day, and transaction context. RBA uses machine learning to improve its accuracy by learning from past data, spotting patterns, and predicting potential threats. The system adapts over time based on user behavior, trends, and emerging threats. To ensure the effectiveness of RBA, it's essential to use historical data to understand normal user behavior, evaluate a combination of factors, log authentication attempts, monitor logs for unusual behavior, review and update policies regularly, leverage external threat intelligence, and provide users with multiple MFA options. However, there are still challenges to address, including the balance between security and user convenience, algorithmic bias, and staying ahead of cybercriminals.
Apr 04, 2025
3,044 words in the original blog post.
This guide demonstrates how to set up a multi-agent workflow using CrewAI to generate, review, and validate a Python game. It introduces common CrewAI patterns—crews and Flows—to help structure multi-agent systems with both autonomous collaboration and precise control. The example uses the game-building example as a hands-on way to learn how these patterns are applied in practice. The guide covers prerequisites, environment setup, project structure, defining agents, outlining tasks, providing game context, implementing the GameBuilderCrew class, orchestrating a Crew with Python, understanding the Crew pattern, and running the game builder crew.
Apr 03, 2025
1,609 words in the original blog post.
Top Ruby gems for authentication & authorization are: Devise, OmniAuth, Clearance, Authlogic, Rodauth, Sorcery, Pundit, CanCanCan, Action Policy, and Rolify. Each gem has its own strengths and weaknesses, and the choice of which one to use depends on the specific needs of your application. Some gems, like Devise, offer comprehensive authentication solutions with a wide range of built-in modules, while others, like OmniAuth, provide flexible and customizable authentication systems that can be integrated with third-party services. Clearance and Authlogic are good choices for simple authentication systems, while Rodauth offers a high-performance solution with advanced features like multi-factor authentication. Sorcery is a lightweight option despite being unmaintained, but it's best suited for small-scale applications. Pundit and CanCanCan provide robust solutions for policy-based authorization, while Rolify excels at managing complex role structures. Many applications use Devise for authentication and pair it with either Pundit or CanCanCan for authorization. Additionally, gems like JWT, Secure Headers, Brakeman, Rack::Attack, Figaro, and Bullet can help secure your application by encoding JSON Web Tokens, setting security headers, detecting vulnerabilities, rate limiting abusive requests, managing configuration settings, and optimizing database queries, respectively.
Apr 02, 2025
4,267 words in the original blog post.
To add Login with LinkedIn functionality to an app using Python and WorkOS, it is necessary to install the WorkOS Python SDK, set up secrets such as API keys and client IDs, configure a LinkedIn connection by enabling OAuth, providing client credentials, configuring a redirect URI, setting up the frontend with React, and finally, setting up the backend with Flask. After completing these steps, users can log in with their existing LinkedIn profiles, allowing for safe and secure authentication. The process involves generating an AuthKit authorization URL server-side, extracting the authorization code, exchanging it for an access token and user profile information, and handling the user session securely.
Apr 01, 2025
1,277 words in the original blog post.