Security with Go
Security with Go
Summary:
Introduction
The book "Security with Go" (author — John Daniel Leon, 2018, 340 pages) is a practical guide that fills an important gap in the literature on the Go programming language. While most textbooks focus on the basics of syntax or web development, this work is dedicated exclusively to security issues: from cryptographic primitives to securing network connections and web applications. The book is written for developers who are already familiar with Go and want to write reliable, secure code, as well as for information security professionals learning this language.
What the book is about
The book consists of 12 chapters, each dedicated to a specific aspect of security. The author consistently guides the reader from the basics of cryptography to complex topics such as authentication, authorization, web application security, and network protocols. Special attention is paid to practical code examples in Go that can be immediately used in real projects. Both built-in Go packages (crypto, net, tls) and popular third-party libraries are covered.
Who this book is for
- Go developers — from intermediate to advanced level, looking to improve the security of their applications.
- Information security professionals who want to learn Go for writing security tools (scanners, analyzers, utilities).
- DevOps engineers working with microservices in Go and needing to secure communication channels and data.
- Students and instructors of courses on security and Go development.
What the reader will learn
- Cryptography in Go: hashing (SHA, MD5), symmetric and asymmetric encryption (AES, RSA), working with X.509 certificates.
- Network connection security: configuring TLS/SSL, creating secure TCP/UDP servers and clients, working with SSH.
- Authentication and authorization: implementing OAuth2, JWT, basic authentication, session management.
- Web application security: preventing SQL injection, XSS, CSRF, secure handling of forms and cookies.
- Secure data storage: password encryption (bcrypt, scrypt), working with secrets, secure database operations.
- Writing security tools: port scanners, packet sniffers, log analyzers in Go.
- Security testing: writing unit tests for vulnerability detection, fuzzing.
Strengths of the book
Practical focus. Each chapter contains numerous code listings that can be copied and run. The author does not delve into excessive theory but immediately shows how to implement a particular security measure in Go.
Relevance. Despite being from 2018, the core concepts and Go packages remain in demand. The book covers the standard library, which rarely changes drastically.
Broad coverage. From cryptography to network security and web protection — the book covers 90% of the tasks a developer encounters.
Clear style. John Daniel Leon writes clearly, without unnecessary fluff, with an emphasis on "how to do it."
Who it is recommended for
The book will be useful for anyone writing in Go and wanting to avoid common security mistakes. I especially recommend it to developers of microservices, APIs, and web applications, as well as those creating tools for pentesting or auditing. Beginners in Go should first master the basics of the language, as the book assumes confident knowledge of syntax and basic concepts.
Final rating: 9/10. This is one of the best books on Go security that should be on the shelf of every serious developer.