1.5. WildFly Elytron 툴을 사용한 인증 정보 저장소 작업


WildFly Elytron 툴을 사용하여 인증 정보 저장소에서 오프라인에서 다양한 작업을 수행할 수 있습니다.

1.5.1. WildFly Elytron 툴을 사용하여 인증 정보 저장소 생성

Elytron에서는 모든 인증 정보 유형을 저장할 수 있는 인증 정보 저장소를 오프라인으로 생성할 수 있습니다.

프로세스

  • 다음 명령과 함께 WildFly Elytron 툴을 사용하여 인증 정보 저장소를 생성합니다.

    구문

    $ EAP_HOME/bin/elytron-tool.sh credential-store --create --location "<path_to_store_file>" --password <store_password>

    예제

    $ EAP_HOME/bin/elytron-tool.sh credential-store --create --location "../cred_stores/example-credential-store.jceks" --password storePassword
    Credential Store has been successfully created

    명령에 저장소 암호를 포함하지 않으려면 인수를 생략한 다음 프롬프트에 암호를 수동으로 입력합니다. WildFly Elytron 툴에서 생성된 마스크된 암호를 사용할 수도 있습니다. 마스크된 암호를 생성하는 방법에 대한 자세한 내용은 WildFly Elytron 도구를 사용하여 마스킹된 암호화된 문자열 생성을 참조하십시오.

1.5.2. Bouncy Castle 공급자를 사용하여 인증 정보 저장소 생성

Bouncy Castle 공급자를 사용하여 인증 정보 저장소를 생성합니다.

사전 요구 사항

  • Bouncy Castle을 사용하도록 환경이 구성되어 있는지 확인합니다.
참고

동일한 Elytron 기능을 구현하므로 credential-storesecret-key-credential-store 에 대해 동일한 이름을 가질 수 없습니다. org.wildfly.security.credential-store.

프로세스

  1. Bouncy Castle FIPS 키 저장소(BCFKS) 키 저장소를 정의합니다. FIPS는 연방 정보 처리 표준을 나타냅니다. 이미 가지고 있는 경우 다음 단계로 이동합니다.

    $ keytool -genkeypair -alias <key_pair_alias> -keyalg <key_algorithm> -keysize <key_size> -storepass <key_pair_and_keystore_password> -keystore <path_to_keystore> -storetype BCFKS -keypass <key_pair_and_keystore_password>
    중요

    키 저장소 keypassstorepass 속성이 동일한지 확인합니다. 그렇지 않은 경우 elytron 하위 시스템의 BCFKS 키 저장소는 정의할 수 없습니다.

  2. credential-store 에 대한 시크릿 키를 생성합니다.

    $ keytool -genseckey -alias <key_alias> -keyalg <key_algorithm> -keysize <key_size> -keystore <path_to_keystore> -storetype BCFKS -storepass <key_and_keystore_password> -keypass <key_and_keystore_password>
  3. 다음 명령과 함께 WildFly Elytron 툴을 사용하여 credential-store 를 정의합니다.

    $ EAP_HOME/bin/elytron-tool.sh credential-store -c -a <alias> -x <alias_password> -p <key_and_keystore_password> -l <path_to_keystore> -u "keyStoreType=BCFKS;external=true;keyAlias=<key_alias>;externalPath=<path_to_credential_store>"

1.5.3. WildFly Elytron 툴을 사용하여 secret-key-credential-store 생성

Elytron에서는 SecretKeyCredential 인스턴스를 저장할 수 있는 secret-key-credential-store 를 오프라인으로 생성할 수 있습니다.

프로세스

  • 다음 명령과 함께 WildFly Elytron 툴을 사용하여 PropertiesCredentialStore를 생성합니다.

    구문

    $ EAP_HOME/bin/elytron-tool.sh credential-store --create --location "<path_to_store_file>" --type PropertiesCredentialStore

    예제

    $ bin/elytron-tool.sh credential-store --create --location=standalone/configuration/properties-credential-store.cs --type PropertiesCredentialStore
    Credential Store has been successfully created

