[JBoss-user] [JBoss Seam] - Redirect to HTTPS

2006-03-16 Thread neillane
Hi 

I am trying to modify the seam-booking app to redirect to https when the user 
logs in.

What I would like is for the user to enter the site using http and after 
entering their username and password and clicking on the *account login* 
button, the site *goes secure*.

I have tried to redirect to the home page and use a ?param in the URL, but have 
had no success.

Please can you give me a pointer as to how this could be achieved

Neil 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3930691#3930691

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3930691


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Seam] - Re: Entity Manager null

2006-03-06 Thread neillane
Hi James

I have changed the servlet mapping to be /servlet/ and added the filter 
code to the web.xml file in my application as per your code snippet.

I am able to call the doPost method in my servlet which in turn calls


  | 
  | EnvelopeUploadBean uploader = null;
  | try
  | {
  | uploader = new EnvelopeUploadBean();
  | }
  | catch (Exception e)
  | {
  | e.printStackTrace(); 
  | }
  | 
  | String result = uploader.uploadEnvelope(inputStream);
  | 
  | 

This then runs everything in the *bean* correctly.

However - I am still unable to get the EntityManager (it is still null when I 
am trying to persist the data to my database)

I have searched the reference docs for info on the SeamServletFilter and how to 
use it with very little success.  

If possible,  could you explain, or point me in right dicetion as to how to 
involk the filter and make it possible for me to use the EntityManager 

Thanks

Neil

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3928141#3928141

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3928141


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Seam] - Re: Entity Manager null

2006-03-06 Thread neillane
I have the following

  | @Stateless
  | @Name(envelopeUpload)
  | public class EnvelopeUploadBean implements EnvelopeUpload, Serializable
  | {
  | 
  | @PersistenceContext
  | private EntityManager em;
  | 
  | .
  | 
  | 

I have even tried with the unit name of the context ( the DS) and that doesnt 
work either.

The other Objects that I am injecting are working fine.  I can get the Object 
the I am going to persist and set all the vars.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3928156#3928156

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3928156


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Seam] - Re: Entity Manager null

2006-03-06 Thread neillane
I would think so.

All the other functions of retrieving data from the database and displaying it 
in datatables are working fine in my web app. It is just the bean that is 
called by the servlet, where the em is null and I cant seem to instantiate it.

The persistance.xml


  | persistence
  |persistence-unit name=NerveCentre-DS
  |   providerorg.hibernate.ejb.HibernatePersistence/provider
  |   jta-data-sourcejava:/NerveCentreDS/jta-data-source
  |   properties
  |  property name=hibernate.dialect 
value=org.hibernate.dialect.HSQLDialect/
  |  property name=hibernate.transaction.manager_lookup_class 
value=org.hibernate.transaction.JBossTransactionManagerLookup/
  |  property name=hibernate.transaction.flush_before_completion 
value=true/
  |  property name=hibernate.hbm2ddl.auto value=create-drop/
  |  property name=hibernate.show_sql value=true/
  |   /properties
  |/persistence-unit
  | /persistence
  | 

The DS


  | ?xml version=1.0 encoding=UTF-8?
  | 
  | datasources
  | local-tx-datasource
  | jndi-nameNerveCentreDS/jndi-name
  | 
connection-urljdbc:mysql://127.0.0.1:3306/nerve-centre/connection-url
  | driver-classcom.mysql.jdbc.Driver/driver-class
  | user-nameroot/user-name
  | password/password
  | exception-sorter-class-name
  | org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
  | /exception-sorter-class-name
  | metadata
  | type-mappingmySQL/type-mapping
  | /metadata
  | /local-tx-datasource
  | /datasources
  | 



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3928185#3928185

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3928185


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Seam] - Entity Manager null

2006-03-03 Thread neillane
I have a servlet that is calling a Bean in my seam application.

The servlet is working correctly and calls the Bean correctly, but when the 
bean needs to call the em.persist(object) method, the em is null.

I used this bean in my app using beta1 and used an initial context lookup 


  | EnvelopeUpload uploader = null;
  | try
  | {
  | uploader = Utils.getEnvelopeUploader();
  | }
  | catch (Exception e)
  | {
  | e.printStackTrace(); 
  | }
  | 
  | 

 Utils returning


  | try
  | {
  | log.info(Getting the initial Context);
  | InitialContext ctx = new InitialContext();
  | log.info( got the context -   + ctx);
  | EnvelopeUpload envelopeUpload = (EnvelopeUpload) 
ctx.lookup(EnvelopeUpload.class.getName());
  | log.info(The envelope is -  + envelopeUpload);
  | return envelopeUpload;
  | }
  | catch (Exception e)
  | {
  | e.printStackTrace();
  | throw e;
  | }
  | 

If I try the Context lookup now in beta2 I get a classNotFound exception.

I have also tried 

em = (EntityManager) Component.getInstance(em, true);

And get  IllegalStateException: No active application scope 

Please can someone let me know how to solve this issue

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3927698#3927698

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3927698


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Seam] - Loading info into a datatable

2006-02-22 Thread neillane
Hi 

I am trying to do the following:

I have a dataTable in an xhtml file that displays the contents of a List

At the moment I have to click on the search button to access the database to 
populate the List. The data is then displayed in the table.

I would like to have the list populated when the page is accessed the first 
time (like an init method). Is there any way to do this???

Thanks

Neil 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3925591#3925591

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3925591


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - Re: Using the LdapExtLoginModule in a Web Application

2005-11-30 Thread neillane
I get the following with DEBUG on:


2005-11-30 12:32:56,520 DEBUG [org.apache.catalina.authenticator.AuthenticatorBa
  | se] Security checking request POST /formmanagement/j_security_check
  | 2005-11-30 12:32:56,520 DEBUG 
[org.apache.catalina.authenticator.FormAuthenticat
  | or] Checking for reauthenticate in session 
StandardSession[37F5F0C7665F387C9157E
  | 6A2BD393E61]
  | 2005-11-30 12:32:56,520 DEBUG 
[org.apache.catalina.authenticator.FormAuthenticat
  | or] Authenticating username 'Neil'
  | 2005-11-30 12:32:56,535 DEBUG 
[org.jboss.security.auth.spi.UsersRolesLoginModule
  | ] Bad password for username=Neil
  | 2005-11-30 12:32:56,535 DEBUG 
[org.jboss.security.plugins.JaasSecurityManager.Ld
  | apLogin] Login failure
  | javax.security.auth.login.FailedLoginException: Password Incorrect/Password 
Requ
  | ired
  | at 
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(Usernam
  | ePasswordLoginModule.java:160)
  | at 
org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLog
  | inModule.java:116)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:324)
  | at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
  | at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
  | 29)
  | at 
javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
  | at java.security.AccessController.doPrivileged(Native Method)
  | at 
javax.security.auth.login.LoginContext.invokeModule(LoginContext.java
  | :607)
  | at 
javax.security.auth.login.LoginContext.login(LoginContext.java:534)

I am still not too sure if am actually getting to the LDAP server and why the 
password would be incorrect as I have validated the password through other LDAP 
management tools.  Would it be caused by having the password encrypted in LDAP??



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3909729#3909729

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3909729


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - Using the LdapExtLoginModule in a Web Application

2005-11-15 Thread neillane
I am trying to get my web app to use a fedora-ds LDAP instance to log me into 
the app.

I have the following in the jboss-web.xml

security-domainjava:/jaas/LdapLogin/security-domain

The entry in the login-config.xml is 

application-policy name = LdapLogin
  | authentication
  | login-module code = 
org.jboss.security.auth.spi.LdapExtLoginModule flag=required 
  | module-option name = 
java.naming.provider.urlldap://192.168.1.2:389//module-option
  | /login-module
  | /authentication
  | /application-policy

 I have the following LDIF loaded into fds


dn: dc=example,dc=com
  | objectClass: top
  | objectClass: domain
  | dc: example
  | 
  | dn: o=org_intel, dc=example,dc=com
  | objectClass: top
  | objectClass: organization
  | o: org_intel
  | 
  | dn: ou=org_intel_people, o=org_intel, dc=example,dc=com
  | objectClass: top
  | objectClass: organizationalunit
  | ou: org_intel_people
  | 
  | dn: uid=neil,ou=org_intel_people, o=org_intel, dc=example,dc=com
  | objectClass: top
  | objectClass: person
  | objectClass: organizationalPerson
  | objectClass: inetOrgPerson
  | objectClass: nsaimpresence
  | o: org_intel
  | givenName: Neil
  | cn: Neil
  | sn: Lane
  | ou: org_intel_people
  | 
  | 
  | # org_intel local roles - If the user is a member of the organisation 
org_intel they will posses this role.  This role will be used for the 
authentication.  If the user posses this role they are allowed to log into the 
application.
  | 
  | dn: cn=org_intel_application_login, o=org_intel, dc=example,dc=com
  | objectclass: top
  | objectclass: LDAPsubentry
  | objectclass: nsRoleDefinition
  | objectclass: nsComplexRoleDefinition
  | objectclass: nsFilteredRoleDefinition
  | cn: org_intel_application_login
  | nsRoleFilter: o=org_intel
  | description: Role to allow user login to Intel applications
  | 
  | 
  | # GLOBAL ROLES used for access control.  All users who have the filtered 
