github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/docs/blog/_posts/2018-11-29-connect-native.md (about) 1 --- 2 layout: post 3 title: Consul Connect-Native Go Micro Services 4 date: 2018-11-29 09:00:00 5 --- 6 <br> 7 Today we're announcing support for Connect-Native Go Micro services via a slim initialisation library called [Go Proxy](https://github.com/micro/go-proxy). 8 This will provide [Go Micro](https://github.com/micro/go-micro) with the ability to do authorized and secure service-to-service communication. 9 10 ## What is Consul Connect? 11 12 [Consul Connect](https://www.consul.io/docs/connect/index.html) is a feature of [Consul](https://www.consul.io/) which provides 13 service-to-service authorization and encryption via mutual TLS. Consul Connect uses [SPIFEE](https://spiffe.io/) compliant 14 certificates for identity. 15 16 We believe Consul Connect is a powerful mechanism for securing micro services. So how do we integrate? 17 18 ## Connect-Native 19 20 Consul [Connect-Native](https://www.consul.io/docs/connect/native.html) is native integration with the Connect API. This allows 21 [Go Micro](https://github.com/micro/go-micro) services to become secure by default. 22 23 Consul Connect provides the ability to use proxies for communication but this can add overhead, Go Micro handles distributed 24 systems concerns as a client library, which eliminates this overhead. Native integration with Connect gives us all its benefits 25 while maintaining direct point to point connections for performance. 26 27 The consul documentation provides an overview of how this works. In Go Micro's case we initialise a consul registry with the 28 connect option enabled and setup the broker and transport tls config. 29 30 <img src="https://www.consul.io/assets/images/connect-native-overview-cc9dc497.png" /> 31 32 ## Using Connect-Native 33 34 We've provided a complete example of how to get started in the [Go Proxy](https://github.com/micro/go-proxy) repository. 35 36 But essentially it's a two line change. Import the connect package and create a new service with it. That's it! 37 38 <script src="https://gist.github.com/asim/de7a3bcfcd93f6102e6c657ed54b8f2e.js"></script> 39 40 ## Summary 41 42 Connect-Native gives us support for authorization and secure end to end communication for Go Micro apps without the overhead 43 of proxies. It's a great addition for micro users and we highly recommend using it. 44 45 <center>...</center> 46 47 To learn more about micro check out the [website](https://m3o.com), follow us on [twitter](https://twitter.com/m3ocloud) or 48 join the [slack](https://slack.m3o.com) community. 49 50 <h6><a href="https://github.com/micro/go-proxy"><i class="fab fa-github fa-2x"></i> Go Proxy</a></h6>