无法从运行在 WebLogic 中的 Spring Boot 应用程序连接安全的 Kafka 主题。
实际上问题是无法在连接krebors的同时加载KeyTab文件
我尝试过将Keytab文件放置在.war文件中以及服务器位置和etc文件夹下的文件之类的方法
String jaasConfig = "com.sun.security.auth.module.Krb5LoginModule required useKeyTab= "+true+" doNotPrompt= "+false+" useTicketCache= "+false+" serviceName= "+"\""+"vod-kafka"+"\""+"storeKey= "+true+" refreshKrb5Config= "+true+" debug= "+true+" keyTab="+ "\""+absolute+"\""+" principal="+"\""+"svc-bd-sdpposmc-dev@DEVHADOOP.CHARTER.COM"+"\""+" client= "+true+";";
properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,serverIp);
properties.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
properties.put(SaslConfigs.SASL_MECHANISM,"PLAIN");
properties.put(SaslConfigs.SASL_KERBEROS_SERVICE_NAME,"vod-kafka");
properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG,"SASL_SSL");
Debug是true storeKey是useTicketCache
是false useKeyTab是doNotPrompt是false ticketCache是null isInitiator是KeyTab是
/charter/apps/osm/Oracle/Middleware/Oracle_Home/user_projects/domains/
base_domain/servers/OsmAdmin/tmp/_WL_user/
Complete-Order-Notification_19.3.0/qzbude/war/XXX
refreshKrb5Config
是true主体是XXX tryFirstPass是false useFirstPass是false storePass是false clearPass是false
刷新Kerberos配置