1장. ID 저장소 구성
1.1. 집계 영역 생성 링크 복사링크가 클립보드에 복사되었습니다!
1.1.1. Elytron의 집계 영역 링크 복사링크가 클립보드에 복사되었습니다!
집계 영역, 집계-realm 을 사용하면 인증 및 다른 보안 영역 또는 Elytron의 승인을 위해 여러 보안 영역의 집계를 위해 하나의 보안 영역을 사용할 수 있습니다.
예를 들어, 파일 시스템 을 사용하도록 집계-realm을 구성할 수 있습니다.
-realm의 인증 및 집계 에 ldap-realm 을 사용하고 승인을 위해 ldap-realm
ID는 다음과 같이 여러 권한 부여 영역으로 구성된 집계 영역에서 생성됩니다.
- 각 권한 부여 영역의 속성 값이 로드됩니다.
- 속성이 두 개 이상의 권한 부여 영역에 정의된 경우 처음 생성된 속성 값이 사용됩니다.
다음 예제에서는 여러 권한 부여 영역에 동일한 ID 속성에 대한 정의가 포함된 경우 ID가 생성되는 방법을 보여줍니다.
집계 영역 구성의 예
/subsystem=elytron/aggregate-realm=exampleSecurityRealm:add(authentication-realm=exampleLDAPRealm,authorization-realms=[exampleLDAPRealm,exampleFileSystemRealm])
/subsystem=elytron/aggregate-realm=exampleSecurityRealm:add(authentication-realm=exampleLDAPRealm,authorization-realms=[exampleLDAPRealm,exampleFileSystemRealm])
이 예제에서 구성된 aggregate-realm 은 LDAP 영역인 "exampleLDAPRealm"과 파일 시스템 영역인 "exampleFilesystemRealm"이라는 두 개의 기존 보안 영역을 참조합니다.
LDAP 영역에서 얻은 속성 값입니다.
mail: administrator@example.com telephoneNumber: 0000 0000
mail: administrator@example.com telephoneNumber: 0000 0000Copy to Clipboard Copied! Toggle word wrap Toggle overflow 파일 시스템 영역에서 얻은 속성 값입니다.
mail: user@example.com website: http://www.example.com/
mail: user@example.com website: http://www.example.com/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
집계 영역에서 얻은 결과 ID:
mail: administrator@example.com telephoneNumber: 0000 0000 website: http://www.example.com/
mail: administrator@example.com
telephoneNumber: 0000 0000
website: http://www.example.com/
예제 aggregate-realm 은 LDAP 영역이 파일 시스템 영역보다 먼저 참조되므로 LDAP 영역에 정의된 속성의 값을 사용합니다.
1.1.2. 집계 영역에 필요한 보안 영역을 생성하는 예 링크 복사링크가 클립보드에 복사되었습니다!
다음 예제에서는 ldap-realm 및 filesystem-realm 생성을 보여줍니다. 이러한 보안 영역은 집계- 현지에서 참조할 수 있습니다.
1.1.2.1. Elytron 예제에서 ldap-realm 생성 링크 복사링크가 클립보드에 복사되었습니다!
LDAP(Lightweight Directory Access Protocol) ID 저장소에서 지원하는 Elytron 보안 영역을 생성하여 JBoss EAP 서버 인터페이스 또는 서버에 배포된 애플리케이션을 보호합니다.
이 절차의 예에서는 다음 LDAP Data Interchange Format(LDIF)이 사용됩니다.
예제에 사용되는 LDAP 연결 매개변수는 다음과 같습니다.
-
LDAP URL:
ldap://10.88.0.2 LDAP 관리자 암호:
secretElytron은 LDAP 서버와 연결하려면 이 작업이 필요합니다.
-
LDAP 관리자 고유 이름(DN):
(cn=admin,dc=wildfly,dc=org) LDAP 조직:
wildfly조직 이름을 지정하지 않으면 기본값은
Example Inc입니다.LDAP 도메인:
wildfly.org이는 플랫폼에 LDAP 검색 참조가 수신될 때 일치하는 이름입니다.
사전 요구 사항
- LDAP ID 저장소를 구성했습니다.
- JBoss EAP가 실행 중입니다.
프로세스
LDAP 서버에 연결하는 데 사용되는 URL과 주체를 제공하는 디렉터리 컨텍스트를 구성합니다.
/subsystem=elytron/dir-context=<dir_context_name>:add(url="<LDAP_URL>",principal="<principal_distinguished_name>",credential-reference=<credential_reference>)
/subsystem=elytron/dir-context=<dir_context_name>:add(url="<LDAP_URL>",principal="<principal_distinguished_name>",credential-reference=<credential_reference>)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/dir-context=exampleDirContext:add(url="ldap://10.88.0.2",principal="cn=admin,dc=wildfly,dc=org",credential-reference={clear-text="secret"}) {"outcome" => "success"}/subsystem=elytron/dir-context=exampleDirContext:add(url="ldap://10.88.0.2",principal="cn=admin,dc=wildfly,dc=org",credential-reference={clear-text="secret"}) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow 디렉터리 컨텍스트를 참조하는 LDAP 영역을 생성합니다. Search Base DN과 사용자 매핑 방법을 지정합니다.
구문
/subsystem=elytron/ldap-realm=<ldap_realm_name>add:(dir-context=<dir_context_name>,identity-mapping=search-base-dn="ou=<organization_unit>,dc=<domain_component>",rdn-identifier="<relative_distinguished_name_identifier>",user-password-mapper={from=<password_attribute_name>},attribute-mapping=[{filter-base-dn="ou=<organization_unit>,dc=<domain_component>",filter="<ldap_filter>",from="<ldap_attribute_name>",to="<identity_attribute_name>"}]})/subsystem=elytron/ldap-realm=<ldap_realm_name>add:(dir-context=<dir_context_name>,identity-mapping=search-base-dn="ou=<organization_unit>,dc=<domain_component>",rdn-identifier="<relative_distinguished_name_identifier>",user-password-mapper={from=<password_attribute_name>},attribute-mapping=[{filter-base-dn="ou=<organization_unit>,dc=<domain_component>",filter="<ldap_filter>",from="<ldap_attribute_name>",to="<identity_attribute_name>"}]})Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/ldap-realm=exampleLDAPRealm:add(dir-context=exampleDirContext,identity-mapping={search-base-dn="ou=Users,dc=wildfly,dc=org",rdn-identifier="uid",user-password-mapper={from="userPassword"},attribute-mapping=[{filter-base-dn="ou=Roles,dc=wildfly,dc=org",filter="(&(objectClass=groupOfNames)(member={1}))",from="cn",to="Roles"},{from="mail",to="mail"},{from="telephoneNumber",to="telephoneNumber"}]}) {"outcome" => "success"}/subsystem=elytron/ldap-realm=exampleLDAPRealm:add(dir-context=exampleDirContext,identity-mapping={search-base-dn="ou=Users,dc=wildfly,dc=org",rdn-identifier="uid",user-password-mapper={from="userPassword"},attribute-mapping=[{filter-base-dn="ou=Roles,dc=wildfly,dc=org",filter="(&(objectClass=groupOfNames)(member={1}))",from="cn",to="Roles"},{from="mail",to="mail"},{from="telephoneNumber",to="telephoneNumber"}]}) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
이제 이 영역을 사용하여 보안 도메인을 생성하거나 페일오버-realm , 의 다른 영역과 결합할 수 있습니다.
distributed-realm 또는 aggregate-realm
1.1.2.2. Ely tron에서 파일 시스템 생성 예 링크 복사링크가 클립보드에 복사되었습니다!
파일 시스템 기반 ID 저장소에서 지원하는 Elytron 보안 영역을 생성하여 JBoss EAP 서버 인터페이스 또는 서버에 배포된 애플리케이션을 보호합니다.
사전 요구 사항
- JBoss EAP가 실행 중입니다.
프로세스
Elytron에서
filesystem-realm을 만듭니다.구문
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add(path=<file_path>)
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add(path=<file_path>)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir) {"outcome" => "success"}/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow 사용자를 영역에 추가하고 사용자 역할을 구성합니다.
사용자를 추가합니다.
구문
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add-identity(identity=<user_name>)
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add-identity(identity=<user_name>)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity(identity=user1) {"outcome" => "success"}/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity(identity=user1) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow 사용자의 역할을 설정합니다.
구문
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add-identity-attribute(identity=<user_name>,name=<roles_attribute_name>, value=[<role_1>,<role_N>])
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add-identity-attribute(identity=<user_name>,name=<roles_attribute_name>, value=[<role_1>,<role_N>])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity-attribute(identity=user1, name=Roles, value=["Admin","Guest"]) {"outcome" => "success"}/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity-attribute(identity=user1, name=Roles, value=["Admin","Guest"]) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow 사용자의 속성을 설정합니다.
구문
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add-identity-attribute(identity=<user_name>,name=<attribute_name>, value=[<attribute_value>])
/subsystem=elytron/filesystem-realm=<filesystem_realm_name>:add-identity-attribute(identity=<user_name>,name=<attribute_name>, value=[<attribute_value>])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity-attribute(identity=user1, name=mail, value=["user@example.com"]) /subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity-attribute(identity=user1, name=website, value=["http://www.example.com/"])
/subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity-attribute(identity=user1, name=mail, value=["user@example.com"]) /subsystem=elytron/filesystem-realm=exampleFileSystemRealm:add-identity-attribute(identity=user1, name=website, value=["http://www.example.com/"])Copy to Clipboard Copied! Toggle word wrap Toggle overflow
이제 이 영역을 사용하여 보안 도메인을 생성하거나 페일오버-realm , 의 다른 영역과 결합할 수 있습니다.
distributed-realm 또는 aggregate-realm
1.1.3. Elytron에서 집계- 현지 생성 링크 복사링크가 클립보드에 복사되었습니다!
권한을 위해 여러 보안 영역 의 인증 및 집계에 하나의 보안 영역을 사용하는 Elytron에 집계를 생성합니다. aggregate-realm 을 사용하여 관리 인터페이스 및 배포된 애플리케이션에 인증 및 권한 부여를 추가하는 보안 도메인을 생성합니다.
사전 요구 사항
- JBoss EAP가 실행 중입니다.
- 집계 영역에서 참조할 영역을 생성했습니다.
프로세스
기존 보안
영역에서 집계를 생성합니다.구문
/subsystem=elytron/aggregate-realm=<aggregate_realm_name>:add(authentication-realm=<security_realm_for_authentication>, authorization-realms=[<security_realm_for_authorization_1>,<security_realm_for_authorization_2>,...,<security_realm_for_authorization_N>])
/subsystem=elytron/aggregate-realm=<aggregate_realm_name>:add(authentication-realm=<security_realm_for_authentication>, authorization-realms=[<security_realm_for_authorization_1>,<security_realm_for_authorization_2>,...,<security_realm_for_authorization_N>])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/aggregate-realm=exampleSecurityRealm:add(authentication-realm=exampleLDAPRealm,authorization-realms=[exampleLDAPRealm,exampleFileSystemRealm]) {"outcome" => "success"}/subsystem=elytron/aggregate-realm=exampleSecurityRealm:add(authentication-realm=exampleLDAPRealm,authorization-realms=[exampleLDAPRealm,exampleFileSystemRealm]) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow 특성을 역할에 매핑하는 역할 디코더를 생성합니다.
구문
/subsystem=elytron/simple-role-decoder=<role_decoder_name>:add(attribute=<attribute>)
/subsystem=elytron/simple-role-decoder=<role_decoder_name>:add(attribute=<attribute>)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/simple-role-decoder=from-roles-attribute:add(attribute=Roles) {"outcome" => "success"}/subsystem=elytron/simple-role-decoder=from-roles-attribute:add(attribute=Roles) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow aggregate-realm및 역할 디코더를 참조하는 보안 도메인을 생성합니다.구문
/subsystem=elytron/security-domain=<security_domain_name>:add(default-realm=<aggregate_realm_name>,permission-mapper=default-permission-mapper,realms=[{realm=<aggregate_realm_name>,role-decoder="<role_decoder_name>"}])/subsystem=elytron/security-domain=<security_domain_name>:add(default-realm=<aggregate_realm_name>,permission-mapper=default-permission-mapper,realms=[{realm=<aggregate_realm_name>,role-decoder="<role_decoder_name>"}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/security-domain=exampleSecurityDomain:add(default-realm=exampleSecurityRealm,permission-mapper=default-permission-mapper,realms=[{realm=exampleSecurityRealm,role-decoder="from-roles-attribute"}]) {"outcome" => "success"}/subsystem=elytron/security-domain=exampleSecurityDomain:add(default-realm=exampleSecurityRealm,permission-mapper=default-permission-mapper,realms=[{realm=exampleSecurityRealm,role-decoder="from-roles-attribute"}]) {"outcome" => "success"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
이제 생성된 보안 도메인을 사용하여 관리 인터페이스 및 애플리케이션에 인증 및 권한 부여를 추가할 수 있습니다. 자세한 내용은 관리 인터페이스 및 애플리케이션 보안을 참조하십시오.