此内容没有您所选择的语言版本。

16.4. Create password masks


The JBoss Password Tool maintains an encrypted password file jboss-as/bin/password/jboss_password_enc.dat. This file is encrypted using a key pair you provide to the password tool, and it contains the passwords that will be masked in configuration files. Passwords are stored and retrieved from this file by 'domain', an arbitrary unique identifier that you specify to the Password Tool when storing the password, and that you specify as part of the annotation that replaces that clear text password in configuration files. This allows the JBoss Application Server to retrieve the correct password from the file at run time.

Note

If you previously made the key store and encrypted key store password file readable only by the JBoss Application Server process owner, then you need to perform the following procedure as the JBoss Application Server process owner, or else make the keystore (jboss-as/bin/password/password.keystore) and encrypted key store password file (jboss-as/bin/password/jboss_keystore_pass.dat) readable by your user, and the encrypted passwords file jboss-as/bin/password/jboss_password_enc.dat (if it already exists) read and writable, while you perform this operation.

Procedure 16.4. Create password masks

  1. At the command line, change to the jboss-as/bin directory.
  2. Run the password tool, using the command ./password_tool.sh for Unix-based systems, or password_tool.bat for Windows-based systems.
    Result:

    The JBoss Password Tool will start, and will report 'Keystore is null. Please specify keystore below:'.

  3. Select '1:Specify KeyStore' by pressing 1 then Enter.
    Result:

    The password tool responds with 'Enter Keystore location including the file name'.

  4. Enter the path to the key store you created in Procedure 16.2, “Generate a key pair and key store for password masking”. You can specify an absolute path, or the path relative to jboss-as/bin. This should be password/password.keystore, unless you have performed an advanced installation and changed the defaults as per Section 16.6, “Changing the password masking defaults”.
    Result:

    The password tool responds with 'Enter Keystore alias'.

  5. Enter the key alias. This should be jboss, unless you have performed an advanced installation and changed the defaults as per Section 16.6, “Changing the password masking defaults”.
    Result:

    If the key store and key alias are accessible, the password tool will respond with some log4j WARNING messages, then the line 'Loading domains [', followed by any existing password masks, and the main menu.

  6. Select '2:Create Password' by pressing 2, then Enter
    Result:

    The password tool responds with: 'Enter security domain:'.

  7. Enter a name for the password mask. This is an arbitrary unique name that you will use to identify the password mask in configuration files.
    Result:

    The password tool responds with: 'Enter passwd:'.

  8. Enter the password that you wish to mask.
    Result:

    The password tool responds with: 'Password created for domain:mask name'

  9. Repeat the password mask creation process to create masks for all passwords you wish to mask.
  10. Exit the program by choosing '5:Exit'
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat