cost 94 ms
在 Spring Cloud Gateway 中使用 Auth0,獲取 ID Token 時出現問題

[英]Using Auth0 in Spring Cloud Gateway, problem with getting ID Token

我們在使用 auth0 SDK 獲取 ID 令牌時遇到問題。我們有基於 Spring 雲網關(版本 3.1.4)的 API 網關,我們嘗試使用您的 auth0 平台對用戶進行身份驗證,然后將交換路由到我們的微服務。 為此,我們想使用 ID Token 並從中獲取 email 並將此 email 傳遞 ...

Spring 雲網關令牌中繼:OAuth2 客戶端是誰?

[英]Spring Cloud Gateway Token Relay: who is the OAuth2 client?

我正在探索 Spring 雲網關的 TokenRelay 過濾器,以便在 SAML2 Session 和 OAuth2 令牌之間進行調解(在我之前的問題中有更多相關信息)。 我試圖自己解決這個問題,但我似乎無法解決:使用這個過濾器,誰是 OAuth2 客戶端? 我原以為這是網關本身,因此是機密的。 ...

Oauth2使用KeyCloak登錄Spring雲網關

[英]Oauth2 Login in Spring Cloud Gateway using KeyCloak

我使用 KeyCLoak 在 Spring 雲網關中實現了 oauth2。 現在我希望所有請求都被允許,除了那些在 url 中有“/user”的請求。以下是我的安全配置 我期待當用戶輸入 url“http://localhost:8066/user”時,它會將他們重定向到 keycloak 登錄頁面 ...

Spring 雲網關:如何重定向到其他主機

[英]Spring Cloud Gateway: how to redirect to other host

我有一個應該重定向到另一台服務器的請求/路由。 為此,我認為使用來自“spring-cloud-gateway”的重定向過濾器應該是正確的。 示例: http://localhost:8080/site/rest/services/testservice/1 應該重定向到https://intern ...

spring 網關一直返回301,如何繼續處理

[英]spring gateway always returns 301, how to continue processing

這是OP的澄清我有一個 spring 網關,它使用 eureka 服務器將請求路由到已注冊的 spring boot eureka 客戶端。 我看到的是每個請求都會導致包含位置 header 的 301 重定向。似乎是因為在https://my-api.io/payment/payment-inte ...

成功登錄keycloak后重定向到前端應用程序

[英]Redirect to Frontend app after successful login in keycloak

我有通過 spring 雲網關連接到資源服務器的反應應用程序。現在,如果用戶未通過身份驗證 Spring 雲網關將請求重定向到 Keycloak 登錄頁面,成功登錄並從 api 獲得響應后,我需要重定向到前端應用程序,但它是在瀏覽器中顯示 api 響應。下面是 api 網關中的 oauth 配置。 ...

Keycloak注銷出現cors錯誤如何解決?

[英]Keycloak logout give cors error coming how to resolve it?

我正在構建一個 spring 雲網關並嘗試注銷 keycloak 但它給了我 cors 錯誤,我的代碼如下: Security class 其中我定義了注銷代碼邏輯: 現在,當我從前端點擊注銷時,它給了我以下錯誤: 在 Keycloak 中有效的 URL 我已經給出 * 進行測試但仍然無法正常工 ...

在 Spring 雲網關 api 如何添加動態標頭或查詢參數?

[英]In Spring cloud gateway api how add dynamic headers or query parameter?

我正在開發使用 spring 雲網關和前端 Angular 2 的應用程序,登錄時我使用 Keyclock SSO,但登錄后我需要通過以下方式以某種加密格式在前端發送一些用戶信息標頭或查詢參數,因此在 spring 雲網關中,我已經編寫了下面的代碼,但它不起作用,請幫忙。 這是我的自定義 Glob ...

Spring 帶外部配置服務調用的雲網關過濾器

[英]Spring Cloud Gateway Filter with external configuration service call

我正在開發一個 Spring Cloud Gateway 應用程序,它有一個過濾器,可以根據不同服務持有的配置控制對某些路徑或功能的訪問。 因此,如果路徑與功能 x 關聯,則僅當配置服務返回功能 x 已啟用時才允許訪問。 配置以 Mono 的形式返回,然后進行平面映射以檢查啟用的功能。 這一切似乎都 ...

