2장. Elytron 하위 시스템
2.1. 파일 시스템 기반 ID 저장소로 인증 구성 링크 복사링크가 클립보드에 복사되었습니다!
JBoss EAP에서
filesystem-realm
을 구성합니다./subsystem=elytron/filesystem-realm=exampleFsRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir)
/subsystem=elytron/filesystem-realm=exampleFsRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 디렉터리가
jboss.server.config.dir
외부에 있는 경우경로
와상대 값을
적절하게 변경해야 합니다.사용자 추가:
filesystem-realm
을 사용하는 경우 관리 CLI를 사용하여 사용자를 추가할 수 있습니다./subsystem=elytron/filesystem-realm=exampleFsRealm:add-identity(identity=user1) /subsystem=elytron/filesystem-realm=exampleFsRealm:set-password(identity=user1, clear={password="password123"}) /subsystem=elytron/filesystem-realm=exampleFsRealm:add-identity-attribute(identity=user1, name=Roles, value=["Admin","Guest"])
/subsystem=elytron/filesystem-realm=exampleFsRealm:add-identity(identity=user1) /subsystem=elytron/filesystem-realm=exampleFsRealm:set-password(identity=user1, clear={password="password123"}) /subsystem=elytron/filesystem-realm=exampleFsRealm:add-identity-attribute(identity=user1, name=Roles, value=["Admin","Guest"])
Copy to Clipboard Copied! Toggle word wrap Toggle overflow simple-role-decoder
추가 :/subsystem=elytron/simple-role-decoder=from-roles-attribute:add(attribute=Roles)
/subsystem=elytron/simple-role-decoder=from-roles-attribute:add(attribute=Roles)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이
simple-role-decoder
는Roles
특성에서 주체 역할을 디코딩합니다. 역할이 다른 특성에 있는 경우 이 값을 변경할 수 있습니다.security-domain
구성 :/subsystem=elytron/security-domain=exampleFsSD:add(realms=[{realm=exampleFsRealm,role-decoder=from-roles-attribute}],default-realm=exampleFsRealm,permission-mapper=default-permission-mapper)
/subsystem=elytron/security-domain=exampleFsSD:add(realms=[{realm=exampleFsRealm,role-decoder=from-roles-attribute}],default-realm=exampleFsRealm,permission-mapper=default-permission-mapper)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow undertow 하위 시스템에서
application-security-domain
을 구성합니다./subsystem=undertow/application-security-domain=exampleApplicationDomain:add(security-domain=exampleFsSD)
/subsystem=undertow/application-security-domain=exampleApplicationDomain:add(security-domain=exampleFsSD)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 참고undertow
하위 시스템의application-security-domain
은 구성하위 시스템 웹(Undertow) 애플리케이션 보안 도메인으로 이동하여 관리 콘솔을 사용하여 구성할 수 있습니다. 애플리케이션의
web.xml
및jboss-web.xml
구성 :JBoss EAP에서 구성한 application-
security
.xml을 업데이트해야 합니다. 이러한 예는 Configure Web Applications to use Elytron 또는 Legacy Security for Authentication 에서 확인할 수 있습니다.-domain을 사용하도록 애플리케이션의
webweb.xml
및 jboss-
이제 애플리케이션에서 인증에 파일 시스템 기반 ID 저장소를 사용하고 있습니다.