security for spring cloud schema registry独立服务器

acruukt9  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(340)

我能够运行SpringCloudSchemaRegistry独立服务器(数据库嵌入h2进行测试)和SpringCloud流KafkaAvro生产者和KafkaAvro消费者(两者都使用SpringCloudSchemaRegistry客户机库)。现在我想对生产者/消费者应用安全性—所以我考虑在向注册表服务器发出http请求时,在请求头中使用一个令牌(可能是oauth2)。我在springboot项目中为restemplatebean创建了一个拦截器,它将在请求发送到schema注册表服务器之前插入令牌。但是当我查看生产者/消费者的日志时,我发现对SpringCloudSchemaRegistry服务器的http请求是在创建RESTTemplatebean之前发布的:

o.s.web.client.RestTemplate           : HTTP POST http://localhost:8990

有没有一种方法可以配置schema registry客户机来使用restemplate bean以便插入令牌?
如果您使用的是独立架构注册表服务器(由于与许可相关的原因,我不能使用confluent registry server),那么如何应用安全性?
我使用的是SpringBoot2.2.4和SpringCloudSchemaRegistryCore1.0.0,SpringCloudSchemaRegistryServer1.0.0,SpringCloudSchemaRegistryClient1.0.0
谢谢

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题