LinuxでJavaを使用

スタンドアロンJavaサービスを使用したKeeper Automatorの実装例

本ガイドでは、Dockerを実行できるLinuxインスタンスでKeeper Automatorを実行するための手順を解説します。

SSL証明書がすでに用意できていることをご確認ください。用意できていない場合は、SSL証明書作成のページの手順に従ってください。

スタンドアロンJavaサービス

(1) Javaをインストールします

サービスの準備としてJava 17以上がインストールされていることを確かにします。標準のAmazon AWS Linux 2インスタンスでは、以下のコマンドを使用してJava 17 SDKをインストールできます。

[ec2-user@xxx ~]$ sudo amazon-linux-extras install java-openjdk17

どのバージョンが実行中かを確認するには、以下のように入力します。

[ec2-user@xxx ~]$ java --version

(2) サービスをインストールします

Automatorインスタンスから、Keeper Automatorサービスをダウンロードして解凍します。

[ec2-user@xxx ~]$ mkdir automator
[ec2-user@xxx ~]$ cd automator/
[ec2-user@xxx ~]$ wget https://keepersecurity.com/automator/keeper-automator.zip
[ec2-user@xxx ~]$ unzip keeper-automator.zip

(3) configフォルダを作成します

このフォルダが存在しない場合は、解凍先にconfigフォルダを作成します。

[ec2-user@xxx ~]$ mkdir keeper-automator/config

(4) .pfxファイルとパスワードファイルをコピーします

SSL証明書作成のページで作成した.pfxファイルをAutomatorのconfig/フォルダにアップロードし、ファイル名がssl-certificate.pfxになっていることを確認します。

以下は、scpを使用した例です。

$ scp -i xxx.pem ssl-certificate.pfx \
  ec2-user@xxx:/home/ec2-user/automator/keeper-automator/config/

ssl-certificate.pfxファイルがパスフレーズで保護されている場合は、ssl-certificate-password.txtという名前のファイルも作成して、dockerコンテナにコピーする必要があります。

以下に例を示します。

echo "my_pfx_password..." > ssl-certificate-password.txt

scp -i xxx.pem ssl-certificate-password.txt \
  ec2-user@xxx:/home/ec2-user/automator/keeper-automator/config/

(5) サービスを開始します

Automatorインスタンスから、java -jarを使用してサービスを開始します。以下の例では、nohupを使用してバックグラウンドで実行します。

[ec2-user@xxx automator]$ cd automator/
[ec2-user@xxx automator]$ nohup java -jar keeper-automator.jar &

Windowsのコマンドラインまたはpowershellでは、コマンドは以下の記載通りに実行する必要があります。

start "" /B javaw -jar "keeper-automator.jar"

(6) サービスのステータスを確認します

サービスが実行中であることをウェブブラウザで確認します(テストしているデバイスからポート 443を開く必要があります)。 この場合、URLはhttps://<server>/healthとなります。

このURLは自動ヘルスチェックにもご使用になれます。

以下に例を示します。

$ curl https://automator.lurey.com/health
OK

サービスは実行中となりましたので、Keeper Commanderを使用してAutomatorをご利用の環境に統合します。

Commanderでの最後の設定

Keeper CommanderでAutomator設定の最後の手順を実行する必要があります。これはどこからでも実行可能で、サーバーにインストールする必要はありません。

ご利用のワークステーション、サーバー、コンピュータなどにKeeper Commander CLIをインストールします。バイナリインストーラーを含むインストール手順についてはこちらをご覧ください。 Commanderをインストールしたら、keeper shellと入力してセッションを開き、loginコマンドを使用してログインできます。Automatorを設定するには、Keeper管理者、またはSSOノードを管理できる管理者としてログインする必要があります。

$ keeper shell

My Vault> login admin@company.com

  _  __  
 | |/ /___ ___ _ __  ___ _ _ 
 | ' </ -_) -_) '_ \/ -_) '_|
 |_|\_\___\___| .__/\___|_|
 v16.1.10     |_|

 password manager & digital vault