role cn=org_intel_application_login, o=org_intel, dc=example,dc=com
  | will posses the access role below. These roles will be used for 
authorisation in the application.
  | 
  | 
  | dn: cn=access_role_intel_application_login,dc=intelliform,dc=co,dc=za
  | objectclass: top
  | objectclass: LDAPsubentry
  | objectclass: nsRoleDefinition
  | objectclass: nsComplexRoleDefinition
  | objectclass: nsNestedRoleDefinition
  | cn: access_role_intel_application_login
  | nsRoleDN: cn=org_intel_application_login, o=org_intel, dc=example,dc=com

I need some assistance with the other application-poilicy params ie

module-option name = rolesCtxDN
  | module-option name = matchOnUserDN
  | module-option name = uidAttributeID
  | module-option name = roleAttributeID
  | module-option name = roleAttributeIsDN
  | module-option name = roleNameAttributeID

At the moment all that happens is that I am forwarded to the login-error page, 
with no system outputs or exception stacktraces.

Are my problems due to the use of the filtered and nested roles?

running the ldapsearch command on the command line returns all the correct 
nsRole attributes for the user.

Please can someone assist, as I must be missing some config setting or 
something, somewhere.

Thanks

Neil 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907195#3907195

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907195


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - LDAP Intergration

2005-11-09 Thread neillane
I am in the process of trying to do a proof of concept for application logins.

 

Background:

 

Application running on JBoss-4.0.3, using form based authentication to a 
Fedora-DS LDAP server for login.

 

I have modified the LoginModulesTestCase from the wiki to do the following:

 

AppConfigurationEntry[] testLdap()

  {

 String name = org.jboss.security.auth.spi.LdapExtLoginModule;

 HashMap options = new HashMap();

 options.put(java.naming.factory.initial, 
com.sun.jndi.ldap.LdapCtxFactory);

 

 options.put(java.naming.provider.url, 
ldap://192.168.1.2:389/,o=,dc=,dc=,dc=;);

 options.put(java.naming.security.authentication, simple);

 

 options.put(bindDN, cn=bob);

 options.put(bindCredential, pwd);

 options.put(baseCtxDN, );

 options.put(baseFilter, (cn={0}));

 

 AppConfigurationEntry ace = new AppConfigurationEntry(name,

 AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);

 AppConfigurationEntry[] entry = {ace};

 return entry;

  }

 

 

The Test does the most simple of tasks

 

public void testLdap() throws Exception

   {

UsernamePasswordHandler handler = new UsernamePasswordHandler(bob, 
pwd);

   LoginContext lc = new LoginContext(testLdap, handler);

   try

   {

lc.login();

Subject subject = lc.getSubject();

}

   catch (LoginException e)

   {

   System.out.println(Login Exception caught);

   e.printStackTrace();

   }

lc.logout();

   }

 

 

When I get to the Login() I get the following exception

 

23:22:20,265 INFO  [STDOUT] Login Exception caught

23:22:20,265 INFO  [STDOUT] javax.security.auth.login.FailedLoginException: Pass

word Incorrect/Password Required

23:22:20,265 INFO  [STDOUT] at org.jboss.security.auth.spi.UsernamePasswordL

oginModule.login(UsernamePasswordLoginModule.java:189)

23:22:20,265 INFO  [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(

Native Method)

23:22:20,265 INFO  [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(U

nknown Source)

23:22:20,265 INFO  [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invo

ke(Unknown Source)

23:22:20,265 INFO  [STDOUT] at java.lang.reflect.Method.invoke(Unknown Sourc

e)

23:22:20,265 INFO  [STDOUT] at javax.security.auth.login.LoginContext.invoke

(Unknown Source)

23:22:20,265 INFO  [STDOUT] at javax.security.auth.login.LoginContext.access

$000(Unknown Source)

23:22:20,265 INFO  [STDOUT] at javax.security.auth.login.LoginContext$4.run(

Unknown Source)

23:22:20,265 INFO  [STDOUT] at java.security.AccessController.doPrivileged(N

ative Method)

23:22:20,265 INFO  [STDOUT] at javax.security.auth.login.LoginContext.invoke

Module(Unknown Source)

23:22:20,265 INFO  [STDOUT] at javax.security.auth.login.LoginContext.login(

Unknown Source)

 

 

Please could someone let me know if I am doing something fundamentally wrong, 
as this should be the simple part.

 

Thanks



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3906252#3906252

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3906252


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user