3장. 서버 및 관리 인터페이스의 사용자 보안


3.1. Elytron을 사용한 사용자 인증

3.1.1. 기본 설정

기본적으로 JBoss EAP 관리 인터페이스는 레거시 코어 관리 인증으로 보호됩니다.

예제: 기본 설정

/core-service=management/management-interface=http-interface:read-resource()
{
    "outcome" => "success",
    "result" => {
        "allowed-origins" => undefined,
        "console-enabled" => true,
        "http-authentication-factory" => undefined,
        "http-upgrade" => {"enabled" => true},
        "http-upgrade-enabled" => true,
        "sasl-protocol" => "remote",
        "secure-socket-binding" => undefined,
        "security-realm" => "ManagementRealm",
        "server-name" => undefined,
        "socket-binding" => "management-http",
        "ssl-context" => undefined
    }

JBoss EAP는 관리 인터페이스 보안을 위해 elytron 하위 시스템에서 management-http-authentication 및 management-sasl-authentication 을 제공합니다.

기본 Elytron 구성 요소를 사용하도록 JBoss EAP를 업데이트하려면 다음을 수행합니다.

  1. management-http -authentication을 사용하도록 http-authentication- factory 를 설정합니다.

    /core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory, value=management-http-authentication)
  2. management -sasl-authentication을 사용하는 Setsasl-authentication- factory:

    /core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade.sasl-authentication-factory, value=management-sasl-authentication)
  3. security-realm 을 undefine :

    /core-service=management/management-interface=http-interface:undefine-attribute(name=security-realm)
  4. 변경 사항을 적용하기 위해 JBoss EAP를 다시 로드합니다.
reload

이제 관리 인터페이스는 elytron 하위 시스템에서 제공하는 기본 구성 요소를 사용하여 보안을 설정합니다.

3.1.1.1. 기본 Elytron HTTP 인증 구성

예를 들어 웹 기반 관리 콘솔을 사용할 때 http를 통해 관리 인터페이스에 액세스하는 경우 JBoss EAP는 management-http-authentication http-authentication -factory를 사용합니다.

/subsystem=elytron/http-authentication-factory=management-http-authentication:read-resource()
{
    "outcome" => "success",
    "result" => {
        "http-server-mechanism-factory" => "global",
        "mechanism-configurations" => [{
            "mechanism-name" => "DIGEST",
            "mechanism-realm-configurations" => [{"realm-name" => "ManagementRealm"}]
        }],
        "security-domain" => "ManagementDomain"
    }
}

management-http-authentication http-authentication-factory는 ManagementDomain 보안 도메인을 사용하도록 구성됩니다.

/subsystem=elytron/security-domain=ManagementDomain:read-resource()
{
    "outcome" => "success",
    "result" => {
        "default-realm" => "ManagementRealm",
        "permission-mapper" => "default-permission-mapper",
        "post-realm-principal-transformer" => undefined,
        "pre-realm-principal-transformer" => undefined,
        "principal-decoder" => undefined,
        "realm-mapper" => undefined,
        "realms" => [
            {
                "realm" => "ManagementRealm",
                "role-decoder" => "groups-to-roles"
            },
            {
                "realm" => "local",
                "role-mapper" => "super-user-mapper"
            }
        ],
        "role-mapper" => undefined,
        "trusted-security-domains" => undefined
    }
}

ManagementDomain 보안 도메인은 속성 기반 영역인 ManagementRealm Elytron 보안 영역에서 지원합니다.

중요

속성 기반 영역은 서버가 시작될 때만 읽습니다. 수동으로 또는 add-user 스크립트를 사용하여 서버를 시작한 후에 추가된 사용자는 서버를 다시 로드해야 합니다. 이 다시 로드는 관리 CLI에서 reload 명령을 실행하여 수행합니다.

reload
/subsystem=elytron/properties-realm=ManagementRealm:read-resource()
{
    "outcome" => "success",
    "result" => {
        "groups-attribute" => "groups",
        "groups-properties" => {
            "path" => "mgmt-groups.properties",
            "relative-to" => "jboss.server.config.dir"
        },
        "plain-text" => false,
        "users-properties" => {
            "path" => "mgmt-users.properties",
            "relative-to" => "jboss.server.config.dir"
        }
    }
}