帶有 Spring Cloud GatewayFilter 的 Feign Client 導致循環依賴

[英]Feign Client with Spring Cloud GatewayFilter cause cycle dependency

在某些檢查期間,我需要在網關過濾器中向我的微服務發出請求。 當我在 GatewayFilter(我的 SecurityFilter.java)class 中定義 Feign class 時,它會出現以下錯誤。 我該如何解決這種情況。 錯誤: 網關過濾器 class pom.xml 主 class ...

如何在微服務之間使用 Keycloak token?

[英]How to use Keycloak token between Microservices?

我正在構建一個適用於微服務的應用程序,我正在使用 Keycloak 驗證我的網關我的身份驗證工作正常網關將我重定向到 Keycloak 登錄頁面並成功完成登錄,我能夠獲得令牌 ID 並將此 ID 傳遞給其他人微服務,但是當我再次從任何其他微服務向網關發出 rest 請求時,它失敗了,但我在網關的“ ...

為什么 SecurityContextHolder.getContext().getAuthentication() 返回 null 值?

[英]Why SecurityContextHolder.getContext().getAuthentication() returning null value?

我正在嘗試使用 keycloak 身份驗證在 spring-cloud-gateway 中構建身份驗證,並且一切正常,但是當嘗試獲取 SecurityContextHolder.getContext().getAuthentication() 時,它給出了 null 我不確定為什么? 這是我的代碼 ...

白色 label 在 spring 雲網關中運行的 React SPA 頁面刷新錯誤

[英]White label error on page refresh on react SPA running in spring cloud gateway

我正在研究 spring-boot React 全棧應用程序。 我使用 spring 雲網關作為我的 API 網關將請求路由到上游微服務。 另外,我的 React SPA 也在 spring 雲網關上運行。 當我運行 spring 雲網關應用程序時,我能夠加載前端 GUI。 當我瀏覽 GUI 時它工 ...

如何為 Spring Cloud Reactive API 網關的自定義過濾器編寫單元測試以測試它是否允許對公共端點的請求通過?

[英]How do I write a unit test for a Spring Cloud Reactive API Gateway's Custom Filter to test if it allows requests to public endpoints to pass?

我正在嘗試為微服務架構中的 Spring Cloud Reactive API Gateway 的 authAccountFilter 編寫單元測試。 網關使用 WebFlux,authAccountFilter 負責檢查端點是公共的還是安全的。 如果是公共端點,則允許請求通過。 但是,如果它是安 ...

Spring 雲網關,記錄請求/響應

[英]Spring Cloud Gateway, logging request/response

我的 GlobalFilter 只記錄成功的請求 (200)。 例如,代碼 500 不通過 ServerHttpRequestDecorator 和 ServerHttpResponseDecorator。 ServerResponse.status(HttpStatus.valueOf(stat ...

帶有 Netflix Eureka 的 Spring 雲網關中的奇怪行為服務器端負載平衡

[英]Strange behaviour server side load balancing in Spring Cloud Gateway with Netflix Eureka

我正在嘗試使用 SpringCloudGateway 和 Eureka 實現服務器端 LB。 我有微服務 ABC (abc.test.com) 和網關 (gateway.test.com) 通過主機名在 eureka (eureka.test.com) 中注冊。 如果我從本地機器上的 postman ...

有沒有辦法用域名 to.netflix eureka 注冊微服務?

[英]Is there is a way to register microservice with domain name to netflix eureka?

我正面臨尤里卡配置問題 - 是否可以通過域名如“https://www.google.com”(例如通過 ENV 變量傳遞給屬性)而不是 ip 地址(我是在沒有 static ip 地址的地方使用 PAAS 或主機名(通常是供應商的名稱)? 我試過設置尤里卡 要么 但它並沒有達到我想要達到的目的。 ...

GatewayFilter反應器機制

[英]GatewayFilter reactor mechanism

我是反應堆的新手,想了解以下代碼之間的區別。 兩者有何不同? (最后給出的其余代碼) 對比 我知道版本 B 不起作用,因為兩個onErrorResume()返回Mono<Void> ,而sample()返回Mono<String> 。 但除此之外,我想了解的是,對於版本 A ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM