Skip to content

[QA-4212] generate root-CA/sub-CA/keystore/truststore, import to keystore/truststore;#196

Open
YipingXiongTG wants to merge 20 commits into
masterfrom
QA-4212
Open

[QA-4212] generate root-CA/sub-CA/keystore/truststore, import to keystore/truststore;#196
YipingXiongTG wants to merge 20 commits into
masterfrom
QA-4212

Conversation

@YipingXiongTG

@YipingXiongTG YipingXiongTG commented Feb 16, 2023

Copy link
Copy Markdown
Contributor

ssl_generate.sh
image

if command is empty:
image

  1. generate root CA
    image

  2. generate keystore
    image

  3. generate truststore
    image

  4. generate subordinate CA
    image

ssl_import.sh
image

  1. import privateKey-ca pair to keystore
    image

  2. import certificate to truststore
    image

@shuxiny

shuxiny commented Feb 16, 2023

Copy link
Copy Markdown

--import_to_keystore import CA to keystore

Unlike truststore (which just need root-CA certificate), we need to import private-key and certificate-chain (bundled together) into keystore.

--gen_CARoot generate CA and private key
private-key -> its' private-key, "private key" has many occurrences. It would be nice to explictly say this private key is about the root CA.

@shuxiny

shuxiny commented Feb 16, 2023

Copy link
Copy Markdown

As to subordninate CA generation, it does not have to be signed by root-CA. In the case of multiple intermediate CA, the subordinate CA is signed by supervior CA, which isn't not necessarilly root-CA.

Overall the interface LGTM.

Comment thread tools/kafka_ssl/generate_ssl_CA/ssl_generate.sh Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/ssl_renewal.sh Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/utils/env_utils Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/utils/env_utils Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/utils/ssl_utils Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/ssl_renewal.sh Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/ssl_renewal.sh Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/utils/env_utils Outdated
Comment thread tools/kafka_ssl/generate_ssl_CA/utils/env_utils Outdated

@dadongwang-tg dadongwang-tg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssl_generate.sh: only generate CA (root, sub), key-store, or trust store
ssl_import.sh: only import key/trust store

help_flag=""

opt_string="hip:c:s:o:n:"
opt_long_string="help,gen_CARoot,gen_subCA,gen_keystore,gen_truststore,passphrase:,output:,storepass:,storetype:,cer:,cerKey:,CN:,name:"

@dadongwang-tg dadongwang-tg Feb 27, 2023

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if user don't provide any options, it is default behavior as below:
(1) ./ssl_generate.sh
<==>
./ssl_generate.sh --gen_CARoot --gen_keystore --gen_truststore

(2) ./ssl_generate.sh --CN <DN name>
./ssl_generate.sh --gen_CARoot --CN <DN name> --gen_keystore --gen_truststore

@dadongwang-tg dadongwang-tg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add one more file ssl_generate_import_examples.sh:
e.g. 1. [WARN] clean up, ...
step 1. ./ssl_generate.sh
step 2. ./ssl_import.sh from default SSL_files
[step 3. check the outputs ]

e.g. 2, ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants