Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Keystore is not created with java 22 (password needed)

オープン
#462 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, ruby
領域
devops, security

調査の方向性

issue に示されている java_ks リソースから始め、Java 22 で keytool のインポートを再現します。Puppet の非対話実行と Rocky 9.5 での手動コマンドを比較します。パスワードの入力を促されずにキーストアが作成されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Describe the Bug

Running the latest elasticsearch module with elasticsearch 8.15.1 on Rocky 9 throws error:

Error: Execution of 'keytool -importkeystore -srcstoretype PKCS12 -destkeystore /etc/elasticsearch/elasticsearch.ks -srckeystore /tmp/elasticsearch_node.20241023-51377-1njhkrb -alias elasticsearch_node' returned 1: Importing keystore /tmp/elasticsearch_node.20241023-51377-1njhkrb to /etc/elasticsearch/elasticsearch.ks...
Enter destination keystore password:  Enter source keystore password:  
*****************  WARNING WARNING WARNING  *****************
* The integrity of the information stored in the srckeystore*
* has NOT been verified!  In order to verify its integrity, *
* you must provide the srckeystore password.                *
*****************  WARNING WARNING WARNING  *****************

Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>keytool error: java.lang.Exception: Too many failures - try later
Error: /Stage[main]/Elasticsearch::Config/Java_ks[elasticsearch_node]/ensure: change from 'absent' to 'present' failed: Execution of 'keytool -importkeystore -srcstoretype PKCS12 -destkeystore /etc/elasticsearch/elasticsearch.ks -srckeystore /tmp/elasticsearch_node.20241023-51377-1njhkrb -alias elasticsearch_node' returned 1: Importing keystore /tmp/elasticsearch_node.20241023-51377-1njhkrb to /etc/elasticsearch/elasticsearch.ks...
Enter destination keystore password:  Enter source keystore password:  
*****************  WARNING WARNING WARNING  *****************
* The integrity of the information stored in the srckeystore*
* has NOT been verified!  In order to verify its integrity, *
* you must provide the srckeystore password.                *
*****************  WARNING WARNING WARNING  *****************

Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>keytool error: java.lang.Exception: Too many failures - try later (corrective)

from elasticsearch module:

      # Trust CA Certificate
      java_ks { 'elasticsearch_ca':
        ensure       => present,
        certificate  => $elasticsearch::ca_certificate,
        target       => $_keystore_path,
        password     => $elasticsearch::keystore_password,
        trustcacerts => true,
      }

      # Load node certificate and private key
      java_ks { 'elasticsearch_node':
        ensure           => present,
        certificate      => $elasticsearch::certificate,
        private_key      => $elasticsearch::private_key,
        private_key_type => $elasticsearch::private_key_type,
        target           => $_keystore_path,
        password         => $elasticsearch::keystore_password,
      }

The password is not empty in both cases.

Java version used in elasticsearch:

/usr/share/elasticsearch/jdk/bin/java -version
openjdk version "22.0.1" 2024-04-16
OpenJDK Runtime Environment (build 22.0.1+8-16)
OpenJDK 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)

This is probably a combination of Java and operation system versions, the same module used on elasticsearch 7.17 works properly.

Expected Behavior

proper keystore should be created.

Steps to Reproduce

I have included code from elasticsearch module.

Environment

  • Java version 22.0.1
  • Platform: Rocky 9.5
  • Puppet version: 7.33.0

Additional Context

When I run commands from above manually (outside puppet run), the keystore is created but I have to provide the password manually on every step.

主要言語
Ruby
スター
34
フォーク
97
平均マージ
41分
マージ済み PR(30日)
2

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

puppetlabs/puppetlabs-java_ks のほかの issue

puppetlabs/puppetlabs-java_ks の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。