如何解决Spring Cloud Schema Registry独立服务器的安全性
我能够运行Spring Cloud Schema Registry独立服务器(数据库已嵌入H2以进行测试)和Spring Cloud Stream Kafka Avro Producer和Kafka Avro Consumer(均使用Spring Cloud Schema Registry客户端库)。现在,我想将安全性应用于生产者/消费者-因此,我考虑在向架构的Registry Server发出HTTP请求时,在请求标头中使用令牌(可能是OAuth2)。我在Spring Boot项目中为restTemplate bean创建了一个拦截器,该拦截器将在请求发送到Schema Registry服务器之前插入令牌。但是,当我查看生产者/消费者的日志时,发现在创建restTemplate bean之前已发布了对Spring Cloud Schema Registry服务器的HTTP请求:
o.s.web.client.RestTemplate : HTTP POST http://localhost:8990
-
有没有一种方法可以配置Schema Registry客户端以使用我的restTemplate bean,以便我可以插入令牌?
-
如果您正在使用独立的Schema Registry服务器(出于许可的原因,我无法使用Confluent Registry服务器),那么如何应用安全性?
我正在使用Spring Boot 2.2.4和spring-cloud-schema-registry-core 1.0.0,spring-cloud-schema-registry-server 1.0.0,spring-cloud-schema-registry-client 1.0.0
谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。