Skip to content

Commit

Permalink
Ajuste de krb
Browse files Browse the repository at this point in the history
  • Loading branch information
guszylk committed Feb 14, 2020
1 parent b7246c2 commit a7b71e5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
19 changes: 19 additions & 0 deletions external-resources/jaas/krb5.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[libdefaults]
default_realm = BIGDATA.ZYLK.NET
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
fcc-mit-ticketflags = true

[realms]
BIGDATA.ZYLK.NET = {
kdc = asgard.bigdata.zylk.net
admin_server = asgard.bigdata.zylk.net
default_domain = BIGDATA.ZYLK.NET
}

[domain_realm]
.bigdata.zylk.net = BIGDATA.ZYLK.NET
bigdata.zylk.net = BIGDATA.ZYLK.NET

6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
<version>${avro-ipc.version}</version>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
</dependency>

<dependency>
<groupId>com.hortonworks.registries</groupId>
<artifactId>schema-registry-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
import java.util.Date;
import java.util.Properties;

import org.apache.kafka.clients.CommonClientConfigs;
import org.apache.kafka.clients.producer.Callback;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.apache.velocity.runtime.parser.node.SetPropertyExecutor;
import org.json.JSONObject;


Expand All @@ -20,8 +17,8 @@ public class KafkaProducerWithKerberos {
private static final String KAFKA_PROTOCOL = "SASL_PLAINTEXT";
private static final String KAFKA_TOPIC = "KERBEROS_JSON";
private static final String KAFKA_KERBEROS_SERVICE_NAME = "kafka";
private static final String JAAS_CLIENT_CONF = "/home/aian/pruebas/kafka-kerberos/jaas-client.conf";
private static final String KRB5_CONF = "/home/aian/pruebas/kafka-kerberos/krb5.conf";
private static final String JAAS_CLIENT_CONF = "/home/gus/git/flink/flink_cep_examples/external-resources/jaas/jaas-client.conf";
private static final String KRB5_CONF = "/home/gus/git/flink/flink_cep_examples/external-resources/jaas/krb5.conf";

public static void main(String[] args) {
System.setProperty("java.security.auth.login.config", JAAS_CLIENT_CONF);
Expand Down

0 comments on commit a7b71e5

Please sign in to comment.