Have a working CAS setup with 3.5.2 and working to upgrade to 4.1.4 but 
having problems with login flow transcoder settings from the: 
    cas-4.1.4\cas-server-webapp\src\main\webapp\WEB-INF\cas-servlet.xml

  <bean id="loginFlowStateTranscoder" class=
"org.jasig.spring.webflow.plugin.EncryptedTranscoder"
          c:cipherBean-ref="loginFlowCipherBean" />


    <bean id="loginFlowCipherBean" class=
"org.cryptacular.bean.BufferedBlockCipherBean"
          p:keyAlias="${cas.webflow.keyalias:aes128}"
          p:keyStore-ref="loginFlowCipherKeystore"
          p:keyPassword="${cas.webflow.keypassword:changeit}">
        <property name="nonce">
            <bean class="org.cryptacular.generator.sp80038a.RBGNonce" />
        </property>
        <property name="blockCipherSpec">
            <bean class="org.cryptacular.spec.BufferedBlockCipherSpec"
                  c:algName="${cas.webflow.cipher.alg:AES}"
                  c:cipherMode="${cas.webflow.cipher.mode:CBC}"
                  c:cipherPadding="${cas.webflow.cipher.padding:PKCS7}" />
        </property>
    </bean>


    <bean id="loginFlowCipherKeystore" class="java.security.KeyStore"
          factory-bean="loginFlowCipherKeystoreFactory" factory-method=
"newInstance" />


    <bean id="loginFlowCipherKeystoreFactory" class=
"org.cryptacular.bean.KeyStoreFactoryBean"
          c:type="${cas.webflow.keystore.type:JCEKS}"
          c:password="${cas.webflow.keystore.password:changeit}">
        <constructor-arg name="resource">
          <bean class="org.cryptacular.io.URLResource"
                c:url=
"${cas.webflow.keystore:classpath:/etc/pki/java/keystore.jceks}" />
        </constructor-arg>
    </bean>

I am wondering what I am missing / doing wrong with the keystore designated 
by this property: ${cas.webflow.keystore}.  I have tried many different 
things, but can't seem to provide either the right type of keystore, 
keystore path, or key in the keystore. If I set the keystore path like this:

<bean class="org.cryptacular.io.URLResource" c:url=
"${cas.webflow.keystore:classpath:/etc/pki/java/keystore.jceks}" />

It fails and says: "Failed to convert value of type 'java.lang.String' to 
required type 'java.net.URL'...Could not retrieve URL for class path 
resource".

If I change  class="org.cryptacular.io.URLResource" to 
class="org.cryptacular.io.ClassPathResource", then it stops complaining 
about the keystore and starts failing to get the aes128 key alias out of 
the keystore: "aes128 is not a secret key".  It is not evident whether it 
actually has the keystore loaded properly or not.

How to I setup a proper keystore with proper encryption key that will get 
loaded and work to support the "loginFlowStateTranscoder" for the 
class="org.jasig.spring.webflow.plugin.EncryptedTranscoder"?
*This is how I setup the keystore & key that are NOT working:*
I created a new keystore in this manor:
keytool -keystore keystore.jceks -genkey -alias sample -storetype JCEKS
and added a key in this manor:
keytool -genseckey -alias aes128 -keyalg AES -keysize 128 -keystore 
keystore.jceks -storetype JCEKS

-- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.

Reply via email to