ソースを参照

新增oidc配置白名单

pull/146/head
xiaoying 1年前
コミット
a488042a75
2個のファイルの変更6行の追加0行の削除
  1. +2
    -0
      src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java
  2. +4
    -0
      src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java

+ 2
- 0
src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java ファイルの表示

@@ -67,6 +67,7 @@ public class WebSecurityConfig {
String[] telecomumalePermitPath = PermitPathConstant.telecomumaleUrlStr;
String[] alertPermitPath = PermitPathConstant.alertleUrlStr;
String[] airportPermitPath = PermitPathConstant.airportUrlStr;
String[] oidcPermitPath = PermitPathConstant.oidcUrlStr;
httpSecurity
.authorizeExchange()
//.pathMatchers(OAUTH_PATH).hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_DSP_MP, AuthorityConstant.SCOPE_TUOHNEG_DSP_WEB)
@@ -79,6 +80,7 @@ public class WebSecurityConfig {
.pathMatchers(telecomumalePermitPath).permitAll()
.pathMatchers(alertPermitPath).permitAll()
.pathMatchers(airportPermitPath).permitAll()
.pathMatchers(oidcPermitPath).permitAll()
.pathMatchers("/pilot/miniprogram/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_MP)
.pathMatchers("/pilot/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_ADMIN)
.pathMatchers("/hhz/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_HHZ_ADMIN)

+ 4
- 0
src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java ファイルの表示

@@ -118,4 +118,8 @@ public class PermitPathConstant {
"/airport/admin/common/**",
"/airport/admin/airportStatus/index/**"
};

public static String oidcUrlStr[] = {
"/oidc/admin/third/redirect/**"
};
}

読み込み中…
キャンセル
保存