3.1.1.2. 기본 Elytron 관리 CLI 인증

기본적으로 관리 CLI(jboss-cli.sh)는 remote+http 를 통해 연결하도록 구성됩니다.

예제: 기본 jboss-cli.xml

<jboss-cli xmlns="urn:jboss:cli:3.1">

    <default-protocol use-legacy-override="true">remote+http</default-protocol>

    <!-- The default controller to connect to when 'connect' command is executed w/o arguments -->
    <default-controller>
        <protocol>remote+http</protocol>
        <host>localhost</host>
        <port>9990</port>
    </default-controller>

그러면 HTTP를 통한 연결이 설정되고 HTTP 업그레이드를 사용하여 통신 프로토콜을 Remoting 으로 변경합니다. HTTP 업그레이드 연결은 a sasl-authentication -factory를 사용하여 http-interface 의 http- upgrade 섹션에서 보호됩니다.

예제: 기본 구성 요소로 구성

/core-service=management/management-interface=http-interface:read-resource()
{
    "outcome" => "success",
    "result" => {
        "allowed-origins" => undefined,
        "console-enabled" => true,
        "http-authentication-factory" => "management-http-authentication",
        "http-upgrade" => {
            "enabled" => true,
            "sasl-authentication-factory" => "management-sasl-authentication"
        },
        "http-upgrade-enabled" => true,
        "sasl-protocol" => "remote",
        "secure-socket-binding" => undefined,
        "security-realm" => undefined,
        "server-name" => undefined,
        "socket-binding" => "management-http",
        "ssl-context" => undefined
    }
}

기본 sasl-authentication-factory는 management-sasl-authentication 입니다.

/subsystem=elytron/sasl-authentication-factory=management-sasl-authentication:read-resource()
{
    "outcome" => "success",
    "result" => {
        "mechanism-configurations" => [
            {
                "mechanism-name" => "JBOSS-LOCAL-USER",
                "realm-mapper" => "local"
            },
            {
                "mechanism-name" => "DIGEST-MD5",
                "mechanism-realm-configurations" => [{"realm-name" => "ManagementRealm"}]
            }
        ],
        "sasl-server-factory" => "configured",
        "security-domain" => "ManagementDomain"
    }
}

management-sasl-authentication sasl-authentication-factory는 JBOSS-LOCAL-USERDIGEST-MD5 메커니즘을 지정합니다.

DIGEST-MD5에 사용되는 ManagementRealm Elytron 보안 영역은 management- http-authentication http-authentication- factory에서 사용되는 영역과 같습니다.

예제: JBOSS-LOCAL-USER Realm

/subsystem=elytron/identity-realm=local:read-resource()
{
    "outcome" => "success",
    "result" => {
        "attribute-name" => undefined,
        "attribute-values" => undefined,
        "identity" => "$local"
    }
}

로컬 Elytron 보안 영역은 로컬 사용자에 대한 자동 인증을 처리하는 것입니다.

