3장. Barbican 설치


Barbican은 Red Hat OpenStack Platform에서 기본적으로 활성화되어 있지 않습니다. 다음 절차에서는 기존 OpenStack 배포에 barbican을 배포하는 방법을 설명합니다. Barbican은 컨테이너화된 서비스로 실행되므로 이 절차에서는 새 컨테이너 이미지를 준비하고 업로드하는 방법도 설명합니다.

참고

이 절차에서는 simple_crypto 백엔드를 사용하도록 barbican을 구성합니다. PKCS11 및 DogTag와 같은 추가 백엔드는 사용할 수 있지만 이 릴리스에서는 지원되지 않습니다.

  1. 언더클라우드 노드에서 barbican의 환경 파일을 생성합니다. 그러면 director에 barbican을 설치합니다( openstack overcloud deploy […​]에 포함된 경우)

    $ cat /home/stack/configure-barbican.yaml
    	parameter_defaults:
    	  BarbicanSimpleCryptoGlobalDefault: true
    Copy to Clipboard Toggle word wrap
    • BarbicanSimpleCryptoGlobalDefault - 이 플러그인을 글로벌 기본 플러그인으로 설정합니다.
    • 추가 옵션도 구성할 수 있습니다.

      • BarbicanPassword - barbican 서비스 계정의 암호를 설정합니다.
      • BarbicanWorkers - barbican::wsgi::apache 의 작업자 수를 설정합니다. 기본적으로 '%{::processorcount}' 를 사용합니다.
      • BarbicanDebug - 디버깅을 활성화합니다.
      • BarbicanPolicies - barbican에 대해 구성할 정책을 정의합니다. 예를 들어 { barbican-context_is_admin: { key: context_is_admin, value: 'role:admin' } } 와 같은 해시 값을 사용합니다. 그러면 이 항목이 /etc/barbican/policy.json 에 추가됩니다. 정책은 이후 섹션에서 자세히 설명합니다.
      • BarbicanSimpleCryptoKek - 지정된 항목이 없는 경우 director에서 키 암호화 키(KEK)가 생성됩니다.
  2. 이 단계에서는 barbican을 위해 새 컨테이너 이미지를 준비합니다. configure-barbican.yaml 및 모든 관련 템플릿 파일을 포함해야 합니다. 배포에 맞게 다음 예제를 변경합니다.

    $ openstack overcloud container image prepare \
    	--namespace example.lab.local:5000/rhosp13 \
    	--tag 2018-06-06.1 \
    	--push-destination 192.168.100.1:8787 \
    	--output-images-file ~/container-images-with-barbican.yaml \
    	-e /home/stack/virt/config_lvm.yaml \
    	-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
    	-e /home/stack/virt/network/network-environment.yaml \
    	-e /home/stack/virt/hostnames.yml \
    	-e /home/stack/virt/nodes_data.yaml \
    	-e /home/stack/virt/extra_templates.yaml \
    	-e /home/stack/virt/docker-images.yaml \
    	-e /usr/share/openstack-tripleo-heat-templates/environments/services/barbican.yaml \
    	-e /usr/share/openstack-tripleo-heat-templates/environments/barbican-backend-simple-crypto.yaml \
    	-e /home/stack/configure-barbican.yaml
    Copy to Clipboard Toggle word wrap
  3. 새 컨테이너 이미지를 언더클라우드 레지스트리에 업로드합니다.

    $ openstack overcloud container image upload --debug --config-file container-images-with-barbican.yaml
    Copy to Clipboard Toggle word wrap
  4. 새 환경 파일을 준비합니다.

    $ openstack overcloud container image prepare \
      --tag 2018-06-06.1 \
      --namespace 192.168.100.1:8787/rhosp13 \
      --output-env-file ~/container-parameters-with-barbican.yaml \
      -e /home/stack/virt/config_lvm.yaml \
      -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
      -e /home/stack/virt/network/network-environment.yaml \
      -e /home/stack/virt/hostnames.yml \
      -e /home/stack/virt/nodes_data.yaml \
      -e /home/stack/virt/extra_templates.yaml \
      -e /home/stack/virt/docker-images.yaml \
      -e /usr/share/openstack-tripleo-heat-templates/environments/services/barbican.yaml \
      -e /usr/share/openstack-tripleo-heat-templates/environments/barbican-backend-simple-crypto.yaml \
      -e /home/stack/configure-barbican.yaml
    Copy to Clipboard Toggle word wrap
  5. 이러한 변경 사항을 배포에 적용하려면 오버클라우드를 업데이트하고 이전 openstack overcloud deploy […​] 에서 사용한 모든 heat 템플릿 파일을 지정합니다. 예를 들면 다음과 같습니다.

    $ openstack overcloud deploy \
        --timeout 100 \
        --templates /usr/share/openstack-tripleo-heat-templates \
        --stack overcloud \
        --libvirt-type kvm \
        --ntp-server clock.redhat.com \
        -e /home/stack/virt/config_lvm.yaml \
        -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
        -e /home/stack/virt/network/network-environment.yaml \
        -e /home/stack/virt/hostnames.yml \
        -e /home/stack/virt/nodes_data.yaml \
        -e /home/stack/virt/extra_templates.yaml \
        -e /home/stack/container-parameters-with-barbican.yaml \
        -e /usr/share/openstack-tripleo-heat-templates/environments/services/barbican.yaml \
        -e /usr/share/openstack-tripleo-heat-templates/environments/barbican-backend-simple-crypto.yaml \
        -e /home/stack/configure-barbican.yaml \
        --log-file overcloud_deployment_38.log
    Copy to Clipboard Toggle word wrap

3.1. Overcloud의 creator 역할에 사용자 추가

사용자는 barbican 시크릿을 생성하고 편집하려면 creator 역할의 멤버여야 하며, barbican에 자신의 시크릿을 저장하는 암호화된 볼륨을 생성해야 합니다.

  1. creator 역할의 id 를 검색합니다.

    openstack role show creator
    +-----------+----------------------------------+
    | Field     | Value                            |
    +-----------+----------------------------------+
    | domain_id | None                             |
    | id        | 4e9c560c6f104608948450fbf316f9d7 |
    | name      | creator                          |
    +-----------+----------------------------------+
    Copy to Clipboard Toggle word wrap
    참고

    OpenStack Key Manager(barbican)가 설치되어 있지 않으면 creator 역할이 표시되지 않습니다.

  2. 사용자를 작성자 역할에 할당하고 관련 프로젝트를 지정합니다. 이 예제에서는 project_a 프로젝트에서 user1 이라는 사용자가 creator 역할에 추가됩니다.

    openstack role add --user user1 --project project_a 4e9c560c6f104608948450fbf316f9d7
    Copy to Clipboard Toggle word wrap

3.1.1. 테스트 barbican 기능

이 섹션에서는 바비카가 제대로 작동하는지 테스트하는 방법에 대해 설명합니다.

  1. 테스트 시크릿을 생성합니다. 예를 들면 다음과 같습니다.

    $ openstack secret store --name testSecret --payload 'TestPayload'
    +---------------+------------------------------------------------------------------------------------+
    | Field         | Value                                                                              |
    +---------------+------------------------------------------------------------------------------------+
    | Secret href   | https://192.168.123.163/key-manager/v1/secrets/4cc5ffe0-eea2-449d-9e64-b664d574be53 |
    | Name          | testSecret                                                                         |
    | Created       | None                                                                               |
    | Status        | None                                                                               |
    | Content types | None                                                                               |
    | Algorithm     | aes                                                                                |
    | Bit length    | 256                                                                                |
    | Secret type   | opaque                                                                             |
    | Mode          | cbc                                                                                |
    | Expiration    | None                                                                               |
    +---------------+------------------------------------------------------------------------------------+
    Copy to Clipboard Toggle word wrap
  2. 방금 생성한 보안에 대한 페이로드를 검색합니다.

    openstack secret get https://192.168.123.163/key-manager/v1/secrets/4cc5ffe0-eea2-449d-9e64-b664d574be53 --payload
    +---------+-------------+
    | Field   | Value       |
    +---------+-------------+
    | Payload | TestPayload |
    +---------+-------------+
    Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat