返回顶部
返回首页 会员充值 我的足迹 返回上一页

保护 Web 应用程序的最佳实践.pdf

2025-11-29
文档编号:981432
文档页数:68
文档大小:2.34MB
下载积分:VIP专享
文档格式:PDF

1、Best Practices to Secure Web ApplicationsLoiane Groner loianeApplication SecurityPlanDevelopmentBuildTestQA/UATProductionSecurity TestingProduction Delays due to late assessmentWorse:assessment is done after production every X monthsSource:NIST Ponemom InstituteShift leftPlanDevelopmentBuildTestQA/U

2、ATProductionSource:NIST Ponemom InstituteRemediation Costs:Security from day 1Loiane GronerDevelopment/Engineering Manager|Published AWhat is API security?Authentication and AuthorizationOWASP Top 10 API Security Risks 2023Broken Object Level AuthorizationUnrestricted Access to Sensitive Business Fl

3、owsBroken AuthenticationServer Side Request ForgeryBroken Object Property Level AuthorizationSecurity MisconfigurationUnrestricted Resource ConsumptionImproper Inventory ManagementBroken Function Level AuthorizationUnsafe Consumption of APIs12345678910https:/owasp.org/API-Security/editions/2023/en/0

4、 x11-t10/Better AuthorizationBad Practice:Checking not allowedpublic CourseDTO update(PathVariable Long id,RequestBody Course course)User user=getAuthenticatedUser();if(user.getRole().equals(Role.STUDENT)throw new AccessDeniedException(You dont have permission to update course);return courseService.

5、update(id,course);Good Practice:Deny by DefaultPutMapping(value=/id)public CourseDTO update(PathVariable Long id,RequestBody Course course)User user=getAuthenticatedUser();/allow to update if role is admin or teacher if(user.getRole().equals(Role.ADMIN)|user.getRole().equals(Role.TEACHER)return cour

6、seService.update(id,course);throw new AccessDeniedException(You dont have permission to update course);Role-based access controlPreAuthorize(hasRole(ADMIN)or hasRole(TEACHER)public CourseDTO update(PathVariable Long id,RequestBody Course course)return courseService.update(id,course);Potential Proble

保护 Web 应用程序的最佳实践.pdf_第1页
保护 Web 应用程序的最佳实践.pdf_第2页
保护 Web 应用程序的最佳实践.pdf_第3页
保护 Web 应用程序的最佳实践.pdf_第4页
保护 Web 应用程序的最佳实践.pdf_第5页

点击查看更多