1.5.4. WildFly Elytron 툴 인증 정보 저장소 작업

다음을 포함하여 WildFly Elytron 툴을 사용하여 다양한 인증 정보 저장소 작업을 수행할 수 있습니다.

암호 인증 정보 추가

다음 WildFly Elytron 툴 명령을 사용하여 인증 정보 저장소에 PasswordCredential를 추가할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "<path_to_store_file>" --password <store_password> --add <alias> --secret <sensitive_string>

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "../cred_stores/example-credential-store.jceks" --password storePassword --add examplePasswordCredential --secret speci@l_db_pa$$_01
Alias "examplePasswordCredential" has been successfully stored

시크릿을 명령에 배치하지 않으려면 인수를 생략한 다음 메시지가 표시되면 수동으로 보안을 입력합니다.

SecretKeyCredential 생성

다음 WildFly Elytron 툴 명령을 사용하여 인증 정보 저장소에 SecretKeyCredential를 추가할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --generate-secret-key=example --location=<path_to_the_credential_store> --password <store_password>

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --generate-secret-key=example --location "../cred_stores/example-credential-store.jceks" --password storePassword
Alias "example" has been successfully stored

시크릿을 명령에 배치하지 않으려면 인수를 생략한 다음 메시지가 표시되면 수동으로 보안을 입력합니다.

기본적으로 JBoss EAP에 SecretKeyCredential를 생성할 때 256비트 시크릿 키를 생성합니다. 크기를 변경하려면 각각 128비트 또는 192-bit 키를 만들기 위해 --size=128 또는 --size=192 를 지정할 수 있습니다.

SecretKeyCredential 가져오기

다음 WildFLy Elytron 툴 명령을 사용하여 SecretKeyCredential를 가져올 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --import-secret-key=imported --location=<path_to_credential_store> --password=<store_password>

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --import-secret-key=imported --location=../cred_stores/example-credential-store.jceks --password=storePassword

가져올 시크릿 키를 입력합니다.

모든 인증 정보 나열

다음 WildFly Elytron 툴 명령을 사용하여 credentials -store의 인증 정보를 나열할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "<path_to_store_file>" --password <store_password> --aliases

예제:

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "../cred_stores/example-credential-store.jceks" --password storePassword --aliases
Credential store contains following aliases: examplepasswordcredential example

별칭이 있는지 확인

다음 명령을 사용하여 인증 정보 저장소에 별칭이 있는지 확인합니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "<path_to_store_file>" --password <store_password> --exists <alias>

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "../cred_stores/example-credential-store.jceks" --password storePassword --exists examplepasswordcredential
Alias "examplepasswordcredential" exists

SecretKeyCredential 내보내기

다음 명령을 사용하여 인증 정보 저장소 에서 SecretKeyCredential를 내보낼 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --export-secret-key=<alias> --location=<path_to_credential_store> --password=storePassword

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --export-secret-key=example --location=../cred_stores/example-credential-store.jceks --password=storePassword
Exported SecretKey for alias example=RUxZAUtBiAnoLP1CA+i6DtcbkZHfybBJxPeS9mlVOmEYwjjmEA==

인증 정보 제거

다음 명령을 사용하여 인증 정보 저장소에서 인증 정보를 제거할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "<path_to_store_file>" --password <store_password> --remove <alias>

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "../cred_stores/example-credential-store.jceks" --password storePassword --remove examplepasswordcredential
Alias "examplepasswordcredential" has been successfully removed

1.5.5. Wildfly Elytron 툴 secret-key-credential-store 작업

WildFly Elytron 툴을 사용하여 SecretKeyCredential에 대해 다음 secret-key-credential-store 작업을 수행할 수 있습니다.

SecretKeyCredential 생성

다음 WildFly Elytron 툴 명령을 사용하여 secret-key-credential-store 에서 SecteKeyCredential 를 생성할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --generate-secret-key=example --location "<path_to_the_credential_store>" --type PropertiesCredentialStore

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --generate-secret-key=example --location "standalone/configuration/properties-credential-store.cs" --type PropertiesCredentialStore
Alias "example" has been successfully stored

SecretKeyCredential 가져오기

다음 WildFLy Elytron 툴 명령을 사용하여 SecretKeyCredential를 가져올 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --import-secret-key=imported --location=<path_to_credential_store> --type PropertiesCredentialStore

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --import-secret-key=imported --location "standalone/configuration/properties-credential-store.cs" --type PropertiesCredentialStore

모든 인증 정보 나열

다음 WildFly Elytron 툴 명령을 사용하여 secret-key-credential-store 의 인증 정보를 나열할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "<path_to_store_file>"  --aliases --type PropertiesCredentialStore

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store  --location "standalone/configuration/properties-credential-store.cs" --aliases --type PropertiesCredentialStore
Credential store contains following aliases: example

SecretKeyCredential 내보내기

다음 명령을 사용하여 secret-key-credential-store 에서 SecretKeyCredential를 내보낼 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --export-secret-key=<alias> --location "<path_to_credential_store>"  --type PropertiesCredentialStore

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --export-secret-key=example --location "standalone/configuration/properties-credential-store.cs" --type PropertiesCredentialStore
Exported SecretKey for alias example=RUxZAUt1EZM7PsYRgMGypkGirSel+5Eix4aSgwop6jfxGYUQaQ==

인증 정보 제거

다음 명령을 사용하여 인증 정보 저장소에서 인증 정보를 제거할 수 있습니다.

구문

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "<path_to_store_file>" --remove <alias> --type PropertiesCredentialStore

예제

$ EAP_HOME/bin/elytron-tool.sh credential-store --location "standalone/configuration/properties-credential-store.cs"  --remove example --type PropertiesCredentialStore
Alias "example" has been successfully removed

WildFly Elytron 툴을 사용하여 인증 정보 저장소를 생성한 후 실행 중인 JBoss EAP 서버에 추가할 수 있습니다.

사전 요구 사항

프로세스

  • 다음 관리 CLI 명령을 사용하여 실행 중인 JBoss EAP 서버에 인증 정보 저장소를 추가합니다.

    구문

    /subsystem=elytron/credential-store=<store_name>:add(location="<path_to_store_file>",credential-reference={clear-text=<store_password>})

    예제

    /subsystem=elytron/credential-store=my_store:add(location="../cred_stores/example-credential-store.jceks",credential-reference={clear-text=storePassword})

JBoss EAP 구성에 인증 정보 저장소를 추가한 후 credentials -reference 특성을 사용하여 인증 정보 저장소에 저장된 암호 또는 민감한 문자열을 참조할 수 있습니다.

자세한 내용은 사용 가능한 옵션의 자세한 목록은 EAP_HOME/bin/elytron-tool.sh credential-store --help 명령을 사용하십시오.

1.5.7. WildFly Elytron 툴 키 쌍 관리 작업

다음 인수를 사용하여 elytron-tool.sh 를 작동하여 인증 정보 저장소의 별칭 아래에 저장할 수 있는 새 키 쌍 생성과 같은 인증 정보 저장소를 조작할 수 있습니다.

키 쌍 생성

generate-key-pair 명령을 사용하여 키 쌍을 만듭니다. 그런 다음 인증 정보 저장소의 별칭 아래에 키 쌍을 저장할 수 있습니다. 다음 예제에서는 인증 정보 저장소에 지정된 위치에 저장된 3072 비트의 할당된 크기가 있는 RSA 키 쌍 생성을 보여줍니다. 키 쌍에 지정된 별칭은 예입니다.

$ EAP_HOME/bin/elytron-tool.sh credential-store --location=<path_to_store_file> --generate-key-pair example --algorithm RSA --size 3072
키 쌍 가져오기

import-key-pair 명령을 사용하여 기존 SSH 키 쌍을 지정된 별칭이 있는 인증 정보 저장소로 가져옵니다. 다음 예제에서는 OpenSSH 형식의 개인 키가 포함된 /home/user/.ssh/id_rsa 파일에서 example 의 별칭이 있는 키 쌍을 가져옵니다.

$ EAP_HOME/bin/elytron-tool.sh credential-store --import-key-pair example --private-key-location /home/user/.ssh/id_rsa --location=<path_to_store_file>
키 쌍 내보내기

export-key-pair-public-key 명령을 사용하여 키 쌍의 공개 키를 표시합니다. 공개 키의 OpenSSH 형식에는 별칭이 지정됩니다. 다음 예제에서는 별칭 예제에 대한 공개 키를 표시합니다.

$ EAP_HOME/bin/elytron-tool.sh credential-store --location=<path_to_store_file> --export-key-pair-public-key example

Credential store password:
Confirm credential store password:
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMfncZuHmR7uglb0M96ieArRFtp42xPn9+ugukbY8dyjOXoi
cZrYRyy9+X68fylEWBMzyg+nhjWkxJlJ2M2LAGY=
참고

export-key-pair-public-key 명령을 실행한 후 인증 정보 저장소 암호를 입력하라는 메시지가 표시됩니다. 암호가 없는 경우 프롬프트를 비워 둡니다.

1.5.8. Elytron 구성 파일에서 저장된 키 쌍 사용 예

키 쌍은 두 개의 개별 키이지만 일치하는 암호화 키(공개 키와 개인 키)로 구성됩니다. 키 쌍을 elytron 구성 파일에서 참조하려면 인증 정보 저장소에 키 쌍을 저장해야 합니다. 그런 다음 Git에 독립 실행형 서버 구성 데이터를 관리할 수 있는 액세스 권한을 제공할 수 있습니다.

다음 예제에서는 인증 정보 저장소와 해당 속성을 elytron 구성 파일의 < credential-stores > 요소에서 참조합니다. & lt;credential > 요소는 인증 정보 저장소와 키 쌍을 저장하는 별칭을 참조합니다.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <authentication-client xmlns="urn:elytron:client:1.6">

     <credential-stores>
        <credential-store name="${credential_store_name}">
           <protection-parameter-credentials>
              <clear-password password="${credential_store_password}"/>
           </protection-parameter-credentials>
           <attributes>
              <attribute name="path" value="${path_to_credential_store}"/>
           </attributes>
        </credential-store>
     </credential-stores>

     <authentication-rules>
        <rule use-configuration="${configuration_file_name}"/>
     </authentication-rules>

     <authentication-configurations>
        <configuration name="${configuration_file_name}">
           <credentials>
              <credential-store-reference store="${credential_store_name}" alias="${alias_of_key_pair}"/>
           </credentials>
        </configuration>
     </authentication-configurations>

  </authentication-client>
</configuration>

elytron 구성 파일을 구성한 후 SSH 인증에 키 쌍을 사용할 수 있습니다.

1.5.9. WildFly Elytron 툴을 사용하여 마스크된 암호화된 문자열 생성

WildFly Elytron 툴을 사용하여 인증 정보 저장소의 일반 텍스트 암호 대신 사용할 암호화된 문자열을 생성할 수 있습니다.

프로세스

  • 마스크된 문자열을 생성하려면 다음 명령을 사용하고 salt 및 반복 횟수에 대한 값을 제공합니다.

    $ EAP_HOME/bin/elytron-tool.sh mask --salt <salt> --iteration <iteration_count> --secret <password>

    예를 들면 다음과 같습니다.

    $ EAP_HOME/bin/elytron-tool.sh mask --salt 12345678 --iteration 123 --secret supersecretstorepassword
    
    MASK-8VzWsSNwBaR676g8ujiIDdFKwSjOBHCHgnKf17nun3v;12345678;123

    명령에 보안을 제공하지 않으려면 해당 인수를 생략하면 표준 입력을 사용하여 수동으로 시크릿을 입력하라는 메시지가 표시됩니다.

자세한 내용은 사용 가능한 옵션의 자세한 목록은 EAP_HOME/bin/elytron-tool.sh mask --help 명령을 사용하십시오.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동