9 Storing, hosting, and securing the contracts

 

This chapter covers

  • Why we need Pact Broker
  • Pact Broker core features
  • Pact Broker options
  • Software as a service Pact Broker (PactFlow)
  • Self-hosted Pact Broker
  • Software as a service versus self-hosted Pact Broker

Throughout the previous chapters, we generated and published a few contracts to Pact Broker. As defined previously in section 3.4, the broker’s purpose isn’t to arrange but to organize and facilitate the contract life cycle, wherever the contracts are being stored. We also stated that the broker holds the information about the different consumers and providers, such as when the latest contract was published, the contract version, and when the provider last verified the contract. This chapter explores the different Pact Broker options and where it’s best to store contracts for different scenarios. Pact Broker offers much more than just storing contracts; we explore some of these features, including the network diagram and stub URL. In addition, you need to consider not only the features but also whether to pay for a hosted version of the broker or self-host on your own. We often get asked whether investing in PactFlow or maintaining their open source Pact Broker is worth it.

9.1 Why we need Pact Broker

9.1.1 Pact Broker core features

9.2 Pact Broker options

9.3 SaaS Pact Broker (PactFlow)

9.3.1 Setting up PactFlow

9.3.2 PactFlow API token

9.3.3 PactFlow user management

9.3.4 Other PactFlow features

9.4 Self-hosted Pact Broker

9.4.1 Pact Broker with Docker

9.4.2 Kubernetes Pact Broker

9.5 SaaS vs. self-hosted Pact Broker

Summary