You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2014/07/12 08:36:57 UTC

jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Hi . 
I would know if is possible set jaas for a only web apps and not for all
server.

I make the setting into context.xml of the web app .
But for set the location of file configuration i not would use the javs_opts
into setenv.sh or cataliba.sh .
I can set with a ServletContextListener and System.setPropertie(........))so
that at start of webapps the location of file conf of jaas it is setted.
 This approch can work ?
Mauro




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by mauro2java2011 <ma...@gmail.com>.
Tank you if you found it  please let me know
Il 13/lug/2014 13:22 "Romain Manni-Bucau [via TomEE & OpenEJB]" <
ml-node+s979440n4670404h99@n4.nabble.com> ha scritto:

> this one does more or less it
>
> https://github.com/rmannibucau/agoncal-application-petstore-ee6/blob/master/src/main/java/org/agoncal/application/petstore/security/SimpleLoginModule.java
>
> I remember there was a thread about it on the list but i don't have
> the link anymore in my box
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-07-13 13:16 GMT+02:00 mauro2java2011 <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=4670404&i=0>>:
>
> > Please do you have a link for a github repos with a example of a custom
> > realm implementation? For example using jpa for user and roles .  I
> >
> > Tank you
> > Il 13/lug/2014 10:08 "Romain Manni-Bucau [via TomEE & OpenEJB]" <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4670404&i=1>>
> ha scritto:
> >
> >> no default should be ok for you
> >>
> >>
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >> 2014-07-12 12:41 GMT+02:00 mauro2java2011 <[hidden email]
> >> <http://user/SendEmail.jtp?type=node&node=4670395&i=0>>:
> >> > escuse mew but i have di deacctive the systemproperties? i not
> >> understand the
> >> > you note on jira
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670391.html
> >> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670395.html
> >>  To unsubscribe from jaas . is possible set The file conf not into
> >> java_opts but only with System.setPtoperties into
> serveletcontextlistener?, click
> >> here
> >> <
> >> .
> >> NAML
> >> <
> http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670403.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670404.html
>  To unsubscribe from jaas . is possible set The file conf not into
> java_opts but only with System.setPtoperties into serveletcontextlistener?, click
> here
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4670386&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2NzAzODZ8LTExMTcxODc2MjU=>
> .
> NAML
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670405.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
this one does more or less it
https://github.com/rmannibucau/agoncal-application-petstore-ee6/blob/master/src/main/java/org/agoncal/application/petstore/security/SimpleLoginModule.java

I remember there was a thread about it on the list but i don't have
the link anymore in my box


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-13 13:16 GMT+02:00 mauro2java2011 <ma...@gmail.com>:
> Please do you have a link for a github repos with a example of a custom
> realm implementation? For example using jpa for user and roles .  I
>
> Tank you
> Il 13/lug/2014 10:08 "Romain Manni-Bucau [via TomEE & OpenEJB]" <
> ml-node+s979440n4670395h20@n4.nabble.com> ha scritto:
>
>> no default should be ok for you
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-07-12 12:41 GMT+02:00 mauro2java2011 <[hidden email]
>> <http://user/SendEmail.jtp?type=node&node=4670395&i=0>>:
>> > escuse mew but i have di deacctive the systemproperties? i not
>> understand the
>> > you note on jira
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670391.html
>> > Sent from the TomEE Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670395.html
>>  To unsubscribe from jaas . is possible set The file conf not into
>> java_opts but only with System.setPtoperties into serveletcontextlistener?, click
>> here
>> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4670386&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2NzAzODZ8LTExMTcxODc2MjU=>
>> .
>> NAML
>> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670403.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by mauro2java2011 <ma...@gmail.com>.
Please do you have a link for a github repos with a example of a custom
realm implementation? For example using jpa for user and roles .  I

Tank you
Il 13/lug/2014 10:08 "Romain Manni-Bucau [via TomEE & OpenEJB]" <
ml-node+s979440n4670395h20@n4.nabble.com> ha scritto:

> no default should be ok for you
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-07-12 12:41 GMT+02:00 mauro2java2011 <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=4670395&i=0>>:
> > escuse mew but i have di deacctive the systemproperties? i not
> understand the
> > you note on jira
> >
> >
> >
> > --
> > View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670391.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670395.html
>  To unsubscribe from jaas . is possible set The file conf not into
> java_opts but only with System.setPtoperties into serveletcontextlistener?, click
> here
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4670386&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2NzAzODZ8LTExMTcxODc2MjU=>
> .
> NAML
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670403.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
no default should be ok for you


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-12 12:41 GMT+02:00 mauro2java2011 <ma...@gmail.com>:
> escuse mew but i have di deacctive the systemproperties? i not understand the
> you note on jira
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670391.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by mauro2java2011 <ma...@gmail.com>.
escuse mew but i have di deacctive the systemproperties? i not understand the
you note on jira



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670391.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
PS: https://issues.apache.org/jira/browse/TOMEE-1191


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-12 10:55 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:
> No but this is not linked actually. *.properties are handled by the
> LoginModule of tomee which uses conf/*.properties. But you can write
> your own login module which read the files from where you want (surely
> the database since having hardcoded users in a war makes it hard to
> maintain).
>
> The best is to try it ;)
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-07-12 10:52 GMT+02:00 mauro2java2011 <ma...@gmail.com>:
>> but the users.properties and groups.properties i can also put it into WEB-INF
>> where it is also the login.config file?
>>
>>
>>
>>
>> --
>> View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670388.html
>> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
No but this is not linked actually. *.properties are handled by the
LoginModule of tomee which uses conf/*.properties. But you can write
your own login module which read the files from where you want (surely
the database since having hardcoded users in a war makes it hard to
maintain).

The best is to try it ;)


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-12 10:52 GMT+02:00 mauro2java2011 <ma...@gmail.com>:
> but the users.properties and groups.properties i can also put it into WEB-INF
> where it is also the login.config file?
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670388.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by mauro2java2011 <ma...@gmail.com>.
but the users.properties and groups.properties i can also put it into WEB-INF
where it is also the login.config file?




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386p4670388.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: jaas . is possible set The file conf not into java_opts but only with System.setPtoperties into serveletcontextlistener?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

it should yes


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-12 8:36 GMT+02:00 mauro2java2011 <ma...@gmail.com>:
> Hi .
> I would know if is possible set jaas for a only web apps and not for all
> server.
>
> I make the setting into context.xml of the web app .
> But for set the location of file configuration i not would use the javs_opts
> into setenv.sh or cataliba.sh .
> I can set with a ServletContextListener and System.setPropertie(........))so
> that at start of webapps the location of file conf of jaas it is setted.
>  This approch can work ?
> Mauro
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/jaas-is-possible-set-The-file-conf-not-into-java-opts-but-only-with-System-setPtoperties-into-servel-tp4670386.html
> Sent from the TomEE Users mailing list archive at Nabble.com.