3.1.2. 새 ID 저장소로 관리 인터페이스 보안

  1. 보안 도메인 및 ID 저장소에 대해 지원하는 보안 영역, 디코더 또는 매퍼를 만듭니다.

    이 프로세스는 JBoss EAP의 Elytron subsystem 섹션에서 ID 관리 가이드를 구성하는 방법에 대해 설명합니다. 예를 들어 파일 시스템 기반 ID 저장소를 사용하여 관리 인터페이스를 보호하려면 파일 시스템 기반 ID 저장소로 인증 구성 단계를 따릅니다.

  2. http-authentication-factory or sasl-authentication-factory 를 만듭니다.

    예: http-authentication-factory

    /subsystem=elytron/http-authentication-factory=example-http-auth:add(http-server-mechanism-factory=global, security-domain=exampleSD, mechanism-configurations=[{mechanism-name=DIGEST, mechanism-realm-configurations=[{realm-name=exampleManagementRealm}]}])

    예: sasl-authentication-factory

    /subsystem=elytron/sasl-authentication-factory=example-sasl-auth:add(sasl-server-factory=configured, security-domain=exampleSD, mechanism-configurations=[{mechanism-name=DIGEST-MD5, mechanism-realm-configurations=[{realm-name=exampleManagementRealm}]}])

  3. 구성된 구성 가능-sasl-server-factory에 pattern- filter를 추가합니다.

    예제: 구성된 구성 가능-sasl-server-factory에 GSSAPI 추가

    /subsystem=elytron/configurable-sasl-server-factory=configured:list-add(name=filters, value={pattern-filter=GSSAPI})

    선택적 단계입니다. 클라이언트가 HTTP 관리 인터페이스에 연결하려고 하면 JBoss EAP는 401 Unauthorized 상태 코드와 지원되는 인증 메커니즘을 나열하는 일련의 헤더(예: Digest, GSSAPI 등)를 사용하여 HTTP 응답을 다시 보냅니다. 자세한 내용은 JBoss EAP 보안 아키텍처 가이드 의 HTTP 인터페이스로 로컬 및 원격 클라이언트 인증 섹션을 참조하십시오.

  4. http-authentication-factory or sasl-authentication-factory 를 사용하도록 관리 인터페이스를 업데이트합니다.

    예제: http-authentication-factory 업데이트

    /core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory, value=example-http-auth)
    
    reload

    예제: sasl-authentication-factory 업데이트

    /core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade.sasl-authentication-factory, value=example-sasl-auth)
    
    reload

    참고

    레거시 코어 관리 인증을 사용하는 경우 단일 레거시 보안 영역으로 http 관리 인터페이스만 보안할 수 있습니다. 이렇게 하면 HTTP 및 SASL 구성이 하나의 레거시 보안 영역에 강제로 표시됩니다. elytron 하위 시스템을 사용하는 경우 http-authentication-factory 및 sasl- authentication-factory 를 별도로 구성하여 http 관리 인터페이스의 HTTP 및 SASL 메커니즘을 보호하기 위해 개별 보안 도메인을 사용할 수 있습니다.

참고

레거시 보안과 Elytron에서 유사한 두 가지 특성이 관리 인터페이스에서 각각 구성된 경우 Elytron 관련 구성만 사용됩니다. 예를 들어 레거시 보안을 위한 security-realm 과 Elytron용 http-authentication-factory 가 구성된 경우 인증은 http-authentication-factory 구성으로 처리됩니다.

참고

관리 인터페이스에 HTTP 인터페이스의 http-authentication-factory, 또는 sasl-authentication-factorysecurity-realm 이 포함되고 ssl-context 특성이 사용되지 않는 경우 인증은 Elytron에서 처리하고 SSL은 레거시 보안 영역에 의해 처리됩니다.

관리 인터페이스에 security-realm 및 ssl- context 가 모두 포함되고 HTTP 인터페이스의 http- authentication-factory 또는sasl-authentication-factory 가 사용되지 않으면 기존 보안 영역에서 인증을 처리하고 SSL을 Elytron에서 처리합니다.

3.1.3. 음소거 인증 추가

기본적으로 JBoss EAP는 로컬 보안 영역을 통해 자동 인증이라고도 하는 로컬 사용자에 대한 인증 메커니즘을 제공합니다. 자세한 내용은 Silent 인증 섹션을 참조하십시오.

a sasl-authentication-factory 에 자동 인증을 추가해야 합니다.

existing sasl-authentication-factory 에 자동 인증을 추가하려면 다음을 수행합니다.

/subsystem=elytron/sasl-authentication-factory=example-sasl-auth:list-add(name=mechanism-configurations, value={mechanism-name=JBOSS-LOCAL-USER, realm-mapper=local})

reload

자동 인증을 사용하여 new sasl-server-factory 를 생성하려면 다음을 수행합니다.

/subsystem=elytron/sasl-authentication-factory=example-sasl-auth:add(sasl-server-factory=configured,security-domain=ManagementDomain,mechanism-configurations=[{mechanism-name=DIGEST-MD5,mechanism-realm-configurations=[{realm-name=exampleManagementRealm}]},{mechanism-name=JBOSS-LOCAL-USER, realm-mapper=local}])

reload
참고

위의 예제에서는 기존 ManagementDomain 보안 도메인을 사용하지만 다른 보안 도메인을 생성하고 사용할 수도 있습니다. JBoss EAP How to Configure Identity Management GuideElytron subsystem 섹션에서 보안 도메인을 생성하는 더 많은 예를 확인할 수 있습니다.

중요

Elytron 보안이 사용되고 인증 시도가 실제 ID에 일치하지 않는 인증 이름과 JBOSS-LOCAL-USER SASL 메커니즘을 사용하면 인증에 실패합니다.

기존 보안 하위 시스템에서 JBOSS-LOCAL-USER 에 대한 사용자 지정 사용자 이름을 선택할 수 있습니다. 여기에서 사용자 이름을 특수 ID에 매핑하여 인증이 진행됩니다.

3.1.4. 인증된 관리 사용자의 ID 매핑

elytron 하위 시스템을 사용하여 관리 인터페이스를 보호하는 경우 인증된 사용자의 ID 매핑을 위한 관리 인터페이스에 보안 도메인을 제공할 수 있습니다. 이렇게 하면 인증된 사용자가 관리 인터페이스에 로그인할 때 적절한 ID로 표시할 수 있습니다.

애플리케이션 서버에서 두 가지 이상의 유형의 관리 인터페이스를 노출합니다. 각 유형의 인터페이스를 독립 인증 팩토리와 연결하여 해당 인터페이스의 인증 요구 사항을 처리할 수 있습니다.

권한 부여 결정을 내리기 위해 보안 도메인에서 현재 보안 ID를 가져옵니다. 반환된 보안 ID에는 해당 보안 도메인 내에 정의된 규칙에 따라 역할 매핑 및 권한 할당이 있습니다.

참고

대부분의 경우 공통 보안 도메인은 모든 관리에 사용됩니다. 관리 인터페이스 인증은 물론 권한 결정에 사용되는 보안 ID를 획득하는 데 사용됩니다. 이 경우 보안 도메인은 관리 인터페이스의 인증 팩토리와 연결되며 특별한 access=identity 를 정의할 필요가 없습니다.

권한 결정에 대한 ID를 가져오는 데 다른 보안 도메인을 사용하는 경우도 있습니다. 여기에서 access=identity 리소스가 정의됩니다. 권한 부여를 위해 ID를 가져오기 위한 보안 도메인에 대한 참조가 포함되어 있습니다.

아래 예제에서는 example SD Elytron 보안 도메인을 사용하여 관리 인터페이스를 보안했으며 example ManagementRealm 으로 노출한다고 가정합니다.

ID 매핑을 정의하려면 ID 리소스를 관리 인터페이스에 추가합니다.

예제: ID 리소스 추가

/core-service=management/access=identity:add(security-domain=exampleSD)

identity 리소스를 추가했으면 관리 인터페이스에 액세스할 때 인증된 사용자의 ID가 표시됩니다. identity 리소스를 추가하지 않으면 인증에 사용되는 보안 도메인의 ID가 사용됩니다.

예를 들어, 관리 CLI에 user1 로 로그인한 경우 ID가 올바르게 표시됩니다.

예제: 관리 CLI에서 인증된 사용자의 ID 표시

:whoami
{
    "outcome" => "success",
    "result" => {"identity" => {"username" => "user1"}}
}

중요

ID 리소스가 추가되고 레거시 보안 영역이 관리 인터페이스를 보호하는 데 사용되는 경우 인증된 사용자에게 항상 익명 ID가 있습니다. Identity 리소스를 제거하면 레거시 보안 영역에서 인증된 사용자가 적절한 ID와 함께 표시됩니다.

관리 작업에 대한 권한 부여는 항상 access=identity 에 지정된 도메인인 보안 도메인을 사용합니다. 지정하지 않으면 인증에 사용되는 도메인입니다. 모든 역할 매핑은 항상 보안 도메인의 컨텍스트에 있습니다.

현재 요청에 대한 ID 리소스는 Elytron 구성을 사용하여 매핑된 역할 집합을 반환합니다. RBAC 기반 역할 매핑 정의가 사용 중인 경우 identity 리소스의 역할을 그룹으로 가져와 현재 요청에 대한 관리 역할을 가져옵니다.

Expand
표 3.1. 다양한 시나리오에 사용할 ID
시나리오access=identity 정의 없음access=Elytron 보안 도메인을 참조하는 ID

레거시 security-realm을 사용하는 HTTP 관리 인터페이스

연결에서 ID.

지원되지 않거나 익명 ID.

security-domain에서 지원하는 elytron HTTP 인증 팩토리를 사용하는 HTTP 관리 인터페이스

연결에서 ID.

성공적으로 유입된 경우 참조된 security-domain 의 ID입니다.

HTTP 업그레이드를 포함한 네이티브 관리, 레거시 보안 영역사용 인터페이스

연결에서 ID.

지원되지 않거나 익명 ID.

HTTP 업그레이드를 포함한 네이티브 관리, 보안 도메인에서 지원하는 elytron SASL 인증 팩토리를 사용한 인터페이스

연결에서 ID.

성공적으로 유입된 경우 참조된 security-domain 의 ID입니다.

참고

ID 리소스에 사용된 보안 도메인이 인증에서 보안 도메인을 신뢰하지 않으면 익명 ID가 사용됩니다.

둘 다 동일한 보안 영역을 사용하는 경우 ID 리소스에 사용되는 보안 도메인은 인증에서 보안 도메인을 신뢰할 필요가 없습니다.

신뢰할 수 있는 보안 도메인이 전이식이 아닙니다.

access=identity 리소스를 정의하지 않은 경우 관리 인터페이스에 대해 인증 중에 설정한 ID가 사용됩니다. 연결을 사용하여 설정된 ID는 원격 하위 시스템을 통해 또는 애플리케이션을 사용하는 경우 사용할 수 없습니다.

access=identity 리소스가 정의되지만 관리 인터페이스에서 사용하는 보안 도메인은 다르며, 수신할 도메인 목록에 나열되지 않은 경우 ID가 설정되지 않습니다. 인증 중에 설정한 ID를 사용하여 inflow가 시도됩니다. 원격 하위 시스템을 통해 또는 애플리케이션을 사용하는 연결을 사용하여 설정된 ID는 이러한 방식으로 유입되지 않습니다.

중요

레거시 보안 영역을 사용하여 관리 인터페이스를 보호하는 경우 다양한 보안 도메인에서 ID를 분리할 수 없습니다. 이 경우 access=identity 리소스를 정의하지 않아야 합니다. 따라서 인증 중에 설정한 ID를 직접 사용할 수 있습니다. 따라서 PicketBox를 사용하여 보안된 애플리케이션은 ID 리소스에 대해 지원되지 않습니다.

3.1.5. 관리 CLI로 Elytron 클라이언트 사용

JBoss EAP에 연결할 때 보안 정보를 제공하기 위해 Elytron Client를 사용하도록 관리 CLI를 구성할 수 있습니다.

  1. Elytron을 사용하여 관리 인터페이스 보안.

    관리 CLI와 함께 Elytron 클라이언트를 사용하려면 Elytron을 사용하여 관리 인터페이스를 보안해야 합니다. Elytron을 사용하여 사용자 인증에서 Elytron을 사용하여 관리 인터페이스 보안에 대한 자세한 내용을 확인할 수 있습니다.

  2. Elytron 클라이언트 구성 파일을 만듭니다.

    인증 구성이 있는 Elytron 클라이언트 구성 파일과 해당 구성을 사용하는 규칙을 만들어야 합니다. 인증 구성 생성에 대한 자세한 내용은 JBoss EAP How to Configure Identity Management GuideThe Configuration File Approach 섹션에서 확인할 수 있습니다.

    예: custom-config.xml

    <configuration>
        <authentication-client xmlns="urn:elytron:client:1.2">
            <authentication-rules>
                <rule use-configuration="configuration1">
                    <match-host name="localhost" />
                </rule>
            </authentication-rules>
            <authentication-configurations>
                <configuration name="configuration1">
                    <sasl-mechanism-selector selector="DIGEST-MD5" />
                    <providers>
                      <use-service-loader />
                    </providers>
                    <set-user-name name="user1" />
                    <credentials>
                        <clear-password password="password123" />
                    </credentials>
                    <set-mechanism-realm name="exampleManagementRealm" />
                 </configuration>
            </authentication-configurations>
        </authentication-client>
    </configuration>

  3. 관리 CLI 스크립트와 함께 Elytron 클라이언트 구성 파일을 사용합니다.

    $ ./jboss-cli.sh -c  -Dwildfly.config.url=/path/to/custom-config.xml
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2026 Red Hat
맨 위로 이동