Recent evolution of the industrial Internet of Things empowers the classical manufacturing model with cloud computing integration for Industry 4.0. Cloud integration advances the capabilities of manufacturing systems with cloud-based controlling and real-time process monitoring, which is renowned as cloud manufacturing (CM). However, cloud integration exposes the entire manufacturing ecosystem to a new set of security risks and increments in end-to-end latency. Moving security services toward the edge eradicates message routing latency toward the cloud and eliminates the central point of failure while leveraging the entire system’s performance. We propose a blockchain and fog-computing-enabled security service architecture that operates on fog nodes at the edge of manufacturing equipment clusters. The proposed service facilitates CM equipment authentication and equipment-cloud channel privacy protection while preserving anonymity and unlinkability over the blockchain. We implemented the proposed architecture with hyperledger fabric and compared the performance advantage over the state-of-the-art solutions.