How to securely provide ssl keystore and key passwords
up vote
1
down vote
favorite
I use ssl keystores for Jetty 9 and Kafka. I need to provide keystore and key passwords to access the keystore and private key. However, I don't want to provide these passwords in clear text in the configuration files. What other options are there to securely provide/encrypt the passwords? what is the pros and cons of each approach?
apache-kafka jetty keystore jks
add a comment |
up vote
1
down vote
favorite
I use ssl keystores for Jetty 9 and Kafka. I need to provide keystore and key passwords to access the keystore and private key. However, I don't want to provide these passwords in clear text in the configuration files. What other options are there to securely provide/encrypt the passwords? what is the pros and cons of each approach?
apache-kafka jetty keystore jks
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I use ssl keystores for Jetty 9 and Kafka. I need to provide keystore and key passwords to access the keystore and private key. However, I don't want to provide these passwords in clear text in the configuration files. What other options are there to securely provide/encrypt the passwords? what is the pros and cons of each approach?
apache-kafka jetty keystore jks
I use ssl keystores for Jetty 9 and Kafka. I need to provide keystore and key passwords to access the keystore and private key. However, I don't want to provide these passwords in clear text in the configuration files. What other options are there to securely provide/encrypt the passwords? what is the pros and cons of each approach?
apache-kafka jetty keystore jks
apache-kafka jetty keystore jks
edited Aug 7 at 16:00
Joakim Erdfelt
32.2k45695
32.2k45695
asked Aug 7 at 15:51
Mulugeta Ayalew Tamiru
162
162
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
Since Kafka 2.0.0, all password configs can be preloaded in zookeeper before you start brokers. The kafka-configs.sh
tool can be used to store passwords in an encrypted format in Zookeeper avoiding the need to specify them in plaintext in the properties file.
See the Updating Broker Configs section in the Kafka docs, especially the "Updating Password Configs in ZooKeeper Before Starting Brokers" paragraph.
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
How to I know thelistener.name.{listenerName}
or how do I set it?
– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
It's the name of the listeners you have set inlisteners
. For example, if you havelisteners=PLAINTEXT://:9092
thenPLAINTEXT
is a listener name
– Mickael Maison
Aug 13 at 10:32
Thanks. I ran the config command, however I am getting an errorERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specifiedpassword.encoder.secret
in the command. Any thougths on this?
– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
|
show 2 more comments
up vote
0
down vote
Yes. It is mandatory to add password encoder in server.properties
,
otherwise server can not decode password.
It works for me when I add password.encoder.secret
to server.properties
.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51730893%2fhow-to-securely-provide-ssl-keystore-and-key-passwords%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Since Kafka 2.0.0, all password configs can be preloaded in zookeeper before you start brokers. The kafka-configs.sh
tool can be used to store passwords in an encrypted format in Zookeeper avoiding the need to specify them in plaintext in the properties file.
See the Updating Broker Configs section in the Kafka docs, especially the "Updating Password Configs in ZooKeeper Before Starting Brokers" paragraph.
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
How to I know thelistener.name.{listenerName}
or how do I set it?
– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
It's the name of the listeners you have set inlisteners
. For example, if you havelisteners=PLAINTEXT://:9092
thenPLAINTEXT
is a listener name
– Mickael Maison
Aug 13 at 10:32
Thanks. I ran the config command, however I am getting an errorERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specifiedpassword.encoder.secret
in the command. Any thougths on this?
– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
|
show 2 more comments
up vote
0
down vote
Since Kafka 2.0.0, all password configs can be preloaded in zookeeper before you start brokers. The kafka-configs.sh
tool can be used to store passwords in an encrypted format in Zookeeper avoiding the need to specify them in plaintext in the properties file.
See the Updating Broker Configs section in the Kafka docs, especially the "Updating Password Configs in ZooKeeper Before Starting Brokers" paragraph.
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
How to I know thelistener.name.{listenerName}
or how do I set it?
– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
It's the name of the listeners you have set inlisteners
. For example, if you havelisteners=PLAINTEXT://:9092
thenPLAINTEXT
is a listener name
– Mickael Maison
Aug 13 at 10:32
Thanks. I ran the config command, however I am getting an errorERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specifiedpassword.encoder.secret
in the command. Any thougths on this?
– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
|
show 2 more comments
up vote
0
down vote
up vote
0
down vote
Since Kafka 2.0.0, all password configs can be preloaded in zookeeper before you start brokers. The kafka-configs.sh
tool can be used to store passwords in an encrypted format in Zookeeper avoiding the need to specify them in plaintext in the properties file.
See the Updating Broker Configs section in the Kafka docs, especially the "Updating Password Configs in ZooKeeper Before Starting Brokers" paragraph.
Since Kafka 2.0.0, all password configs can be preloaded in zookeeper before you start brokers. The kafka-configs.sh
tool can be used to store passwords in an encrypted format in Zookeeper avoiding the need to specify them in plaintext in the properties file.
See the Updating Broker Configs section in the Kafka docs, especially the "Updating Password Configs in ZooKeeper Before Starting Brokers" paragraph.
answered Aug 8 at 8:56
Mickael Maison
6,73032529
6,73032529
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
How to I know thelistener.name.{listenerName}
or how do I set it?
– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
It's the name of the listeners you have set inlisteners
. For example, if you havelisteners=PLAINTEXT://:9092
thenPLAINTEXT
is a listener name
– Mickael Maison
Aug 13 at 10:32
Thanks. I ran the config command, however I am getting an errorERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specifiedpassword.encoder.secret
in the command. Any thougths on this?
– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
|
show 2 more comments
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
How to I know thelistener.name.{listenerName}
or how do I set it?
– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
It's the name of the listeners you have set inlisteners
. For example, if you havelisteners=PLAINTEXT://:9092
thenPLAINTEXT
is a listener name
– Mickael Maison
Aug 13 at 10:32
Thanks. I ran the config command, however I am getting an errorERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specifiedpassword.encoder.secret
in the command. Any thougths on this?
– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Thanks Michael. Could you may be direct me to an example of how to do this? Thanks
– Mulugeta Ayalew Tamiru
Aug 9 at 12:27
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
Have you read the documentation I linked in my answer? If so what is not clear?
– Mickael Maison
Aug 11 at 15:54
How to I know the
listener.name.{listenerName}
or how do I set it?– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
How to I know the
listener.name.{listenerName}
or how do I set it?– Mulugeta Ayalew Tamiru
Aug 13 at 10:02
It's the name of the listeners you have set in
listeners
. For example, if you have listeners=PLAINTEXT://:9092
then PLAINTEXT
is a listener name– Mickael Maison
Aug 13 at 10:32
It's the name of the listeners you have set in
listeners
. For example, if you have listeners=PLAINTEXT://:9092
then PLAINTEXT
is a listener name– Mickael Maison
Aug 13 at 10:32
Thanks. I ran the config command, however I am getting an error
ERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specified password.encoder.secret
in the command. Any thougths on this?– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
Thanks. I ran the config command, however I am getting an error
ERROR Dynamic password config listener.name.SSL.ssl.truststore.password could not be decoded, ignoring. (kafka.server.DynamicBrokerConfig) Aug 13 11:31:50 available-kafka-03 kafka[31050]: org.apache.kafka.common.config.ConfigException: Password encoder secret not configured
even though I have specified password.encoder.secret
in the command. Any thougths on this?– Mulugeta Ayalew Tamiru
Aug 13 at 11:38
|
show 2 more comments
up vote
0
down vote
Yes. It is mandatory to add password encoder in server.properties
,
otherwise server can not decode password.
It works for me when I add password.encoder.secret
to server.properties
.
add a comment |
up vote
0
down vote
Yes. It is mandatory to add password encoder in server.properties
,
otherwise server can not decode password.
It works for me when I add password.encoder.secret
to server.properties
.
add a comment |
up vote
0
down vote
up vote
0
down vote
Yes. It is mandatory to add password encoder in server.properties
,
otherwise server can not decode password.
It works for me when I add password.encoder.secret
to server.properties
.
Yes. It is mandatory to add password encoder in server.properties
,
otherwise server can not decode password.
It works for me when I add password.encoder.secret
to server.properties
.
edited Nov 22 at 18:16
Ivan Aracki
1,63832540
1,63832540
answered Nov 22 at 16:49
Jaaouane Aymen
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51730893%2fhow-to-securely-provide-ssl-keystore-and-key-passwords%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown