首页 > 解决方案 > Best way to secure Spring Boot & Angular app with SSL

问题描述

What is the best way to implement SSL in Spring Boot & Angular application (frontend with backend)?

  1. Should I configure SSL in both applications separately?
  2. Or should I configure SSL in Nginx web server and not taking care about securing applications?

标签: javaangularspring-bootnginxssl

解决方案


我应该在两个应用程序中分别配置 SSL 吗?

如果您已经构建了一个微服务架构,并且您的 Spring Boot 应用程序和您的 Angular 应用程序都在不同的域中提供服务,那么是的,您应该在这两个应用程序上配置 SSL。

或者我应该在 Nginx Web 服务器中配置 SSL,而不关心应用程序的安全?

如果您使用 NGINX 为您的 Angular 应用程序提供服务,那么是的,您应该在其上设置 SSL。

我要补充一点,SSL 并不是保护应用程序所需的唯一步骤。许多应用程序将需要一些具有基于角色权限的用户管理,并根据用户权限控制对应用程序中的屏幕或 REST API 的访问。


推荐阅读