Home

>

Tools

>

Strapi

>

Releases

>

1.4.0

Strapi Release: 1.4.0

Tag Name: v1.4.0

Release Date: 11/13/2015

Strapi LogoStrapi

Open-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.

TL;DR

Strapi v1.4.0: Enhanced Configuration, Security, and Studio Integration

Strapi v1.4.0 introduces significant improvements to configuration management, security, and Studio integration. The update replaces Passport with Grant for authentication, implements better configuration loading from API and environment-specific sources, and enhances the server restart mechanism using Node.js clustering. These changes make Strapi more secure, flexible, and developer-friendly while improving the overall stability of the Studio connection process.

Highlight of the Release

    • Migration from Passport to Grant with Purest for authentication
    • Enhanced configuration loading from API and environment-specific sources
    • Programmatic server restart functionality using Node.js clustering
    • Improved Studio integration with dashboard token authentication
    • Better security with restricted config access and improved user permission routing

Migration Guide

Migration from v1.3.1 to v1.4.0

Authentication Changes

If you were using Passport directly in your application:

- Replace Passport-related dependencies with Grant and Purest
- Update authentication configuration to use Grant syntax
- Modify any custom authentication strategies to work with the new system

Configuration Loading

If you had custom configuration loading logic:

- Review how your application loads configuration
- Update to use the new API-based configuration loading if applicable
- Ensure environment-specific configurations are properly structured

Server Restart Logic

If you were manually handling server restarts:

- Consider using the new programmatic restart functionality
- Be aware of the cluster module implementation if you have custom process management

Studio Integration

If you're using Strapi Studio:

- No action required - connection process has been improved automatically
- Note that dashboard communication now uses token-based authentication

Upgrade Recommendations

Who should upgrade immediately:

  • Developers experiencing issues with Studio connection stability
  • Users concerned about security vulnerabilities in the configuration system
  • Teams requiring better environment-specific configuration management
  • Projects needing improved authentication mechanisms

Upgrade priority: Medium-High

This is a significant feature release with important security improvements and performance enhancements. While not containing critical security patches that would necessitate an immediate upgrade, the authentication system changes and configuration access restrictions provide valuable security improvements.

Upgrade steps:

  1. Back up your project before upgrading
  2. Update your Strapi version to 1.4.0
  3. If you were using Passport directly, migrate to Grant (see Migration Guide)
  4. Test your application thoroughly, especially authentication flows and Studio integration
  5. Review any custom configuration loading to ensure compatibility with the new system

Bug Fixes

  • Fixed Circular Models: Resolved issues with circular model references in Studio
  • JSON Pull Structure: Fixed structure issues with JSON pull operations
  • Dashboard Config Controller: Removed toJSON attribute from models in dashboard config controller to prevent serialization issues
  • Studio Connection: Improved connection stability and configuration reload handling

New Features

Configuration Management

  • Environment-specific Configuration: Load configuration from API and specific environments, providing more flexibility in deployment scenarios
  • Improved Error Handling: Better error messages when loading hooks, making debugging easier
  • Restricted Config Access: Enhanced security by limiting access to configuration data

Authentication & Security

  • Grant Integration: Replaced Passport with Grant and Purest for authentication, providing a more modern approach
  • Dashboard Token Authentication: Using DashboardToken in headers for secure communication with the Studio
  • Enhanced User Permissions: Improved router for handling user permissions
  • New Dashboard Policies: Added addDataCreate and addDataUpdate policies for dashboard routes

Performance & Stability

  • Cluster Module Implementation: Using Node.js cluster module to handle master and worker processes
  • CPU Optimization: Utilizing the number of free CPUs for better performance
  • Deferred Socket Events: Reducing conflicts with Node process by deferring socket events

Studio Integration

  • Programmatic Server Restart: Ability to restart the server programmatically for the Studio
  • Improved Rebuild Process: Better handling of configuration rebuilds
  • Enhanced Connection Process: More reliable connection between the Studio and framework

Security Updates

Security Enhancements

  • Configuration Access Restriction: Limited access to configuration data to prevent potential security vulnerabilities
  • Authentication System Upgrade: Migrated from Passport to Grant with Purest, providing a more secure and maintainable authentication system
  • Dashboard Token Authentication: Implemented DashboardToken in headers for secure communication between Strapi and Studio
  • User Permission Routing: Enhanced router functionality for more granular and secure user permission handling
  • Dashboard Policies: Added new policies (addDataCreate and addDataUpdate) for dashboard routes to enforce proper access control

Performance Improvements

  • CPU Utilization: Now using the number of free CPUs to optimize server performance
  • Worker Process Management: Implemented the Node.js cluster module to better handle master and worker processes
  • Socket Event Handling: Deferred socket events to reduce conflicts with Node process
  • Rebuild Process: Enhanced the dictionary rebuild process on server restart
  • Server Restart Optimization: Improved restart process for both development and production environments

Impact Summary

Strapi v1.4.0 represents a significant step forward in the framework's evolution, focusing on three key areas: configuration management, security, and Studio integration.

The migration from Passport to Grant modernizes the authentication system, making it more maintainable and secure. The improved configuration loading from API and environment-specific sources provides developers with greater flexibility in how they structure their applications across different environments.

Performance improvements through the implementation of the Node.js cluster module and optimized CPU utilization will benefit applications under heavier loads. The deferred socket events and improved rebuild process contribute to a more stable development experience.

For Studio users, the connection process has been significantly enhanced, with better token-based authentication and programmatic server restart capabilities. The fixes for circular model references and JSON pull structure issues resolve pain points that affected Studio usability.

Security has been strengthened through restricted configuration access and improved user permission routing, making this update particularly valuable for production deployments. The new dashboard policies provide more granular control over data operations.

Overall, this release balances new features with important refinements to existing functionality, making Strapi more robust, secure, and developer-friendly.

Full Release Notes

  • Load config from API and specific environment
  • Improved error message when load a hook
  • Use DashboardToken in headers to communicate with the Studio
  • Migrated from passport to grant with purest
  • Programmatically restart the server for the Studio with a rebuild function
  • Use the cluster module to handle master and workers processes
  • Improved the connection process between the Studio and the framework

Statistics:

File Changed29
Line Additions542
Line Deletions379
Line Changes921
Total Commits39

User Affected:

  • Benefit from improved configuration loading from API and specific environments
  • Need to adapt to the migration from Passport to Grant with Purest for authentication
  • Can leverage programmatic server restart functionality for development workflows
  • Will experience better error messages when loading hooks

Contributors:

pierreburgysylvainlapAurelsicoko