Logging in to Keeper Commander

SSO user detected.Attempting to authenticate with a master password.
(Note:SSO users can create a Master Password in Web Vault > Settings)

Enter password for admin@company.com
Password:
Successfully authenticated with Master Password
Syncing...
Decrypted [58] record(s)

My Vault>

Keeper Commanderにログインし、automator createで始まる一連のコマンドを使用してAutomatorを有効化します。

My Vault> automator create --name="My Automator" --node="Azure Cloud"

ノード名(この場合は、「Azure Cloud」)は、以下に示すように管理コンソールのUIに表示されます。

コマンドの出力には、IDプロバイダから取得したメタデータを含むAutomatorの設定が表示されます。

                    Automator ID:1477468749950
                            Name:My Automator
                             URL:
                         Enabled:No
                     Initialized:No
                          Skills:Device Approval

以下のようにautomator editコマンドを実行します。これによりURLとスキルが設定されます(teamteam_for_userdevice)。

automator edit --url https://<application URL> --skill=team --skill=team_for_user --skill=device "My Automator"

次にキーを交換します。Automator公開キーで暗号化されたエンタープライズ秘密キーがAutomator に提供されます。

automator setup "My Automator"

次に、他のIdPメタデータをAutomatorに送信します。

automator init "My Automator"

Automatorサービスを有効にします。

automator enable "My Automator"

この時点で設定は完了となります。

AD FSを使用した環境の場合

IDプロバイダとしてAD FSを使用してKeeper Automatorを有効にする場合、以下の手順に従ってKeeper 証明書を更新するまでログインできません。

  • Keeper管理コンソールへログインします。

  • [管理] > [SSOノード] > [プロビジョニング]に移動し、SSOクラウド設定を見ます。

  • [Export SP Cert]をクリックします。

  • AD FS管理コンソールで、Keeper Cloud SSO証明書利用者信頼プロパティを選択します。

  • [暗号化]タブで、古い証明書をこの新しい証明書に置き換えます。

  • [署名]タブで、新しいSP証明書をこの新しい証明書に置き換えます。

サービスの確保

Keeperのサーバーおよびご利用のワークステーションからサービスへのネットワークアクセスを制限することを推奨します。許可するKeeper IPアドレスのリストについては、イングレス要件をご参照ください。

ユーザー体験のテスト

Keeper Automatorがデプロイされましたので、エンドユーザー体験のテストが可能となります。ユーザーがSSO IDプロバイダで認証した後は、承認を求めるプロンプトは必要なくなります。

最も簡単なテスト方法は、ブラウザでシークレットモードのウィンドウを開いてKeeperウェブボルトへアクセスし、SSOクラウドでログインすることとなります。デバイスの承認を求めるプロンプトは表示されなくなります。

サービスの更新

Keeper Automatorサービスを停止/開始する場合、あるいはサーバーを再起動する場合は、Keeper Commanderを使用してサービスエンドポイントを再初期化する必要がある場合があります。

automator setup "My Automator"
automator init "My Automator"
automator enable "My Automator"

トラブルシューティング

サービスが始まらない

Keeper Automatorのログを確認してください。通常これで問題がわかります。Linuxではログはインストールディレクトリにあります。

常に承認のプロンプトが表示される

Keeper Automatorサービスを再設定する際、Keeper Commanderを使用してサービスエンドポイントを再初期化する必要がある場合があります。Keeper Commanderについてはこちらをご覧ください。

Keeper CommanderでAutomatorインスタンスを再初期化するのに必要なコマンドは以下のとおりです。

$ keeper shell

My Vault> automator list
288797895952179 My Automator True https://something.company.com 

(find the Name corresponding to your Automator)

My Vault> automator setup "My Automator"
My Vault> automator init "My Automator"
My Vault> automator enable "My Automator"

最終更新