El siguiente video explica como hacer el deploy de una aplicación en jboss 7 openshift
Getting Started with OpenShift Flex and Java EE from JBoss Developer on Vimeo.
Reporte de los errores que voy encontrando y su solución en tecnología java jboss seam jsf rich faces jpa hibernate
example of a security domain (login-conf.xml) | <application-policy name="jmx-console"> <authentication> <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"> <module-option name="usersProperties">props/jmx-console-users.properties</module-option> <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option> </login-module> </authentication> </application-policy> |
Example MBean dynamic login config | <server> <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="jboss:service=DynamicLoginConfig"> <attribute name="AuthConfig">dynamic-login-config.xml</attribute> <depends option-attribute-name="LoginConfigService">jboss.security:service=XMLLoginConfig</depends> <depends option-attribute-name="SecurityManagerService">jboss.security:service=JaasSecurityManager</depends> </mbean> </server> |
increase security logging | <category name="org.jboss.security"> <priority value="TRACE" class="org.jboss.logging.XLevel"/> </category> <category name="org.jboss.web.tomcat.security"> <priority value="TRACE" class="org.jboss.logging.XLevel"/> </category> <category name="org.apache.catalina"> <priority value="DEBUG"/> </category> Note: don't forget to comment out the threshold parameter in the appender that you want the logging messages to appear in. |
symmetric | This is like a user having a secret message that he/she puts into a box and secures it with a padlock, if your friend has the same key to the padlock you can both open and close it knowing no else can. Symmetric works in the same manor by using a secret key, a message is encrypted with a secret key and decrypted with the same key, as long as the key is not comprised the two parties can communicate securely. |
asymmetric | Public key encryption (asymmetric encryption) uses a pair of mathematically associated keys, after a message is encrypted with one, it can only be decrypted with the other. The keys are called public and private, the public you can give to anyone and the private you keep yourself, only the private key can decrypt messages encrypted by the public key. What this means is that you can freely distribute the public to anyone, the only drawback is that this mechanism is slower. |
Generate a keystore and self-signed certificate | keytool -genkey -alias "selfsigned" -keyalg RSA -keystore keystore.pfv -storepass "password123" -validity 360 |
Generate a keystore and Export the CSR file to get signed then Import the signed-cert from the CA | keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.pfv keytool -certreq -alias mydomain -keystore keystore.pfv -file getMeSigned.csr keytool -import -trustcacerts -alias mydomain -keystore keystore.pfv -file signedCertificate.crt |
Export the certficate from the keystore to distribute it | keytool -export -alias mydomain -keystore keystore.pfv -file mydomain.crt |
Print keystore information | keytool -list -v -keystore keystore.pfv keytool -list -v -keystore keystore.pfv -alias mydomain |
importing into the trust store | keytool -import -alias myserver -file server.csr -keystore C:\jdk1.6.0_12\jre\lib\secruity\cacerts |
specify on the commandline | java -Djavax.net.ssl.trustStore=<file> -Djavax.net.ssl.trustStorePassword=<pass> |
Authentication Strategy | Who wants to verify the other party's identity | Who needs public key? |
Server Authentication | Client | Server |
Mutual Authentication | Client and Server | Client and Server |
Example SSL-aware security domain defined MBean | <server> <mbean code="org.jboss.security.plugins.JaasSecurityDomain" name="jboss.security:service=MySecurityDomain"> <constructor> <arg type="java.lang.String" value="my-security-domain"/> </constructor> <attribute name="KeyStoreURL">${jboss.server.home.dir}/conf/server.truststore</attribute> <attribute name="KeyStorePass">servercert</attribute> <depends>jboss.security:service=JassSecurityManager</depends> </mbean> </server> Note: this will now bind to JNDI as java:/jaas/my-security-domain |
login-config.xml | <application-policy name="my-security-domain"> ... </application-policy> |
Login Module | Description |
BaseCertLoginModule | Authenticates client certificates, must be stacked with another login module that does authorization |
CertRolesLoginModule | An extension of BaseCertLoginModule that authenticates against client certificates and authorizes against properties files |
ClientLoginModules | Used by standalone clients that want to log into a secure server |
DatabaseCertLoginModule | An extension of BaseCertLoginModule that authenticates against client certificates and authorizes against a database |
DatabaseServerLoginModule | Loads user/role information from a database |
IndentityLoginModule | a testing login module that causes all users to authenticate with the same credentials |
LdapExtLoginModule | Loads user/roles information from a LDAP server (supports hierarchical role structure) |
ldapLoginModule | Loads user/roles information from a LDAP server (only works with flat role structures) |
RunASLoginModule | Can be stacked with another login module to define the run-as status that they use while they're authenticating, useful if you need to call a secured EJB that's responsible for authenticating users. |
SimpleServerLoginModule | A testing login module that allows any role with a null password to authenticate |
SRPCacheLoginModule | Used to authenticate users using the Secure Remote Password (SRP) protocol |
SRPLoginModule | Used by standalone clients that want to authenticate using the SRP protocol |
UsersRolesLoginModule | Loads user/roles information from property files |
UserRolesLoginModule | <application-policy name="my-security-domain"> <authentication> <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"> <module-option name="usersProperties">my-users.properties</module-option> <module-option name="rolesProperties">my-roles.properties</module-option> </login-module> </authentication> </application-policy> # my-user.properies file pvalle=password willhay=password1 normanwisdom=password2 # my-role.properies file pvalle=admin,movies willhay=movies normanwisdom=movies |
DatabaseServerLoginModule | <application-policy name="database-domain"> <authentication> <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required"> <module-option name="dsJndiName">java:/OracleDS</module-option> <module-option name="principalsQuery">select passwd from users where userid=?</module-option> <module-option name="rolesQuery">select roleid, 'Roles' from roles where userid=?</module-option> </login-module> </authentication> </application-policy> |