java -cp client/jboss-logging-spi.jar:lib/jbosssx.jar org.jboss.resource.security.SecureIdentityLoginModule <PASSWORD>
data source dosyasında tanımlanan security domain:
<?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>PostgresDS</jndi-name> <connection-url>jdbc:postgresql://127.0.0.1:5432/test?protocolVersion=2</connection-url> <driver-class>org.postgresql.Driver</driver-class> <min-pool-size>1</min-pool-size> <max-pool-size>20</max-pool-size> <!-- REPLACED WITH security-domain BELOW <user-name>admin</user-name> <password>password</password> --> <security-domain>EncryptDBPassword</security-domain> <metadata> <type-mapping>PostgreSQL 8.0</type-mapping> </metadata> </local-tx-datasource> </datasources>
JBOSS_HOME/server/server_adı/conf/login/login-config.xml dosyasında, ilgili security-domain'e ait otantikasyon bilgileri eklenir:
<application-policy name = "EncryptedHsqlDbRealm"> <authentication> <login-module code = "org.jboss.resource.security.JaasSecurityDomainIdentityLoginModule" flag = "required"> <module-option name = "username">sa</module-option> <module-option name = "password">E5gtGMKcXPP</module-option> <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option> <module-option name = "jaasSecurityDomain">jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword</module-option> </login-module> </authentication> </application-policy>
önceden üretilen şifre, buradaki password alanına girilmelidir.
JBoss restart'ı ile değişiklikler aktive olur.
Hiç yorum yok:
Yorum Gönder