Externalize trustStore path

View: New views
4 Messages — Rating Filter:   Alert me  

Externalize trustStore path

by SMallik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I have an application wherein I have integrated CAS SSO and Acegi security for Spring.
<bean id="casProxyTicketValidator" class="org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator">    
                <property name="casValidate"><value>https://testcas:8443/cas/proxyValidate</value></property>
                <property name="proxyCallbackUrl"><value>https://testcas:8443/caswithacegi/casProxy/receptor</value></property>
                <property name="serviceProperties"><ref local="serviceProperties"/></property>
         <property name="trustStore"><value>C:\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>
</bean>

My application is working fine with the above written bean but I want to externalise trustStore path , say I want to write something like :
 <property name="trustStore"><value>${certpath}</value></property> and want to read certpath from a properties file.

For this I have added below written bean to the configuration file but I am unable to understand why it is not picking certpath from the properties file, may be the order of loading of properties file is causing some problem .

<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
 <property name="locations">
            <list>
              <value>/WEB-INF/classes/environment.properties</value>
            </list>
</property>
  <property name="ignoreUnresolvablePlaceholders"><value>true</value></property>
</bean>
Any help will be appreciated .

Thanks

       

Re: Externalize trustStore path

by scott_battaglia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The JVM automatically trusts its own store.  So if your JVM is given by:

        <property
name="trustStore"><value>C:
\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>

Then you don't need to explicitly add that.  If that's your JVM then that cacert file is automatically used.

-Scott


-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Fri, Jun 27, 2008 at 1:09 PM, SMallik <kmr_shailendra@...> wrote:

Hi,
I have an application wherein I have integrated CAS SSO and Acegi security
for Spring.
<bean id="casProxyTicketValidator"
class="org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator">
               <property
name="casValidate"><value>https://testcas:8443/cas/proxyValidate</value></property>
               <property
name="proxyCallbackUrl"><value>https://testcas:8443/caswithacegi/casProxy/receptor</value></property>
               <property name="serviceProperties"><ref
local="serviceProperties"/></property>
        <property
name="trustStore"><value>C:\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>
</bean>

My application is working fine with the above written bean but I want to
externalise trustStore path , say I want to write something like :
 <property name="trustStore"><value>${certpath}</value></property> and want
to read certpath from a properties file.

For this I have added below written bean to the configuration file but I am
unable to understand why it is not picking certpath from the properties
file, may be the order of loading of properties file is causing some problem
.

<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
 <property name="locations">
           <list>
             <value>/WEB-INF/classes/environment.properties</value>
           </list>
</property>
 <property
name="ignoreUnresolvablePlaceholders"><value>true</value></property>
</bean>
Any help will be appreciated .

Thanks


--
View this message in context: http://www.nabble.com/Externalize-trustStore-path-tp18159735p18159735.html
Sent from the CAS Users mailing list archive at Nabble.com.

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas


_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: Externalize trustStore path

by SMallik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Scott,
If I comment this property <!--<property name="trustStore"><value>C:
\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>--> , I am getting the following error :
Your CAS credentials were rejected.
Reason: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target .

-Shailendra


scott_battaglia wrote:
The JVM automatically trusts its own store.  So if your JVM is given by:

        <property
name="trustStore"><value>C:
\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>

Then you don't need to explicitly add that.  If that's your JVM then that
cacert file is automatically used.

-Scott


-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Fri, Jun 27, 2008 at 1:09 PM, SMallik <kmr_shailendra@yahoo.com> wrote:

>
> Hi,
> I have an application wherein I have integrated CAS SSO and Acegi security
> for Spring.
> <bean id="casProxyTicketValidator"
>
> class="org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator">
>                <property
> name="casValidate"><value>https://testcas:8443/cas/proxyValidate
> </value></property>
>                <property
> name="proxyCallbackUrl"><value>
> https://testcas:8443/caswithacegi/casProxy/receptor</value></property>
>                <property name="serviceProperties"><ref
> local="serviceProperties"/></property>
>         <property
>
> name="trustStore"><value>C:\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>
> </bean>
>
> My application is working fine with the above written bean but I want to
> externalise trustStore path , say I want to write something like :
>  <property name="trustStore"><value>${certpath}</value></property> and want
> to read certpath from a properties file.
>
> For this I have added below written bean to the configuration file but I am
> unable to understand why it is not picking certpath from the properties
> file, may be the order of loading of properties file is causing some
> problem
> .
>
> <bean id="propertyPlaceholderConfigurer"
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>  <property name="locations">
>            <list>
>              <value>/WEB-INF/classes/environment.properties</value>
>            </list>
> </property>
>  <property
> name="ignoreUnresolvablePlaceholders"><value>true</value></property>
> </bean>
> Any help will be appreciated .
>
> Thanks
>
>
> --
> View this message in context:
> http://www.nabble.com/Externalize-trustStore-path-tp18159735p18159735.html
> Sent from the CAS Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Yale CAS mailing list
> cas@tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>

_______________________________________________
Yale CAS mailing list
cas@tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas

Re: Externalize trustStore path

by scott_battaglia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I think you probably meant to add your original certificate to the JVM's cacerts file not the cacert file

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Fri, Jun 27, 2008 at 2:18 PM, SMallik <kmr_shailendra@...> wrote:

Hi Scott,
If I comment this property <!--<property name="trustStore"><value>C:
\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>--> , I am
getting the following error :
Your CAS credentials were rejected.
Reason: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target .

-Shailendra



scott_battaglia wrote:
>
> The JVM automatically trusts its own store.  So if your JVM is given by:
>
>         <property
> name="trustStore"><value>C:
> \java\jdk1.5.0_09\jre\lib\security\cacert</value></property>
>
> Then you don't need to explicitly add that.  If that's your JVM then that
> cacert file is automatically used.
>
> -Scott
>
>
> -Scott Battaglia
> PGP Public Key Id: 0x383733AA
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
>
> On Fri, Jun 27, 2008 at 1:09 PM, SMallik <kmr_shailendra@...> wrote:
>
>>
>> Hi,
>> I have an application wherein I have integrated CAS SSO and Acegi
>> security
>> for Spring.
>> <bean id="casProxyTicketValidator"
>>
>> class="org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator">
>>                <property
>> name="casValidate"><value>https://testcas:8443/cas/proxyValidate
>> </value></property>
>>                <property
>> name="proxyCallbackUrl"><value>
>> https://testcas:8443/caswithacegi/casProxy/receptor</value></property>
>>                <property name="serviceProperties"><ref
>> local="serviceProperties"/></property>
>>         <property
>>
>> name="trustStore"><value>C:\java\jdk1.5.0_09\jre\lib\security\cacert</value></property>
>> </bean>
>>
>> My application is working fine with the above written bean but I want to
>> externalise trustStore path , say I want to write something like :
>>  <property name="trustStore"><value>${certpath}</value></property> and
>> want
>> to read certpath from a properties file.
>>
>> For this I have added below written bean to the configuration file but I
>> am
>> unable to understand why it is not picking certpath from the properties
>> file, may be the order of loading of properties file is causing some
>> problem
>> .
>>
>> <bean id="propertyPlaceholderConfigurer"
>>
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>>  <property name="locations">
>>            <list>
>>              <value>/WEB-INF/classes/environment.properties</value>
>>            </list>
>> </property>
>>  <property
>> name="ignoreUnresolvablePlaceholders"><value>true</value></property>
>> </bean>
>> Any help will be appreciated .
>>
>> Thanks
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Externalize-trustStore-path-tp18159735p18159735.html
>> Sent from the CAS Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Yale CAS mailing list
>> cas@...
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>
> _______________________________________________
> Yale CAS mailing list
> cas@...
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>

--
View this message in context: http://www.nabble.com/Externalize-trustStore-path-tp18159735p18160983.html
Sent from the CAS Users mailing list archive at Nabble.com.

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas


_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas
LightInTheBox - Buy quality products at wholesale price