api-gateway 相关问题

作为许多其他服务的网关的服务。提供发现,注册表,安全性,断路器,容错等功能。

使用 terraform 在 aws 中为 api_gateway 进行 event_source_mapping

我在尝试将 api-gateway 映射为 lambda 的事件源时遇到问题。我收到上述错误“ │ **错误:创建 Lambda 事件源映射 (arn:aws:apigateway:us-east-1::/

回答 1 投票 0

API 网关 DNS 在没有 HTTPS 的情况下无法工作

我是 AWS 初学者。 我使用 API GATEWAY 创建了一个 POST 端点。 (获取 xxx.execute-api.eu-west-3.amazonaws.com) 然后,我在 API GATEWAY 工具中制作了自定义 DNS。 (证书管理器,route53) 在邮局...

回答 2 投票 0

为什么 AWS APIG 在不正确的端点上返回授权错误

调用 APIG 中未配置的端点并提供授权标头(JWT 令牌)时,APIG 会响应 { "message": "授权标头需要 'Cred...

回答 1 投票 0

Kubernetes 网关 API 请求链

是否可以使用新的 https://gateway-api.sigs.k8s.io/ 通过多个后端链接请求? 这个想法是根据每个服务的响应标头建立一个流程,即: 请求 -...

回答 1 投票 0

有没有办法在 krakend 端点配置中发送元数据?

我使用 Krakend 作为 API 网关,我的配置如下所示: { “插入”: { “文件夹”:“/etc/krakend/plugins/authenticator/”, “模式”:&...

回答 2 投票 0

API Gateway 集成响应映射:从 Step Function 输出中解析 statusCode 和正文

我想使用 VTL 解析 API 网关集成响应中的“statusCode”和“body”值,并将它们作为方法响应返回,如下所示: 请求状态:201 响应正文:{"firstName&q...

回答 3 投票 0

Api 网关与 s3 集成

我正在尝试使用 API Gateway 在 AWS 上构建 REST API。 我的愿望是,使用 API Gateway 与 S3 集成,我可以将文件上传到用户目录中的存储桶。 在第一步中,我...

回答 1 投票 0

Azure 应用程序网关缺少前向标头

我已在 Azure 应用服务上运行的 asp.net Web api 前面设置了一个 Azure 应用网关 WAF v2 实例。为了让它工作,我必须在后端集中打开以下选项......

回答 1 投票 0

Apache apisix java 插件运行器生产准备好了吗

我正在尝试实现一个具有java插件支持的API网关。分析过Kong、APIMan、APIsix,其中APIsix似乎是最合适的。但是当我试图查看 java 插件支持时...

回答 4 投票 0

ocelot 始终使用端口 5000 启动

我正在尝试部署我的 ocelot 网关服务器。 我输入了 UseUrls("http://localhost:6000"),我看到服务器使用 6000 端口启动。为了我尝试更改端口,删除后

回答 1 投票 0

Kong Basic Auth 使用来自其他服务的身份验证来授权路由请求

晚上好, 我已经设置了来自不同服务/路由的两个端点,它们都通过基本身份验证使用完全不同的用户/通行证进行身份验证。 问题是,我可以使用任何身份验证...

回答 2 投票 0

我们可以使用eway支付网关设置这样的交易形式吗

我们可以在移民网站的Wordpress网站上使用eway支付网关手动交易表单设置这样的交易表单吗?请提供完整代码。我也访问过Eway Sdk网站

回答 1 投票 0

[已解决]:从我的 Angular 应用程序向 Spring Boot API 网关发送 POST 请求且 CORS 配置正确时出现“未知错误”

当从我的 Angular 应用程序向我的 Spring Boot API 网关发送 POST 请求时,我收到“http://localhost:8080/api/user/auth/login: 0 Unknown Error 的 Http 失败响应”。 CORS是配置...

回答 1 投票 0

从我的 Angular 应用程序向我的 Spring Boot API 网关发送 POST 请求并且 CORS 配置正确时出现“未知错误”

当从我的 Angular 应用程序向我的 Spring Boot API 网关发送 POST 请求时,我收到“http://localhost:8080/api/user/auth/login: 0 Unknown Error 的 Http 失败响应”。 CORS是配置...

回答 1 投票 0

在 Lambda 中创建 API 网关 api 密钥

我正在尝试使用 sdk 在 lambda 中创建 API Gateway api 密钥,但我似乎无法使其工作 这是我的代码 Exports.handler = (事件, 上下文, 回调) => { var apigateway = 新...

回答 3 投票 0

即使配置正确,Spring Cloud gateway api 也无法工作

我正在尝试使用尤里卡发现服务器、API 网关和一项休息服务的微服务。如下图所示 [尤里卡发现][1] 对于服务发现: 我已经添加了相关的pom依赖...

回答 1 投票 0

如何更改 AbstractGatewayFilterFactory 中的响应正文 - Spring Cloud Api Gateway

我的目标是检查授权令牌的每个入站查询,如果检查失败,则将其重定向到另一个具有可理解描述的 URL(即 HTTP 401:“...中没有身份验证令牌”

回答 1 投票 0

cloudfront -> waf -> api-网关集成

我想将我的无服务器应用程序扩展到第二个 aws 区域,以便它在主动-主动模型中工作。 目前我有一个使用 WAF 保护的公共 api 网关。 我想添加一个云前端

回答 1 投票 0

面临错误 securityFilterChain 方法的参数 0 需要类型为“org.springframework.security”的 bean。找不到那个

我正在使用Spring Boot微服务(Spring Boot版本-3)。我正在使用oauth2。当我在安全配置文件上使用安全性时,我遇到错误。它在网关服务器上。 我的 Pom 文件是: 我正在使用 Spring Boot 微服务(Spring Boot 版本-3)。我正在使用oauth2。当我在安全配置文件上使用安全性时,我遇到错误。它在网关服务器上。 我的 Pom 文件是: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.1.1</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.tnpay</groupId> <artifactId>gateway-service</artifactId> <version>0.0.1-SNAPSHOT</version> <name>api-gateway</name> <description>api-gateway</description> <properties> <java.version>17</java.version> <spring-cloud.version>2022.0.4</spring-cloud.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> <version>3.1.0</version> </dependency> <!-- <dependency>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-starter-webflux</artifactId>--> <!-- </dependency>--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> <version>4.0.3</version> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-api</artifactId> <version>0.11.5</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-impl</artifactId> <version>0.11.5</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-jackson</artifactId> <version>0.11.5</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <version>3.1.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-resource-server</artifactId> <version>3.1.1</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-resource-server</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-resource-server</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <version>3.1.1</version> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> <scope>test</scope> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> 我的安全配置文件是: import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; import org.springframework.security.web.SecurityFilterChain; @Configuration public class SecurityConfig { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.oauth2ResourceServer( c -> c.jwt( j -> j.jwkSetUri("http://localhost:8080/oauth2/jwks") ) ); http.authorizeHttpRequests(auth -> { auth.requestMatchers("/user/auth").permitAll() .requestMatchers("/**").authenticated(); }); return http.build(); } } 我的错误是: 上下文初始化期间遇到异常 - 取消刷新尝试:org.springframework.beans.factory.UnsatisfiedDependencyException:创建类路径资源 [com/tnpay/gatewayservice/config/SecurityConfig.class] 中定义的名为“securityFilterChain”的 bean 时出错:表达了不满足的依赖关系通过方法“securityFilterChain”参数0:没有可用的“org.springframework.security.config.annotation.web.builders.HttpSecurity”类型的合格bean:预计至少有1个符合自动装配候选资格的bean。依赖注释:{} com.tnpay.gatewayservice.config.SecurityConfig 中的 securityFilterChain 方法的参数 0 需要一个类型为“org.springframework.security.config.annotation.web.builders.HttpSecurity”的 bean,但无法找到。 行动: 考虑在配置中定义“org.springframework.security.config.annotation.web.builders.HttpSecurity”类型的 bean。 我想解决这个问题。 在您的 @EnableWebSecurity 班级级别添加 SecurityConfig 注释,这是必需的,因为: @EnableWebSecurity是标记注释。它允许 Spring 找到(它是一个 @Configuration,因此是 @Component)并自动将该类应用到全局 WebSecurity。 你会得到这样的东西: @Configuration @EnableWebSecurity public class SecurityConfig {...}

回答 1 投票 0

Spring API Gateway:将入站请求重定向到不同的 URL

我的目标是检查授权令牌的每个入站查询,如果检查失败,则将其重定向到另一个具有可理解描述的 URL(即 HTTP 401:“...中没有身份验证令牌”

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.