Chapter 8. Authentication and Authorization
So far, you’ve built GenAI services that can interact with databases, stream model responses, and handle concurrent users.
Your services are now up and running, but since they’re not protected from attackers or malicious users, deploying them to production may prove problematic.
In this chapter, you’ll learn how to secure your services with an authentication layer and implement authorization guards to protect sensitive resources from nonprivileged users.
To achieve this, we’re going to explore various authentication and authorization patterns then implement JWT and identity-based authentication with role-based access control.
Authentication and Authorization
Before talking about authentication methods, let’s briefly clarify that authentication and authorization are two separate concepts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access