From dae77c6087f0e9c7db8d4ec57242a0226d324552 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 01 八月 2023 09:18:00 +0800 Subject: [PATCH] Merge branch '2023_CR2' of https://dev.pollex.com.tw:8443/r/pcalife/PAM into 2023_CR2 --- pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java b/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java index 9445072..b9d3baf 100644 --- a/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java +++ b/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java @@ -1,6 +1,6 @@ package com.pollex.pam.config; -import com.pollex.pam.security.*; +import com.pollex.pam.business.security.AuthoritiesConstants; import com.pollex.pam.security.jwt.*; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; @@ -69,19 +69,24 @@ .and() .referrerPolicy(ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN) .and() - .permissionsPolicy().policy("camera=(), fullscreen=(self), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), sync-xhr=()") + .featurePolicy("geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'self'; payment 'none'") .and() .frameOptions() .deny() .and() .sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED) .and() .authorizeRequests() + .antMatchers("/api/access_analysis/**").permitAll() .antMatchers("/api/authenticate").permitAll() .antMatchers("/api/register").permitAll() .antMatchers("/api/activate").permitAll() .antMatchers("/api/testLogin/**").permitAll() + .antMatchers("/api/test/sendMsg/**").permitAll() + .antMatchers("/api/otp/**").permitAll() + .antMatchers("/api/login/validate/**").permitAll() + .antMatchers("/api/eService/authenticate/**").permitAll() .antMatchers("/api/account/reset-password/init").permitAll() .antMatchers("/api/account/reset-password/finish").permitAll() .antMatchers("/api/consultant/recommend").permitAll() -- Gitblit v1.8.0