Posts Tagged ‘SpringIO2026’
[SpringIO2026] Bootiful gRPC
Lecturer
Dr. Dave Syer is a founder of Spring Boot, Spring Cloud and Spring Batch, and the lead of the Spring gRPC project. He has long contributed to Spring Security OAuth, Spring Integration and many other portfolio projects. Josh Long is the Spring Developer Advocate at Broadcom (VMware Tanzu), a prolific speaker, author and live-coder known for demonstrating the full breadth of the Spring ecosystem. Together they present the new first-class Spring integration for gRPC.
Abstract
gRPC offers schema-driven, polyglot, high-performance remote procedure calls. After community implementations slowed, Google encouraged the Spring team to create an official project. Spring gRPC, now at version 1.x and moving its Boot auto-configuration into Spring Boot itself, supplies starters, code-generation plugins, Netty and servlet transports, observability, health checks and seamless OAuth 2 resource-server and client support. This article walks through the live demonstration given by Dave Syer and Josh Long, highlighting the developer experience from protocol-buffer definition to a secured, observable service and client pair.
Why gRPC and the Spring Integration
Remote procedure call has a chequered history, yet gRPC addresses many historical weaknesses. An Interface Definition Language (Protocol Buffers) forces an explicit contract; the same .proto file generates idiomatic stubs in dozens of languages, satisfying polyglot organisations; the binary encoding and a purpose-built Netty server deliver competitive throughput. Existing community Spring integrations had lost momentum, prompting Google to ask the Spring team to take ownership. The resulting Spring gRPC project began as an experimental zero-point release train aligned with Spring Boot 3 and reached 1.0 with Spring Boot 4, gaining the usual long-term support commitments. Auto-configuration is scheduled to move into Spring Boot proper in the 4.1 timeframe, further reducing boilerplate.
From Protocol Buffer to Running Service
A new project is created on start.spring.io by selecting the gRPC server starter (and optionally security and observability). The generated build already contains the Protocol Buffer Maven or Gradle plugin and the necessary dependency management. A simple greetings.proto declares a service with a unary RPC:
syntax = "proto3";
option java_package = "com.example.grpc";
service Greetings {
rpc Hello (HelloRequest) returns (HelloResponse);
}
message HelloRequest { string name = 1; }
message HelloResponse { string message = 1; }
After code generation the developer extends the generated base class, annotates it as a Spring @Service (or lets component scanning discover it) and implements the method. The Netty-based gRPC server starts automatically on port 9090; if a servlet container is also present the same service can be exposed through the Google-supplied servlet bridge, sharing the HTTP port with ordinary Spring MVC endpoints.
A client project follows the same path. The generated stub is injected as a Spring bean; an HTTP controller can call it exactly as it would call any other collaborator. Because the contract is shared, the two sides remain type-safe even when they live in separate processes.
Observability, Health and Security
Selecting the OpenTelemetry starter on the Initializr causes metrics and traces to be exported automatically; Grafana dashboards immediately show gRPC-specific meters. The standard gRPC health-checking protocol is wired to Spring Boot Actuator’s health indicators, so a Kubernetes gRPC probe reports the same status that an HTTP actuator endpoint would.
Security integration re-uses Spring Security’s OAuth 2 resource-server and client support. On the server side a JWT or opaque-token resource-server configuration protects every RPC. On the client side an interceptor extracts the current OAuth2AuthenticationToken, obtains an access token via the OAuth2AuthorizedClientManager, and attaches it to the outgoing gRPC metadata. The demonstration completes the round-trip: an unauthenticated browser request is redirected to the authorization server, the resulting token is presented to the gRPC service, and the service replies with a greeting that includes the authenticated principal’s name.
The same patterns work with reactive gRPC stubs and with Kotlin, giving teams a uniform programming model across transport and language choices.
Conclusion and Roadmap
Spring gRPC removes the historical friction of adopting gRPC inside a Spring application: starters, automatic code generation, sensible server and client defaults, first-class observability and security. Future work includes deeper controller-style programming models for developers who prefer POJO annotations over generated stubs, and the final migration of auto-configuration into Spring Boot itself. The project already demonstrates that a binary, schema-first RPC technology can feel as natural in the Spring ecosystem as REST or messaging.
Links:
[SpringIO2026] New in Spring Security 7: MFA, OAuth2 and more
Lecturer
Daniel Garnier-Moiroux is a software engineer on the Spring team at Broadcom, focusing on Spring Security, identity, and SSO concerns. He contributes actively to Spring Security and related projects, including work on one-time tokens, passkeys, multi-factor authentication, and Model Context Protocol security. He is also writing the Manning book Testing Spring Boot Applications (early access). Previously affiliated with VMware Tanzu, he has spoken widely on Spring Security architecture, passwordless authentication, and practical security patterns. He maintains an active presence through his personal site and open-source contributions under the handle Kehrlann.
Abstract
Spring Security 7 delivers a long-requested multi-factor authentication capability together with modular configuration improvements, OAuth 2 enhancements on both the authorization-server and client sides, stricter defaults such as mandatory PKCE, dynamic client registration, and experimental support for securing Model Context Protocol endpoints. This article examines the design of the new MFA APIs built around factor granted authorities and authorization-manager factories, shows how modular customizers avoid overwriting Spring Boot defaults, details the OAuth 2 changes, and outlines migration considerations from version 6.
Multi-Factor Authentication APIs
Multi-factor authentication had been requested since issue 2603 was opened in 2013. Spring Security 7 finally ships first-class support. Authentication factors are modelled as special GrantedAuthority instances of type FactorGrantedAuthority. Each successful login method (password, one-time token, passkey, and so on) records both the factor type and the timestamp at which it was obtained.
The annotation @EnableMultiFactorAuthentication installs the necessary infrastructure and accepts a list of required factors. When the list is supplied at the global level, every protected endpoint demands those factors. For finer control the same requirement can be expressed per endpoint by obtaining an AuthorizationManager from a multi-factor factory:
AuthorizationManagerFactory mfa =
AuthorizationManagerFactories.multiFactor()
.requireFactors(
FactorGrantedAuthority.PASSWORD,
FactorGrantedAuthority.OTT)
.build();
http.authorizeHttpRequests(authz ->
authz.requestMatchers("/admin/**")
.access(mfa.hasRole("ADMIN")));
Because the underlying API is the familiar access(AuthorizationManager), arbitrary combinations become possible. The utility AuthorizationManagers.allOf and anyOf allow mixing recent-password checks with role checks, or applying MFA only to administrators while ordinary users need only a password. Time-based constraints are expressed with AllRequiredFactorsAuthorizationManager and a duration; an authentication older than the chosen window is rejected and the user is forced to re-authenticate with the missing factor.
The design deliberately re-uses the existing authorization infrastructure rather than inventing a parallel authentication pipeline. Consequently any custom AuthorizationManager already written for complex access rules can be composed with factor requirements without further framework changes.
Modular Configuration and Safer Defaults
A common pain point in earlier versions was that declaring a single SecurityFilterChain bean completely replaced Spring Boot’s auto-configured security. Spring Security 7 introduces Customizer<HttpSecurity> (and the corresponding customizers for individual configurers such as OAuth2AuthorizationServerConfigurer or CsrfConfigurer). Applications that need only a small adjustment—making one path public, adding a claim to the OpenID Provider Configuration endpoint, or tweaking CSRF—now supply a focused customizer bean. Boot defaults remain intact and the change is applied on top of them.
Several legacy constructs have been removed or relocated. The classic “and()” DSL that closed configuration blocks is gone; lambda style is mandatory. The OAuth 2 password grant has been dropped from the client because the OAuth 2 security best-current-practice document has long discouraged it. Kerberos support and the Spring Authorization Server project itself have been aligned to the same version numbering as the core Spring Security modules, simplifying release coordination.
OAuth 2 Enhancements on Server and Client
On the authorization-server side PKCE is now required by default. Clients that cannot yet produce a code challenge can disable the requirement, but the recommended posture is to keep it enabled even for confidential clients. Dynamic client registration, driven by the need to support Model Context Protocol agents that self-register, has been added. An admin client holding the client.create scope (or, for the more open MCP use-case, an unauthenticated registration endpoint) can POST a registration request and receive a generated client identifier and secret. Tokens used for registration are single-use, limiting abuse.
On the client side Spring Framework 7’s HTTP service clients receive first-class OAuth 2 support. A single bean of type OAuth2RestClientHttpServiceGroupConfigurer wires an OAuth2AuthorizedClientManager and a client-registration identifier into every declarative HTTP interface. The resulting code is free of manual RestClient interceptors yet still obtains and refreshes tokens automatically.
MCP Security and Migration Guidance
Because the Model Context Protocol specification continues to evolve rapidly, MCP security lives in a dedicated Spring AI community project rather than in core Spring Security. The same team members maintain both, and the intention is to graduate the work once the protocol stabilises. Starters on start.spring.io already expose experimental MCP server and client security options that rely on the OAuth 2 features described above.
Migration from Spring Security 6 is documented in a dedicated guide. Most applications that already use the lambda DSL and modern authorization managers require only dependency updates and the removal of the password-grant client code. Applications still relying on the old access-decision voters must move to the authorization-manager model; the deprecated classes remain available in a separate module for a transitional period.
Taken together, the release strengthens the security baseline while giving developers precise, composable tools for multi-factor scenarios and modern authorization flows.
Links:
[SpringIO2026] Hybrid Modernization: Combining OpenRewrite’s Precision with LLM Intelligence for Spring
Lecturer
Raquel Pau is a technical product manager at Broadcom (formerly VMware Tanzu). She brings extensive experience in Java developer tools, continuous-integration and continuous-delivery platforms, and internal developer platforms. Previously she worked as an engineering manager at Moderne, the company behind OpenRewrite, and held product-management roles at CloudBees focused on developer productivity. She has spoken at multiple Spring I/O editions as well as Devoxx, JavaConf and JavaZone. Her background combines deep technical knowledge of code-transformation tooling with product thinking about how large organizations can keep their application portfolios modern and consistent.
Abstract
Code modernization is not a single problem. Upgrading a Spring Boot application within the same major version, migrating from JAX-RS to Spring MVC, and rewriting a COBOL batch job into Spring Batch demand fundamentally different strategies. This article explores the taxonomy of modernization tasks proposed by Raquel Pau and the hybrid methodology that pairs OpenRewrite’s deterministic, type-aware recipes with the semantic reasoning power of large language models. Concrete demonstrations illustrate how upgrade plans are calculated from Maven metadata, how skills orchestrate recipe execution followed by LLM-driven semantic fixes, and how a structured DSL extracted from legacy code guides a full rewrite while preserving contracts and enabling incremental delivery.
Deterministic versus Non-Deterministic Transformations
Modernization tools fall into two broad categories. Deterministic tools always produce the identical output for a given input. Renaming a method, updating a package import, or replacing a deprecated Spring API are deterministic operations. OpenRewrite belongs to this category: it operates on a lossless semantic tree that retains type attribution obtained from the compiler, applies visitor-based recipes, and preserves the original formatting of the source. Because the transformation is deterministic, recipes can be unit-tested with high confidence and executed at scale across hundreds of repositories without surprise.
Non-deterministic problems admit many correct answers. Generating documentation, extracting the business intent of a filter, or inventing an idiomatic Spring Security configuration from a set of JAX-RS name-binding annotations are examples. Large language models excel here because they reason over patterns and can synthesize higher-level constructs that do not exist in the original code. The cost, however, is variability, the need for evaluation harnesses, and a tendency to hallucinate when internal libraries or proprietary APIs are outside the model’s training distribution.
OpenRewrite’s limitations are the mirror image of its strengths. It cannot perform runtime analysis; dependency injection and reflection mean that many object relationships become visible only after the application starts. It cannot invent new semantic abstractions; a mechanical translation of JAX-RS filters into Spring filters often leaves residual compilation errors or suboptimal configurations that require human or LLM insight. Cross-language migration is outside its design scope.
Coding agents partially compensate for these gaps by using pattern-based reasoning and by iterating until the project compiles. Yet they lack default type attribution, suffer from context-window constraints, and generate large volumes of tokens before reaching a stable state. The rational strategy is therefore hybrid: apply deterministic recipes first to shrink the problem, then invoke the LLM only for the residual semantic work.
Three Levels of Modernization
Pau organizes modernization into three progressively more demanding levels.
Upgrades remain inside the same framework family. A Spring Boot 3.3 application is moved to Spring Boot 4, simultaneously updating transitive dependencies such as Jackson and JUnit. Because Spring’s release train is not strictly linear and because organizations maintain internal frameworks with their own release cadences, a simple “latest version” recipe is insufficient. An upgrade-plan engine inspects Maven metadata, calculates a sequence of compatible intermediate steps, and emits a series of small, reviewable pull requests. Each step leaves the application in a buildable state. Tanzu’s Application Advisor exposes this capability via the cf repo upgrade plan and cf repo apply upgrade plan commands, demonstrating that continuous, low-risk upgrades can be embedded in CI pipelines.
Migrations change the underlying framework while preserving language and runtime. The canonical example is Jakarta JAX-RS to Spring Boot. Name-binding annotations that attach filters to resources have no direct counterpart; authentication filters must become Spring Security configurations; repositories must acquire @Repository annotations. The recommended skill therefore first executes the OpenRewrite recipes that perform the mechanical rewrite and any accompanying Spring Boot upgrade, then hands control to the coding agent to resolve remaining compilation errors and to map name-binding semantics onto Spring constructs. The result is both more complete and far less expensive in tokens than asking an unconstrained LLM to rewrite the entire application.
Full rewrites discard the original implementation while preserving contracts. A COBOL batch program that sorts records by date and amount must become a Spring Batch job that reads the same input format, produces identical output, and respects the same database schema if one is involved. Because legacy systems rarely possess comprehensive tests, the process begins by extracting a catalog of user stories, then a structured domain-specific language description of inputs, outputs, and processing steps. Only after the human reviewer validates the generated tests and the semantic model does the agent emit Spring code, typically seeded by a skeleton obtained from start.spring.io. Incremental delivery is essential: large monolithic rewrites cannot be reviewed or risk-managed in a single step.
Orchestrating OpenRewrite and LLM Agents
Three integration mechanisms allow a coding agent to invoke OpenRewrite without saturating its context window. Local MCP servers expose the rewrite CLI so that only the command and its concise output enter the conversation. Skills package the same CLI invocation and are loaded only when the agent decides the skill is relevant. Prompts can be registered with a remote MCP server, yet they must be fully present in every conversation and therefore scale poorly for complex migrations.
The hybrid skill for a JAX-RS migration therefore looks roughly as follows: calculate the upgrade plan that includes the JAX-RS recipes, execute the recipes, collect residual compilation diagnostics, and finally apply semantic transformations that replace name-binding filters with Spring Security and Spring MVC constructs. Because the deterministic phase has already performed the bulk of the mechanical work, the LLM operates on a far smaller residual problem and produces higher-quality results.
For full rewrites the skill is organized into three explicit phases. Phase one extracts a user-story catalog and stores it under version control so that subsequent runs reuse the analysis. Phase two materializes a structured DSL for a chosen story, including acceptance criteria, data models, and external contracts. Phase three generates the Spring implementation and correlating tests. Human validation remains mandatory; the agent cannot be trusted to invent missing requirements or to decide whether an original implementation was correct.
Practical Demonstrations and Organizational Implications
In the upgrade demonstration a Spring Petclinic application on Boot 3.3 is analyzed; the engine proposes coordinated upgrades of Spring Boot, Jackson and JUnit; successive apply steps produce small, reviewable diffs that leave the project green after each commit. In the migration demonstration a pure JAX-RS Petclinic is transformed: OpenRewrite rewrites the bulk of the code, the agent resolves compilation issues caused by signature changes, and name-binding annotations disappear in favor of proper Spring Security configuration. In the rewrite demonstration a simple COBOL sorter is analyzed, a single user story and its DSL are generated, a Spring Batch project is scaffolded, and the resulting executable produces byte-for-byte identical output.
The organizational payoff is standardization. When every application can be moved to a common Spring Boot baseline with low friction, teams share libraries, security configurations and operational practices. Token consumption drops dramatically because deterministic recipes eliminate the majority of mechanical work. Evaluation of non-deterministic skills becomes feasible because the residual problem set is smaller and more homogeneous.
Conclusion
Modernization success depends on matching the tool to the nature of the transformation. OpenRewrite supplies precision, testability and scalability for deterministic changes. Large language models supply the semantic insight required for migrations and rewrites. A carefully designed hybrid that keeps the LLM outside the hot path of routine upgrades, that constrains its context to residual problems, and that forces explicit contracts for full rewrites yields both higher quality and lower cost. Organizations that adopt this disciplined approach can keep large application portfolios current without sacrificing reviewability or operational safety.